* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    padding: 20px;
    overflow-y: auto;
    box-shadow: -2px 0 30px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.canvas-container {
    position: fixed;
    left: 0;
    top: 0;
    width: calc(100% - 280px);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

h1 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: 600;
}

.subtitle {
    font-size: 10px;
    color: #666;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.mode-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.mode-btn {
    padding: 12px 8px;
    background: #252525;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-btn:hover {
    background: #2a2a2a;
    border-color: #444;
    color: #bbb;
}

.mode-btn.active {
    background: #444;
    border-color: #555;
    color: #fff;
}

.control-group {
    margin-bottom: 18px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: #aaa;
}

.control-value {
    color: #aaa;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #888;
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #666;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: background 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #888;
}

.btn {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

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

.btn-primary:hover {
    background: #555;
    border-color: #666;
}

.btn-secondary {
    background: #333;
    border-color: #444;
}

.btn-secondary:hover {
    background: #3a3a3a;
    border-color: #555;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #0a0a0a;
}

.toggle-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    background: #252525;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 10px;
    color: #999;
}

.toggle-btn.active {
    background: #444;
    border-color: #555;
    color: #fff;
}

.color-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.color-swatch {
    width: 100%;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #333;
    transition: all 0.3s ease;
}

.color-swatch:hover {
    border-color: #444;
}

.color-swatch.active {
    border-color: #888;
}

.info-text {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
    font-style: italic;
}

.preset-btn {
    padding: 8px 6px;
    background: #252525;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-btn:hover {
    background: #2a2a2a;
    border-color: #444;
    color: #bbb;
    transform: translateY(-1px);
}

.preset-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive Design */
.sidebar-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: #252525;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    display: none;
    outline: none;
}

.sidebar-toggle:hover {
    background: #2a2a2a;
    border-color: #444;
    color: #bbb;
}

.sidebar-toggle.active {
    background: #444;
    border-color: #555;
    color: #fff;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .sidebar.open {
        right: 0;
    }

    .canvas-container {
        width: 100%;
    }

    .sidebar-toggle {
        display: block;
    }

    /* Add overlay backdrop when sidebar is open */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 98;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 250px;
        right: -250px;
    }

    h1 {
        font-size: 16px;
    }

    .section-title {
        font-size: 12px;
    }

    .mode-btn,
    .toggle-btn,
    .preset-btn {
        font-size: 9px;
        padding: 8px 6px;
    }

    .btn {
        padding: 10px;
        font-size: 10px;
    }

    .control-label {
        font-size: 11px;
    }
}
