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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f0e6 0%, #e8e0d5 100%);
    min-height: 100vh;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
#header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    text-align: center;
}

#header h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #7B68A3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#header .subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Scene Container */
#scene-container {
    flex: 1;
    width: 100%;
    position: relative;
}

#scene-container canvas {
    display: block;
}

/* Control Panel */
#controls-panel {
    position: absolute;
    top: 100px;
    left: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 200px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toggle Buttons */
.toggle-container {
    display: flex;
    gap: 4px;
    background: #e8e0d5;
    border-radius: 8px;
    padding: 3px;
}

.toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #7B68A3;
    color: white;
    box-shadow: 0 2px 8px rgba(123, 104, 163, 0.3);
}

/* Slider */
input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(90deg, #FFD93D 0%, #7B68A3 100%);
    border-radius: 3px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-btn {
    flex: 1;
    min-width: 55px;
    padding: 6px 10px;
    border: 2px solid #7B68A3;
    background: white;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #7B68A3;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #7B68A3;
    color: white;
}

/* Action Buttons */
.action-btn {
    padding: 8px 12px;
    border: none;
    background: #f5f0e6;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #7B68A3;
    color: white;
}

.action-btn.active {
    background: #FFD93D;
    color: #333;
}

/* Info Sidebar */
#info-sidebar {
    position: absolute;
    top: 100px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    max-width: 250px;
    transition: all 0.3s;
}

#info-sidebar.collapsed {
    max-width: 50px;
    padding: 10px;
}

#info-sidebar.collapsed .sidebar-content {
    display: none;
}

#sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.sidebar-content {
    margin-top: 10px;
}

.sidebar-content h3 {
    font-size: 1rem;
    color: #7B68A3;
    margin-bottom: 8px;
}

.sidebar-content p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

/* Instructions Overlay */
#instructions-overlay {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(123, 104, 163, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

#instructions-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.instructions-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.instructions-content p {
    color: white;
    font-size: 0.85rem;
    text-align: center;
}

#dismiss-instructions {
    padding: 6px 16px;
    border: 2px solid white;
    background: transparent;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#dismiss-instructions:hover {
    background: white;
    color: #7B68A3;
}

/* Footer */
#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 15px 20px;
    background: linear-gradient(0deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 100%);
    text-align: center;
}

#footer p {
    font-size: 0.8rem;
    color: #666;
}

#footer a {
    color: #7B68A3;
    text-decoration: none;
    font-weight: 600;
}

#footer a:hover {
    text-decoration: underline;
}

#footer .quote {
    font-style: italic;
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #header h1 {
        font-size: 1.4rem;
    }
    
    #header .subtitle {
        font-size: 0.8rem;
    }
    
    #controls-panel {
        top: auto;
        bottom: 70px;
        left: 10px;
        right: 10px;
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
    }
    
    .control-group {
        flex: 1;
        min-width: 100px;
    }
    
    .camera-presets {
        width: 100%;
    }
    
    .preset-buttons {
        justify-content: center;
    }
    
    #info-sidebar {
        top: auto;
        bottom: 180px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    #info-sidebar.collapsed {
        left: auto;
        max-width: 50px;
    }
    
    #instructions-overlay {
        bottom: 190px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    #instructions-overlay.hidden {
        transform: translateY(20px);
    }
    
    #footer {
        padding: 10px;
    }
    
    #footer p {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    #header {
        padding: 10px;
    }
    
    #header h1 {
        font-size: 1.2rem;
    }
    
    .toggle-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .preset-btn {
        min-width: 45px;
        padding: 5px 8px;
        font-size: 0.65rem;
    }
    
    .control-group label {
        font-size: 0.65rem;
    }
}