:root {
    --vfd-main: white;
    --vfd-red: #ff3c22;
    --vfd-orange: #ff8800;
    --vfd-glow: rgb(87, 87, 87);
    --vfd-shadow-main: rgba(176, 254, 255, 0.35);
    --vfd-shadow-red: rgba(255, 60, 34, 0.6);
    --vfd-sep-line: #1a1a1a;
    --bg-color: #535353;
    --panel-color: #1e1e1e;
    --panel-top: #2b2b2b;
    --panel-bottom: #161616;
    --text-color: #b0b0b0;
    --header-text: #777;
    --panel-border: #111;
    --display-border: #0a0a0a;
    --btn-bg: #252525;
    --btn-border: #3a3a3a;
    --btn-text: #ccc;
    --shuttle-bg: #0a0a0a;
    --shuttle-thumb: #262626;
    --shuttle-label: #a8a8a8;
    --shadow-main: rgba(0, 0, 0, 0.95);
    --accent-line: #c8a84b;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    user-select: none;
}

/* ── CHASSIS ── */
.player-container {
    background: linear-gradient(180deg, var(--panel-top) 0%, var(--panel-color) 40%, var(--panel-bottom) 100%);
    width: 100%;
    max-width: 1400px;
    border: 1px solid var(--panel-border);
    border-bottom: 3px solid #090909;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.04) inset,
        0 60px 120px var(--shadow-main),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;

    position: relative;
    overflow: visible;
    margin: 0 40px;
}

.player-container::before,
.player-container::after {
    content: "";
    position: absolute;
    top: -1px;          /* Aligné avec la bordure du châssis */
    bottom: -3px;       /* Aligné avec le bas plus épais du châssis */
    width: 50px;        /* Largeur du panneau de bois */
    
    /* Texture bois (Dégradé linéaire pour simuler les veines) */
    background: linear-gradient(90deg, #4d331f 0%, #7a5230 50%, #4d331f 100%);
    
    /* Effet de relief */
    box-shadow: 
        inset 1px 0 2px rgba(255,255,255,0.1),
        3px 5px 15px rgba(0,0,0,0.5);
    border-radius: 2px;
    z-index: -1; /* Placé juste derrière le panneau pour une fusion parfaite */
}

/* Positionnement à gauche */
.player-container::before {
    left: -50px;
    border-radius: 2px 0 0 2px;
    border-right: 2px solid rgba(0,0,0,0.4); /* Jointure avec le châssis */
}

/* Positionnement à droite */
.player-container::after {
    right: -50px;
    border-radius: 0 2px 2px 0;
    border-left: 2px solid rgba(0,0,0,0.4); /* Jointure avec le châssis */
}



.header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px 8px;
    background: rgba(0, 0, 0, 0.25); /* Légèrement assombri pour faire ressortir l'or */

    /* 1. L'effet "dépassement" */
    margin-left: 0px;  /* Sort à gauche */
    margin-right: 0px; /* Sort à droite */
    position: relative;  /* Pour s'assurer qu'il passe au-dessus du reste */
    z-index: 10;

    /* Bordure Or existante */
    border-bottom: 2px solid; 
    border-image-source: linear-gradient(
        to right, 
        #bf953f, 
        #fcf6ba 25%, 
        #b38728 50%, 
        #fbf5b7 75%, 
        #aa771c
    );
    border-image-slice: 1;

    /* 2. L'effet de relief (3D) */
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),      /* Ombre portée principale */
        0 1px 0 rgba(255, 255, 255, 0.1);  /* Très léger reflet sur le dessus */
}

.brand-logo-img {
    height: 25px;
    width: auto;
}

.classaa-logo {
    height: 34px;
    width: auto;
}

.btn-label-power {
    font-size: 9px;
    font-weight: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--btn-text);
    padding-bottom: 3px;
}

.model-text {
    font-size: 0.58rem;
    color: var(--header-text);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    text-shadow: 
        -1px -1px 0px rgba(0, 0, 0, 0.6), 
        1px 1px 1px rgba(255, 255, 255, 0.1);
}

/* ── MAIN BODY ── */
.main-body {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 18px 20px 18px;
    gap: 18px;
}

/* ── LEFT SECTION ── */
.left-section {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── VFD DISPLAY ── */
.display-panel {
    background: #000;
    border: 2px solid var(--display-border);
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 2px;
    
    /* Box shadow mis à jour */
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 1),
        inset 0 0 8px rgba(255, 255, 255, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 12px var(--vfd-glow);
}

.status-line {
    color: var(--vfd-main);
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-shadow: 0 0 8px var(--vfd-shadow-main);
    height: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eq-preset-ind {
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    color: var(--vfd-main);
    text-shadow: 0 0 8px var(--vfd-shadow-main);
    opacity: 0.85;
}

.timer-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
}

.spectrum-canvas {
    flex: 1;
    min-width: 0;
    height: 80px;
    display: block;
    align-self: stretch;
}

.timer-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.time-display {
    color: var(--vfd-main);
    font-family: 'DS-Digital', sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 4.8rem;
    font-weight: 500;
    text-shadow: 0 0 18px var(--vfd-shadow-main);
    display: flex;
    align-items: baseline;
    gap: 1px;
    line-height: 1;
}

.digit {
    width: 0.6em;
    text-align: center;
}

.time-sign {
    width: 0.4em;
    text-align: center;
    display: inline-block;
}

.sep {
    margin: 0 1px;
}

.side-indicators {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    min-width: 90px;
}

.ind-row {
    display: flex;
    gap: 8px;
}

.ind {
    font-size: 0.55rem;
    font-weight: 500;
    color: #181818;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s, text-shadow 0.2s;
}

.ind.active {
    color: var(--vfd-main) !important;
    text-shadow: 0 0 8px var(--vfd-shadow-main);
}

#format-info {
    color: var(--vfd-red);
    font-weight: 700;
    font-size: 0.7rem;
    text-shadow: 0 0 8px var(--vfd-shadow-red);
    letter-spacing: 1px;
}

.format-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
}

.ind-inline {
    font-size: 0.52rem;
    font-weight: 600;
    color: #181818;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s, text-shadow 0.2s;
}

.ind-inline.active {
    color: var(--vfd-main);
    text-shadow: 0 0 8px var(--vfd-shadow-main);
}

#file-info-line {
    color: var(--vfd-main);
    font-size: 0.78rem;
    min-height: 0.78rem;
    text-shadow: 0 0 6px var(--vfd-shadow-main);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.85;
    margin: 2px 0;
    letter-spacing: 0.5px;
    text-align: center;
}

.track-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 3px 0 4px;
    border-top: 1px solid var(--vfd-sep-line);
    cursor: pointer;
    min-height: 24px;
}

.track-num {
    font-size: 0.78rem;
    min-height: 0.78rem;
    color: var(--vfd-main);
    opacity: 0.6;
    font-weight: 500;
}

.track-num.active {
    color: var(--vfd-red);
    opacity: 1;
    text-shadow: 0 0 10px var(--vfd-shadow-red);
}

.track-more {
    color: var(--vfd-red);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px var(--vfd-shadow-red);
    animation: vfd-blink 2s infinite;
}

@keyframes vfd-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.vu-wrap {
    height: 55px;
    margin-top: 4px;
    border-top: 1px solid var(--vfd-sep-line);
    padding-top: 2px;
}

/* ── NUMPAD ── */
.num-pad {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-top: 7px;
}

/* ── TRANSPORT BAR ── */
.transport-bar {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    margin-top: 50px;
    align-items: end;
}

/* Center 7 wrappers over 10 columns: start at col 2 (1.5 rounded) */
.transport-bar .btn-labeled:first-child {
    grid-column: 2;
}

.transport-bar .btn-labeled button {
    width: 100%;
}

/* ── RIGHT SECTION ── */
.right-section {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 18px;
}

/* ── CONTROL GROUPS ── */
.ctrl-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 5px;
}

.ctrl-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ctrl-group-label {
    font-size: 9px;
    font-weight: normal;
    color: var(--btn-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    text-align: center;
    padding-bottom: 3px;
}

.ctrl-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

/* ── BUTTONS ── */
button {
    background: linear-gradient(180deg, #2e2e2e 0%, #1e1e1e 100%);
    border: 1px solid var(--btn-border);
    border-bottom: 4px solid #101010;
    color: var(--btn-text);
    padding: 9px 4px;
    font-size: 0.6rem;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.08s ease;
    outline: none;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

button:hover {
    background: linear-gradient(180deg, #363636 0%, #262626 100%);
    color: #fff;
}

button:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow: inset 0 0 8px rgba(176, 254, 255, 0.1);
    color: var(--vfd-main);
    border-color: var(--vfd-main);
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
}

button i {
    font-size: 0.9rem;
}

/* Transport buttons same size as other buttons */
.btn-transport {
    width: 70px;
    height: 50px;
    
    /* Indispensable pour que le padding ne déforme pas la taille */
    box-sizing: border-box; 
    
    /* On centre parfaitement l'icône à l'intérieur */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    
    /* On ajuste le reste */
    padding: 0; /* Le flex gère l'alignement, plus besoin de padding précis */
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-labeled {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Open button accent */
.btn-open {
    width: 55px;
    height: 40px;
    background: linear-gradient(180deg, #2a2a2a 0%, #181818 100%);
    border: 2px solid #3a3a3a;
    border-bottom: 3px solid #090909;
    color: var(--btn-text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    outline: none;
    padding: 0;

}

/* ── SHUTTLE ── */
.shuttle-zone {
    background: var(--shuttle-bg);
    padding: 10px 12px;
    border: 1px solid var(--btn-border);
    border-radius: 2px;
    margin-top: auto;

    /* Effet de profondeur */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.2), 
        0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.shuttle-label {
    font-size: 0.52rem;
    color: var(--shuttle-label);
    text-align: center;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

input[type="range"] {
    width: 100%;
    height: 3px;
    background: #222;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 14px;
    background: var(--shuttle-thumb);
    border: 2px solid var(--btn-border);
    border-radius: 2px;
}

/* ── MODALS ── */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #000;
    border: 2px solid var(--btn-border);
    width: 85%;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 1);
}

.modal-content img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ── ART MODAL ── */
.art-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 520px;
    width: 90%;
}

.art-modal-content > img#modalImg {
    width: 100%;
    max-width: 520px;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.9);
}

.art-track-info {
    color: var(--vfd-main);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--vfd-shadow-main);
    text-align: center;
    line-height: 1.6;
    opacity: 0.9;
}

.art-technics-logo {
    height: 24px;
    width: auto;
}

.playlist-title {
    color: var(--vfd-main);
    font-size: 0.9rem;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--vfd-sep-line);
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlist-item {
    padding: 10px 12px;
    border-bottom: 1px solid #0f0f0f;
    cursor: pointer;
    color: var(--btn-text);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.15s;
}

.playlist-item:hover {
    background: #0d0d0d;
    color: var(--vfd-main);
}

.playlist-item.active {
    color: var(--vfd-red);
    font-weight: bold;
    background: rgba(255, 60, 34, 0.04);
}

.playlist-item span {
    opacity: 0.45;
    font-family: 'DS-Digital';
    font-size: 1rem;
    min-width: 22px;
}

/* Explicit 2-col rows */
.ctrl-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ── POWER COLUMN ── */
.power-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-right: 6px;
    padding-left: 1px;
}

.btn-power {
    width: 55px;
    height: 40px;
    background: linear-gradient(180deg, #2a2a2a 0%, #181818 100%);
    border: 2px solid #3a3a3a;
    border-bottom: 3px solid #090909;
    color: var(--btn-text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    outline: none;
    padding: 0;
    margin-bottom: 12px;
}

.btn-power:hover {
    color: #ff4433;
    border-color: #cc3322;
    box-shadow: 0 0 18px rgba(200, 50, 30, 0.4);
}

.btn-power:active {
    transform: translateY(1px);
    border-bottom-width: 2px;
}

/* ── RESTART CONFIRM MODAL ── */
.modal-confirm {
    background: #000;
    border: 2px solid var(--btn-border);
    max-width: 300px;
    width: 90%;
    padding: 32px 28px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 1);
}

.confirm-icon {
    font-size: 2rem;
    color: #cc3322;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(200, 50, 30, 0.5);
}

.confirm-title {
    color: var(--vfd-main);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-shadow: 0 0 8px var(--vfd-shadow-main);
}

.confirm-sub {
    color: #555;
    font-size: 0.68rem;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-confirm-cancel, .btn-confirm-ok {
    flex: 1;
    padding: 10px;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border-radius: 2px;
    outline: none;
}

.btn-confirm-cancel {
    background: linear-gradient(180deg, #2e2e2e 0%, #1e1e1e 100%);
    border: 1px solid #3a3a3a;
    border-bottom: 2px solid #101010;
    color: #aaa;
}

.btn-confirm-cancel:hover {
    color: #fff;
}

.btn-confirm-ok {
    background: linear-gradient(180deg, #3a1010 0%, #220808 100%);
    border: 1px solid #cc3322;
    border-bottom: 2px solid #660000;
    color: #ff4433;
    text-shadow: 0 0 8px rgba(255, 60, 34, 0.5);
}

.btn-confirm-ok:hover {
    background: linear-gradient(180deg, #4a1515 0%, #2a0a0a 100%);
    color: #ff6655;
}
/* ── TRAY ASSEMBLY ── */
.tray-assembly {
    position: relative;
    width: 100%;
    margin-top: 24px;
    height: 115px;
    overflow: hidden;
    border-radius: 2px;
}

/* Boutons cachés dans le fond du logement */
.tray-hidden-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px 4px;
    background: #141414;
    border: 1px solid #111;
    border-radius: 2px;
}

.tray-inner {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

/* EQ Presets row */
.tray-eq-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 5px;
}

.tray-row-label {
    font-size: 9px;
    font-weight: normal;
    text-align: center;
    color: var(--btn-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: -8px;
}

.tray-eq-buttons {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.tray-hidden-buttons {
    display: grid;
    grid-template-columns: repeat(10, auto);
    gap: 10px;
    margin-bottom: -8px;
}

/* La trappe — glisse vers le bas dans le chassis */
.tray-door {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--panel-top) 0%, var(--panel-color) 50%, var(--panel-bottom) 100%);
    border: 2px solid var(--panel-border);
    border-bottom: 3px solid #080808;
    border-radius: 2px;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    cursor: pointer;
}

.tray-door:hover {
    filter: brightness(0.95);
}

.tray-door.tray-open {
    transform: translateY(95%);
}

.vertical-separator {
    width: 1px;
    height: 30px; /* Ajustez la hauteur selon vos besoins */
    background-color: rgb(117, 117, 117);
    opacity: 0.5; /* Optionnel : pour un look plus subtil */
    margin: 5px 5px; /* Espace à gauche et à droite */
}
/* ── SPECTRUM FREQ LABELS ── */
.spectrum-outer {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.spectrum-outer .spectrum-canvas {
    flex: none;
}

.spectrum-freq-labels {
    display: grid;
    grid-template-columns: repeat(28, 1fr);
    width: 100%;
    margin-bottom: 2px;
}

.spectrum-freq-labels span {
    font-family: 'Inter', sans-serif;
    font-size: 7px;
    font-weight: 500;
    color: var(--vfd-main);
    opacity: 0.5;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
}

/* ── VU dB SCALE ── */
.vu-outer {
    margin-top: 4px;
}

.vu-outer .vu-wrap {
    margin-top: 0;
}

.vu-db-scale {
    position: relative;
    height: 13px;
    width: 100%;
}

.vu-db-scale span {
    position: absolute;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 500;
    color: var(--vfd-main);
    opacity: 0.5;
    line-height: 1;
    top: 2px;
    white-space: nowrap;
}

.vu-db-scale span.vu-db-red {
    color: var(--vfd-red);
    opacity: 0.7;
}
