@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700&family=Rajdhani:wght@300;500;700&display=swap');

:root {
    /* Dark Theme (Default) */
    --bg-grad-1: #020024;
    --bg-grad-2: #1a0b2e;
    --bg-grad-3: #16213e;
    --bg-grad-4: #2d1b0e;
    --glass-bg: rgba(8, 8, 16, 0.60);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #e0e0e0;
    --text-dim: #ccc;
    --accent-primary: #00f3ff;
    --accent-secondary: #bc13fe;
    --panel-header-bg: rgba(0,0,0,0.4);
    --panel-footer-bg: rgba(0,0,0,0.6);
    --scanline-opacity: 0.1;
    --dot-color: #22c55e;
}

[data-theme="light"] {
    /* Light Theme (Zen Garden) */
    --bg-grad-1: #fdfbf7;
    --bg-grad-2: #e6e9f0;
    --bg-grad-3: #eacda3;
    --bg-grad-4: #d6ae7b;
    --glass-bg: rgba(255, 255, 255, 0.40);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #2c3e50;
    --text-dim: #333;
    --accent-primary: #2980b9;
    --accent-secondary: #27ae60;
    --panel-header-bg: rgba(255,255,255,0.3);
    --panel-footer-bg: rgba(255,255,255,0.5);
    --scanline-opacity: 0.02;
    --dot-color: #16a34a;
}

body {
    background: linear-gradient(-45deg, var(--bg-grad-1), var(--bg-grad-2), var(--bg-grad-3), var(--bg-grad-4));
    background-size: 400% 400%;
    animation: deep-waves 30s ease infinite;
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    user-select: none;
    transition: color 0.5s ease;
}

@keyframes deep-waves {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px; pointer-events: none; z-index: 10;
    opacity: var(--scanline-opacity);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-scroll::-webkit-scrollbar { width: 3px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
.custom-scroll::-webkit-scrollbar-thumb { background: var(--accent-secondary); border-radius: 2px; }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 12px; width: 12px; border-radius: 50%;
    background: var(--accent-primary); cursor: pointer; margin-top: -4px;
    box-shadow: 0 0 5px var(--accent-primary); transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.3); }
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: rgba(128,128,128,0.2); border-radius: 2px;
}

.visualizer-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

.ui-layer {
    position: relative; z-index: 20; height: 100%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 1rem; pointer-events: none; transition: opacity 0.8s ease;
}

.interactive { pointer-events: auto; }

.btn-neon {
    background: rgba(0,0,0,0.2); border: 1px solid var(--accent-primary); color: var(--accent-primary);
    text-transform: uppercase; letter-spacing: 2px; transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
}
.btn-neon:hover {
    background: var(--accent-primary); color: var(--bg-grad-1); box-shadow: 0 0 30px var(--accent-primary);
}

.btn-icon {
    background: rgba(128,128,128,0.2); border: 1px solid rgba(128,128,128,0.3); color: var(--text-main);
    padding: 8px; border-radius: 8px; transition: all 0.2s; cursor: pointer;
    backdrop-filter: blur(5px);
}
.btn-icon:hover { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }

#tracksContainer {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-height: 60vh; opacity: 1;
}

.collapsed #tracksContainer { max-height: 0; opacity: 0; overflow: hidden; padding: 0; }
.collapsed .panel-footer { display: none; }

.track-label {
    font-family: 'Space Grotesk', sans-serif; font-size: 0.65rem; letter-spacing: 0.05em; color: var(--text-dim);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-weight: 500;
}

.section-title {
    font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--accent-secondary);
    margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.15em;
    border-bottom: 1px solid rgba(128,128,128, 0.3); padding-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ui-hidden { opacity: 0; pointer-events: none; }

.green-dot {
    display: inline-block; width: 10px; height: 10px; background-color: var(--dot-color);
    border-radius: 50%; margin-right: 8px; box-shadow: 0 0 8px var(--dot-color);
}
.logo-text {
    font-family: 'Space Grotesk', monospace; font-weight: 700; letter-spacing: 0.1em;
    color: #7b8599; font-size: 0.9rem;
    transition: color 0.3s;
}
.logo-text:hover { color: var(--accent-primary); }

.footer-link {
    color: var(--accent-primary); text-decoration: none; border-bottom: 1px solid transparent; transition: border 0.3s;
}
.footer-link:hover { border-bottom: 1px solid var(--accent-primary); }

/* --- Style du Logo --- */
.app-logo {
    width: 64px; /* Taille par défaut */
    height: auto;
    border-radius: 12px; /* Léger arrondi si l'image est carrée */
    /* Lueur dynamique basée sur la couleur du thème actuel */
    filter: drop-shadow(0 0 5px var(--accent-primary)); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* Animation au survol */
.app-logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--accent-primary));
}

/* Ajustement pour mobile pour ne pas prendre trop de place */
@media (max-width: 640px) {
    .app-logo {
        width: 48px;
        border-radius: 8px;
    }
}
