@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.cdnfonts.com/css/ds-digital');
@import url('css/root.css');
@import url('css/volume-control.css');
@import url('css/tray.css');
@import url('css/vfd.css');

body {
    background-color: var(--bg-color);
    color: var(--text-silver);
    font-family: var(--ui-font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    user-select: none;
    overflow: hidden;
}

.deck-container {
    width: 1600px;
    background-color: var(--deck-color);
    padding: 25px 100px 19px 100px;
    border-radius: 10px;
    box-shadow: 0 200px 200px var(--shadow-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-left: none;
    border-right: none;
    border-top: 3px solid rgb(65, 65, 65);
    border-bottom: none;
}

.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: none;
    margin-left: -70px;
    margin-right: -70px;
}

.central-display-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 30px;
    box-sizing: border-box;
    position: relative;
}

.display-with-controls {
    display: flex;
    justify-content: center;
    align-items: start;
    width: 100%;
    position: relative;
}

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

.power-section {
    width: 110px;
    /* Même largeur qu'un bouton de la grille (230-10)/2 */
    position: absolute;
    left: 0;
    /* Augmentez pour déplacer vers la DROITE (ex: 20px, 50px) */
    top: 0;
    /* Augmentez pour descendre (ex: 20px, 50px, 100px) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.controls-left-stack {
    width: 230px;
    position: absolute;
    left: 0;
    top: 110px;
}

.left-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.controls-left-stack .btn {
    width: 100%;
    height: 50px;
}

.controls-right-stack {
    width: 230px;
    position: absolute;
    right: 0;
    top: -30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.transport-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* Passage à 6 colonnes */
    gap: 15px;
    /* Réduction de l'espace (était à 35px) pour gagner de la place */
    margin-top: 5px;
    margin-bottom: 0px;
    width: 880px;
    align-items: end;
}

.eject-section {
    margin-top: 20px;
}

.upper-label, .volume-label {
    font-size: 9px;
    font-weight: bold;
    color: var(--text-silver);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn {
    background: linear-gradient(185deg, #2a2a2b, #151516);
    /* dégradé bouton */
    border: 1px solid #111;
    color: var(--text-silver);
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 3px 3px 6px #000;
    text-transform: uppercase;
    height: 50px;
    width: 100%;
    padding: 0 5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:active {
    background: linear-gradient(145deg, #151516, #2a2a2b);
    box-shadow: inset 2px 2px 5px #000;
    color: var(--text-white);
}

#power-reset-btn {
    height: 50px;
    width: 100%;
    /* Prend toute la largeur de power-section (110px) */
    color: var(--vfd-red) !important;
    /* Toujours blanc */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    /* Effet lumineux */
}

#power-reset-btn i {
    color: var(--vfd-red) !important;
    /* Icône toujours blanche */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

#stop-btn, #eject-btn {
    font-size: 22px;
    color: var(--text-silver);
}


.numeric-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 35px;
    margin-top: 25px;
    margin-bottom: 5px;
    width: 880px;
}

/* Taille du logo HR */

/* Modals */
#art-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
}

#playlist-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 90px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    background: none;
    justify-content: flex-start;
    align-items: center;
    pointer-events: none;
}

#playlist-modal .list-content {
    pointer-events: all;
}

.modal-content {
    background: #111;
    border: 2px solid #333;
    padding: 30px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 1);
    text-align: center;
    border-radius: 8px;
}

.list-content {
    width: 380px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    box-sizing: border-box;
    overflow: hidden;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #2a2a2a;
    background: #0d0d0d;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.playlist-scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 0 20px 12px 20px;
}

/* Ascenseur stylisé aux couleurs du lecteur */
.playlist-scroll::-webkit-scrollbar {
    width: 6px;
}

.playlist-scroll::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 3px;
}

.playlist-scroll::-webkit-scrollbar-thumb {
    background: #3a3a3b;
    border-radius: 3px;
    border: 1px solid #555;
}

.playlist-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-silver);
}

/* Firefox */
.playlist-scroll {
    scrollbar-width: thin;
    scrollbar-color: #3a3a3b #0a0a0a;
}

#track-list-container {
    text-align: left;
    border-top: 1px solid #1a1a1a;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--ui-font);
    position: relative;
}

.track-item:hover {
    background: #1a1a1b;
}

.track-item.active {
    background: #080808;
}

.track-item-cover {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
    border: 1px solid #222;
}

.track-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.track-item-artist {
    font-size: 10px;
    font-weight: bold;
    color: var(--vfd-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item-album {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item-title {
    font-size: 12px;
    color: var(--text-silver);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item.active .track-item-title {
    color: var(--vfd-red);
    font-weight: bold;
}

.track-item.active .track-item-artist {
    color: var(--vfd-red);
}

.track-remove-btn {
    background: none;
    border: none;
    color: #444;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    flex-shrink: 0;
    transition: color 0.2s;
    line-height: 1;
}

.track-remove-btn:hover {
    color: var(--vfd-red);
}

#art-image {
    max-width: 600px;
    max-height: 600px;
    width: 100%;
    border-radius: 4px;
}

#art-info {
    color: var(--vfd-blue);
    margin-top: 25px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
}

/* Grille et Indicateurs */
.track-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 12px 0;
    border-top: 1px solid #0a0a0a;
    border-bottom: 1px solid #0a0a0a;
}

.grid-num {
    font-size: 14px;
    font-weight: bold;
    color: #0d0d0d;
    min-width: 18px;
    text-align: center;
}

.grid-num.loaded {
    color: var(--vfd-blue);
    /* Remplace #40e0ff par la variable */
    transition: color 0.3s ease;
    /* Optionnel : pour une transition douce lors du clic */
}

.grid-num.active-track {
    color: #ff3333 !important;
    text-shadow: 0 0 12px #ff3333;
}

.arrow-indicator {
    font-size: 14px;
    color: #0d0d0d;
    visibility: hidden;
}

.arrow-indicator.active {
    visibility: visible;
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

.vfd-indicator {
    font-family: var(--ui-font);
    font-size: 10px;
    font-weight: bold;
    color: #08181a;
    text-transform: uppercase;
}

#vfd-ab-lock.active {
    font-family: var(--ui-font);
    font-size: 10px;
    font-weight: bold;
    color: var(--vfd-red);
    text-transform: uppercase;
}

.vfd-indicator.active {
    color: var(--vfd-blue);
    text-shadow: 0 0 8px var(--vfd-blue);
}

/* Animations */
@keyframes vfd-input-blink {
    0%, 49% {
        opacity: 1;
    }

    50%, 100% {
        opacity: 0;
    }
}

.vfd-input-blink {
    animation: vfd-input-blink 1s infinite;
}

.vfd-blink-pause {
    animation: vfd-input-blink 1s infinite;
}

.file-format {
    font-family: var(--ui-font);
    font-size: 10px;
    color: var(--vfd-red);
    opacity: 1;
    text-transform: uppercase;
    margin-left: 10px;
    align-self: flex-end;
    padding-bottom: 8px;
    letter-spacing: 1px;
}

/* On crée une règle spécifique pour les boutons de la grille numérique */
.numeric-grid .btn {
    height: 40px;
    /* On réduit la hauteur ici */
    font-size: 13px;
    /* Taille du texte */
    margin-bottom: 5px;
}

/* Ciblage spécifique de la rangée de transport (Play, Stop, Next, etc.) */
.transport-grid .btn {
    height: 60px;
    width: 100%;
    /* Prend toute la largeur de sa cellule */
    font-size: 10px;
    padding: 0;
}

/* Optionnel : Ajuster l'espace entre le label (ex: PLAY/PAUSE) et le bouton */
.transport-grid .eject-section {
    gap: 5px;
    /* Espace entre le texte au-dessus et le bouton */
}

/* On cible le conteneur des boutons de volume */
.controls-right-stack {
    width: 230px;
    position: absolute;
    right: 0;
    top: -30px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

/* Style optionnel pour le label */

#over-arrow {
    color: #220000;
    /* Couleur éteinte (rouge très sombre) */
    transition: all 0.3s;
}

#over-arrow.active {
    color: #f00;
    /* Rouge vif */
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.8);
    /* Effet néon/VFD */
}

/* --- REFLET VERTICAL HAUT EN BAS --- */

.display-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Dégradé de 180deg pour aller de haut en bas */
    /* On crée une bande claire en haut qui s'estompe rapidement */
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            /* Éclat maximal au bord supérieur */
            rgba(255, 255, 255, 0.05) 15%,
            /* Dégradé rapide */
            transparent 50%,
            /* Zone sombre au milieu pour la lisibilité */
            rgba(255, 255, 255, 0.02) 80%,
            /* Très léger reflet de surface en bas */
            rgba(255, 255, 255, 0.07) 100%
            /* Petit liseré de lumière sur le bord bas */
        );

    z-index: 999;
    pointer-events: none;

    /* Ajout d'une légère brillance sur toute la surface pour l'effet "vitre" */
    background-color: rgba(255, 255, 255, 0.01);
}

.upper-label {
    display: block;
    margin-top: 5px;
    margin-bottom: 3px;
    transition: all 0.3s;
    text-align: center;
}

.btn i {
    font-size: 14px;
    color: var(--text-silver);
    pointer-events: none;
}

.btn:hover i {
    color: var(--text-white);
    text-shadow: 0 0 5px var(--vfd-glow);
}

.btn:hover {
    color: var(--text-white);
    text-shadow: 0 0 5px var(--vfd-glow);
}

.search-label {
    grid-column: 1 / -1;
    /* Occupe les 3 colonnes */
    grid-row: 1;
    /* Première ligne */
    text-align: center;
    font-size: 10px;
    color: var(--text-silver);
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
    /* S'assure que l'élément peut être déplacé */
    transform: translateY(10px);
    /* Descend le mot de 15px vers le bas */
}

/* Échelle graduée en dB pour les VU meters */
.vu-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1px;
    margin-bottom: -20px;
    margin-left: 30px;
    padding: 0 1px;
}

.vu-scale-mark {
    font-family: var(--ui-font);
    font-size: 10px;
    font-weight: bold;
    color: var(--vfd-blue);
    opacity: 0.6;
    letter-spacing: 0px;
    text-align: center;
    flex: 1;
}

.vu-scale-mark:first-child {
    text-align: left;
}

.vu-scale-mark:last-child {
    text-align: right;
}

#main-time-display.time-inverse::before {
    content: "-";
    font-family: var(--digital-font);
    font-size: 60px;
    color: var(--vfd-blue);
    text-shadow: 0 0 15px var(--vfd-blue-dim);
    margin-right: 5px;
}

/* Style identique à tes autres modales pour la cohérence */
.custom-modal {
    display: none;
    /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.power-alert {
    background: #1a1a1a;
    border: 1px solid var(--vfd-blue);
    box-shadow: 0 0 20px var(--vfd-glow);
    padding: 30px;
    text-align: center;
    border-radius: 4px;
    min-width: 280px;
}

.btn-confirm {
    background: #333;
    color: var(--vfd-blue);
    width: 80px;
    height: 35px;
    border: 1px solid var(--vfd-blue);
    cursor: pointer;
}

.btn-cancel {
    background: #333;
    color: #fff;
    width: 80px;
    height: 35px;
    border: 1px solid #555;
    cursor: pointer;
}

.btn-confirm:hover {
    background: var(--vfd-blue);
    color: #000;
}

.main-logo-reset-menu {
    height: 23px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}

.transport-grid .btn, #mute-btn {
    height: 60px;
    width: 100%;
    font-size: 14px;
    /* Pour que l'icône soit aussi grande que celle de STOP */
    padding: 0;
}

/* On s'assure que l'icône à l'intérieur suit la même règle de taille */
#mute-btn i {
    font-size: 18px;
}