/* Variables : Thème sombre par défaut */
:root {
    --bg-main: #030303;
    --surface: #1e1e1e;
    --surface-hover: #2a2a2a;
    --surface-alt: #0f0f0f;
    --text-main: #ffffff;
    --text-dim: #aaaaaa;
    --yt-red: #ff0000;
}

/* Variables : Thème clair */
[data-theme="light"] {
    --bg-main: #100f0f;
    --surface: #232324;
    --surface-hover: #e8e8e8;
    --surface-alt: #4a4949;
    --text-main: #030303;
    --text-dim: #606060;
    --yt-red: #132b4fd6;
}

body {
    margin: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Halo YT Music */
#dynamic-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    transition: background 0.8s ease;
}

.app-container {
    width: 100%;
    max-width: 450px; /* Taille mobile */
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.yt-logo {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.yt-logo span { color: var(--yt-red); font-size: 26px; }

button { background: none; border: none; color: var(--text-main); cursor: pointer; transition: 0.2s; }
.icon-btn { font-size: 24px; }

/* Visualiseur Cercle */
.player-main { text-align: center; margin-bottom: 20px; }

#color-glow-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
}
#color-glow-circle:active { transform: scale(0.95); }
.play-icon { font-size: 35px; color: rgba(255,255,255,0.8); }

.track-meta h1 { font-size: 22px; margin: 0; }
.track-meta p { color: var(--yt-red); font-weight: bold; font-size: 15px; margin-top: 5px;}

/* Contrôles Audio */
.main-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}
.big-play {
    width: 65px;
    height: 65px;
    background: var(--text-main);
    color: var(--bg-main);
    border-radius: 50%;
    font-size: 28px;
}

/* Sliders */
.sliders .row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: var(--text-main);
    background: var(--surface-alt);
    border-radius: 2px;
    outline: none;
}

/* Minuteur V2 */
.timer-custom {
    display: flex;
    background: var(--surface);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.timer-custom input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 40%;
    padding: 10px;
    font-size: 16px;
    outline: none;
}
.timer-custom button {
    background: var(--surface-hover);
    flex: 1;
    border-radius: 8px;
    font-weight: bold;
}

/* Navigation Onglets */
.tab-bar {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid var(--surface-alt);
    margin-bottom: 15px;
}
.tab-link {
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
}
.tab-link.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--text-main);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Listes (Couleurs & Sons) */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 30px;
}
.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.list-item:active { background: var(--surface-hover); }
.list-item.active-track {
    border-left: 4px solid var(--yt-red);
    font-weight: bold;
}

/* Carré de couleur de l'aperçu */
.color-square {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.sound-icon { font-size: 20px; }

/* Plein Écran */
#fullscreen-view {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
}
.hidden { display: none; }

#intensity-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: black;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
}