/* Editor Container */
#editor-container {
    display: none;
    position: relative; 
    border-radius: 12px;
    margin: 40px 0; 
}

#btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    opacity: 1;
}

#btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}
 
/* Editor Layout */
.editor-layout {
    position: relative;
    display: block;
    height: 80vh;
    background: #111;
    overflow: hidden;
}

/* Top Toolbar */
.tools-sidebar {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 10;
    width: 100%;
    height: auto;
    background: #252525;
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-bottom: 1px solid #333;
    border-radius: 0;
    box-shadow: none;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #333;
    color: #fff;
}

.tool-divider {
    width: 1px;
    height: 24px;
    background: #444;
    margin: 0 5px;
}

.tool-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* Canvas Area */
.canvas-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #111;
    z-index: 1;
}

.canvas-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    position: relative;
}

.canvas-wrapper {
    position: relative;
    transform-origin: center center;
    cursor: none;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

#editor-canvas {
    display: block;
    background: repeating-conic-gradient(#404040 0% 25%, #303030 0% 50%) 50% / 16px 16px;
}

#mask-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Right Sidebar - Settings */
.settings-sidebar {
    width: 220px;
    background: #252525;
    padding: 20px 15px;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-group {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
}

.settings-group h6 {
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
}

.setting-row {
    margin-bottom: 15px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #ccc;
}

.setting-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* Custom Cursor */
#cursor-overlay {
    position: fixed;
    border: 2px solid rgba(255, 0, 0, 0.9);
    background-color: rgba(255, 0, 0, 0.15);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Bottom Bar */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #252525;
    border-top: 1px solid #333;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #333;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #444;
    border-color: #555;
}

#zoom-level {
    min-width: 50px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Range Input Styling */
.form-range {
    width: 100%;
    height: 6px;
    padding: 0;
    background: #333;
    border-radius: 3px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-range:focus {
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    color: transparent;
    cursor: pointer;
    background-color: #444;
    border-color: transparent;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .editor-layout {
        flex-direction: column;
    }
    
    .tools-sidebar {
        width: 100%;
        flex-direction: row;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid #333;
        justify-content: center;
    }
    
    .tool-divider {
        width: 1px;
        height: 30px;
        margin: 0 10px;
    }
    
    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 15px;
        border-left: none;
        border-top: 1px solid #333;
    }
    
    .settings-group {
        flex: 1;
        min-width: 150px;
    }
    
    .canvas-container {
        min-height: 50vh;
    }
}
