body {
    height: 100vh;
    font-family: 'Geist', sans-serif;
    background: #f5f5f5;
    margin: 0;
    overflow: hidden;
    transition: background-color 0.3s ease;
    position: relative;
}

body.dark {
    background: #1a1a1a;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: rgba(45, 55, 72, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(45, 55, 72, 0.3);
}

.sidebar-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-content {
    padding: 16px;
}

.control-section {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0aec0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

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

.btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.btn-icon {
    font-size: 16px;
}

.slider-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-bottom: 8px;
    cursor: pointer;
    touch-action: none; /* Prevents touch scrolling interference */
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    -moz-appearance: none;
}

.slider::-moz-range-track {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    border: none;
}

.slider-value {
    font-size: 11px;
    color: #e2e8f0;
    text-align: right;
    font-weight: 500;
}

/* Text Input Styles */
.text-input {
    width: calc(100% - 24px);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #000000;
    font-size: 13px;
    font-family: 'Geist', sans-serif;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.text-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
    color: #000000;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
    margin-top: 0px;
}

/* Button container for better alignment */
.button-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.model-info {
    font-size: 12px;
    color: #a0aec0;
    text-align: center;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lighting-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.preset-btn {
    padding: 8px 12px !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.preset-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

/* Canvas Container */
#canvasContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    z-index: 1;
}

body.dark #canvasContainer {
    background: black;
}

#canvasContainer > pre {
    margin: 0;
    font-weight: 900;
    font-family: 'Geist', monospace;
    font-size: 1em !important;
    text-shadow: 0 0 1px #000, 0 0 1px #000, 1px 0 0 #000, 0 1px 0 #000;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        background: rgba(45, 55, 72, 0.95);
    }
    
    .sidebar-header h1 {
        font-size: 20px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn-icon {
        font-size: 14px;
    }
    
    .control-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .control-section h3 {
        font-size: 12px;
    }
    
    #canvasContainer > pre {
        font-size: 0.8em !important;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 220px;
        background: rgba(45, 55, 72, 0.98);
    }
    
    .sidebar-header {
        padding: 16px 12px;
    }
    
    .sidebar-content {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    #canvasContainer > pre {
        font-size: 0.7em !important;
    }
    
    body.dark .sidebar {
        background: rgba(26, 32, 44, 0.98);
    }
}

/* Dark theme support */
body.dark .sidebar {
    background: rgba(26, 32, 44, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark .sidebar-header {
    background: rgba(26, 32, 44, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark .control-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .control-section h3 {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}