body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #121212;
    font-family: Helvetica, Arial, sans-serif;
    color: #ccc;
    user-select: none; 
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none; 
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

:root { --duration: 180s; }

/* --- LAYOUT --- */
.desk-layout {
    display: flex;
    align-items: stretch; 
    justify-content: center;
    gap: 3px; 
    width: 100%;
}

.art-anchor {
    width: calc(50% - 1.5px); 
    display: flex;
    align-items: stretch; 
    justify-content: flex-end; 
}

.amp-anchor {
    width: calc(50% - 1.5px); 
    display: flex;
    align-items: stretch;
    justify-content: flex-start; 
}

/* --- WOODEN ENCLOSURES --- */
.wood-case {
    background: linear-gradient(135deg, #4a2b18 0%, #2e180b 100%);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.1);
    border: 2px solid #1a0d06;
    flex-shrink: 0;
    display: flex;
    align-items: stretch; 
    gap: 15px;
    box-sizing: border-box;
}

/* =========================================
    COMPONENT 1: THE 70s TV SET
    ========================================= */
.tv-screen-wrapper {
    position: relative;
    display: flex;
    align-items: stretch; 
}

.vinyl-sleeve {
    position: relative;
    height: 100%; 
    width: auto; 
    aspect-ratio: 1/1; 
    /* QtWebEngine / Falkon Safety Fallback for Desktop */
    min-width: 55vh;
    background-color: #222;
    background-size: cover; 
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 18px; 
    border: 15px solid #080808; 
    box-shadow: inset 0 0 25px rgba(0,0,0,0.9), 0 2px 4px rgba(255,255,255,0.1);
    transition: background-image 0.3s ease, filter 0.1s;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* CRT Scanline Overlay */
.crt-overlay {
    position: absolute; top:0; left:0; right:0; bottom:0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 5;
    border-radius: 4px;
}

/* Screen Shine */
.vinyl-sleeve::after {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 40%, rgba(255,255,255,0.05) 100%);
    pointer-events: none; z-index: 6;
}

.vinyl-sleeve.no-art {
    background-image: none;
    background: linear-gradient(to bottom, #444 0%, #222 100%);
    display: flex; align-items: center; justify-content: center;
}
.vinyl-sleeve.no-art::before {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.1) 3px, transparent 4px);
    z-index: 1;
}
.vinyl-sleeve.no-art::after {
    content: 'NO SIGNAL';
    font-family: 'Courier New', Courier, monospace; font-weight: 900; font-size: 24px;
    color: rgba(255,255,255,0.2); 
    letter-spacing: 4px; z-index: 2; background: none;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; width: 100%;
}

/* Nav Buttons */
.art-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6); color: white; border: 1px solid #444; border-radius: 50%;
    width: 30px; height: 30px; display: flex; justify-content: center; align-items: center;
    cursor: pointer; opacity: 0; transition: opacity 0.2s, background 0.2s; z-index: 10;
}
.vinyl-sleeve:hover .art-nav-btn { opacity: 1; }
.art-nav-btn:hover { background: rgba(255, 255, 255, 0.3); }
.art-prev { left: 10px; }
.art-next { right: 10px; }
.vinyl-sleeve.single-art .art-nav-btn { display: none; }

.hide-nav .art-nav-btn, .hide-nav .art-indicators { display: none !important; }

.art-indicators {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 5px; z-index: 20; 
}
.art-dot { width: 6px; height: 6px; background: rgba(255, 255, 255, 0.4); border-radius: 50%; border: 1px solid rgba(0,0,0,0.5); }
.art-dot.active { background: white; box-shadow: 0 0 5px rgba(255, 255, 255, 0.9); }

/* TELETEXT MODES */
.teletext-container {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background-color: #000;
    color: #0ff; 
    font-family: 'Courier New', Courier, monospace;
    padding: 5%;
    z-index: 4; 
    display: none; 
    box-sizing: border-box;
    overflow-y: auto; 
    font-weight: bold;
    text-transform: uppercase;
}

.teletext-container::-webkit-scrollbar { width: 10px; }
.teletext-container::-webkit-scrollbar-track { background: #111; }
.teletext-container::-webkit-scrollbar-thumb { background: #00f; border: 1px solid #111; }

.ttx-header { background: #00f; color: #fff; padding: 3px 8px; display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 14px; border-radius: 2px;}
.ttx-title { color: #ff0; text-align: center; font-size: 20px; margin-bottom: 20px; letter-spacing: 2px;}
.ttx-news-item { margin-bottom: 15px; font-size: 13px; display: flex; line-height: 1.4; }
.ttx-date { color: #0f0; margin-right: 12px; flex-shrink: 0; }
.ttx-text { color: #fff; }

/* --- POSTER OVERLAY --- */
#poster-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    
    
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    
    background-color: #000;
    z-index: 4; 
    display: none;
    cursor: pointer;
}

.ttx-link {
    color: #ff0; 
    text-decoration: underline;
    cursor: pointer;
    margin-left: 8px;
    font-weight: bold;
}
.ttx-link:hover {
    color: #fff;
    background: #00f; 
}




/* TV SIDE PANEL */
.tv-panel {
    width: 70px;
    background: linear-gradient(to right, #ccc, #e6e6e6, #999);
    border-radius: 4px;
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 0; gap: 30px;
    box-shadow: inset 1px 0 3px rgba(255,255,255,0.5), inset -1px 0 5px rgba(0,0,0,0.3);
    border: 1px solid #777;
}

.tv-knob-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; }

/* --- PERFECT KNOB ORBIT FIX --- */
.tv-knob-orbit {
    position: relative;
    width: 44px; 
    height: 44px;
    display: flex; justify-content: center; align-items: center;
}
.tv-knob-scale { 
    position: absolute; 
  
    top: -11px; left: -11px; right: -11px; bottom: -11px; 
    pointer-events: none; 
}
.tv-tick { position: absolute; top: 0; left: 50%; width: 2px; height: 100%; margin-left: -1px; }
.tv-tick::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: #333; }

.tv-knob {
    width: 44px; height: 44px; border-radius: 50%; 
    background: radial-gradient(circle at 30% 30%, #444, #222 60%, #111 100%);
    border: 2px solid #555;
    box-shadow: 0 4px 6px rgba(0,0,0,0.6), inset 0 2px 2px rgba(255,255,255,0.2);
    position: relative; cursor: ns-resize; z-index: 10;
    transform: rotate(0deg); 
    transition: transform 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.tv-knob::after {
    content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 12px; background: #eee; border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.tv-knob-label { font-size: 8px; font-weight: bold; color: #333; margin-top: 10px; letter-spacing: 1px; }

.tv-speaker {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    margin-top: auto; margin-bottom: 10px;
}
.speaker-hole {
    width: 6px; height: 6px; background: #222; border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.8), 1px 1px 1px rgba(255,255,255,0.5);
}

/* =========================================
    COMPONENT 2: HIFI UNIT
    ========================================= */
.hifi-unit {
    position: relative; width: 460px; height: 100%;
    background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 10%, #a0a0a0 100%);
    border-radius: 4px; padding: 30px 25px 40px 25px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 5px 15px rgba(0,0,0,0.9); 
    border: 2px solid #111; 
    display: flex; flex-direction: column; gap: 20px;
    flex-shrink: 0; box-sizing: border-box;
}
.hifi-unit::before {
    content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
    background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.03) 3px, transparent 4px);
    pointer-events: none; border-radius: 4px; z-index: 0;
}
.deck-section, .meter-section, .control-section { position: relative; z-index: 1; }

/* DECK */
.deck-section {
    background: #111; border-radius: 4px; padding: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.3);
    border: 1px solid #555; position: relative; overflow: hidden;
}
.deck-section::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}
.cassette-svg { width: 100%; height: auto; display: block; filter: brightness(0.9); }
.label-overlay {
    position: absolute; top: 12.5%; left: 14%; width: 72%; height: 14%;
    display: flex; justify-content: space-between; align-items: center;
    overflow: hidden; font-family: Helvetica, Arial, sans-serif;
    text-transform: uppercase; color: #ddd; pointer-events: none; z-index: 2;
}
.text-box { position: relative; white-space: nowrap; height: 100%; display: flex; align-items: center; overflow: hidden; }
.artist-box { width: 55%; font-weight: 900; font-size: 14px; letter-spacing: 0.5px; color: #ddd; }
.track-box { width: 40%; font-weight: bold; font-size: 10px; color: #ccc; justify-content: flex-end; }
.marquee-content { display: inline-block; padding-left: 0; }
.text-box.scroll {
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}
.text-box.scroll .marquee-content { display: inline-block; animation: scroll-left 10s linear infinite; }
.text-box.scroll span { padding-right: 30px; }
.track-box.scroll { justify-content: flex-start; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ANIMATIONS */
@keyframes spinReel { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes fastForwardSpin { from { transform: rotate(0deg); } to { transform: rotate(-1080deg); } } 
@keyframes fastRewindSpin { from { transform: rotate(0deg); } to { transform: rotate(1080deg); } } 
@keyframes manualRewindSpin { from { transform: rotate(0deg); } to { transform: rotate(1080deg); } }
@keyframes rewindSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes depleteTape { 0% { transform: scale(1); } 100% { transform: scale(0.38); } }
@keyframes fillTape { 0% { transform: scale(0.38); } 100% { transform: scale(1); } }
@keyframes resetToFull { 0% { transform: scale(0.38); } 100% { transform: scale(1); } }
@keyframes resetToEmpty { 0% { transform: scale(1); } 100% { transform: scale(0.38); } }
@keyframes quickResetLeft { 0% { transform: scale(0.38); } 100% { transform: scale(1); } }
@keyframes quickResetRight { 0% { transform: scale(0.38); } 100% { transform: scale(0.38); } }
@keyframes tapeFlow { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes tapeFlowRev { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 20; } }

.tape-size-left, .tape-size-right, .reel-assembly { transform-origin: 0 0; transform-box: view-box; }
.tape-size-left { transform: scale(1); }
.tape-size-right { transform: scale(0.38); }
.reel-assembly { animation: spinReel 4s linear infinite; animation-play-state: paused; }
.moving-tape-effect { animation: tapeFlow 0.5s linear infinite; animation-play-state: paused; opacity: 0.5; }

.hifi-unit.playing .reel-assembly, .hifi-unit.playing .tape-size-left, .hifi-unit.playing .tape-size-right, .hifi-unit.playing .moving-tape-effect { animation-play-state: running; }
.hifi-unit.fast-forwarding .reel-assembly { animation: fastForwardSpin 0.5s linear infinite; animation-play-state: running; }
.hifi-unit.fast-forwarding .tape-size-left, .hifi-unit.fast-forwarding .tape-size-right { animation-play-state: paused; }
.hifi-unit.fast-forwarding .moving-tape-effect { animation: tapeFlow 0.05s linear infinite; animation-play-state: running; opacity: 0.8; }
.hifi-unit.manual-rewinding .reel-assembly { animation: manualRewindSpin 0.5s linear infinite; animation-play-state: running; }
.hifi-unit.manual-rewinding .tape-size-left, .hifi-unit.manual-rewinding .tape-size-right { animation-play-state: paused; }
.hifi-unit.manual-rewinding .moving-tape-effect { animation: tapeFlowRev 0.05s linear infinite; animation-play-state: running; opacity: 0.8; }
.hifi-unit.rewinding .reel-assembly { animation: rewindSpin 0.3s linear infinite; animation-play-state: running; }
.hifi-unit.rewinding .tape-size-left { animation: quickResetLeft 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.rewinding .tape-size-right { animation: quickResetRight 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.rewinding .moving-tape-effect { opacity: 0; }
.hifi-unit.seeking-next .reel-assembly { animation: fastForwardSpin 0.5s linear infinite; animation-play-state: running; }
.hifi-unit.seeking-next .tape-size-left { animation: resetToEmpty 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.seeking-next .tape-size-right { animation: resetToFull 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.seeking-next .moving-tape-effect { opacity: 0; }
.hifi-unit.seeking-prev .reel-assembly { animation: manualRewindSpin 0.5s linear infinite; animation-play-state: running; }
.hifi-unit.seeking-prev .tape-size-left { animation: resetToFull 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.seeking-prev .tape-size-right { animation: resetToEmpty 1.5s ease-out forwards; animation-play-state: running; }
.hifi-unit.seeking-prev .moving-tape-effect { opacity: 0; }

/* VU METERS */
.meter-section {
    display: flex; gap: 15px; justify-content: center;
    background: #2a2a2a; padding: 12px;
    border-radius: 4px; border: 1px solid #444;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}
.vu-meter {
    position: relative; width: 140px; height: 60px;
    background: #fdfae5; border-radius: 2px; overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.4);
}
.vu-bg-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.vu-needle {
    position: absolute; bottom: 8px; left: 50%; width: 2px; height: 50px;
    background: #cc0000; transform-origin: bottom center; 
    transform: rotate(-60deg); transition: transform 0.05s linear; 
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3); z-index: 2;
}
.vu-meter::after {
    content: ''; position: absolute; top:0; left:0; width:100%; height:60%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    pointer-events: none; z-index: 3;
}

/* CONTROLS */
.control-section { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; margin-top: 10px; }
.main-controls-wrapper { display: flex; flex-direction: column; gap: 15px; align-items: center; }
.transport-row { display: flex; gap: 15px; align-items: center; }
.eq-shuffle-row { display: flex; gap: 20px; align-items: center; }

.hifi-btn {
    appearance: none; width: 45px; height: 35px;
    background: linear-gradient(to bottom, #e6e6e6, #bfbfbf);
    border: 1px solid #888; border-bottom: 4px solid #666;
    border-radius: 3px; cursor: pointer; padding: 0; margin: 0;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.05s; box-shadow: 0 3px 5px rgba(0,0,0,0.3); position: relative;
    box-sizing: border-box;
}
.hifi-btn svg { width: 18px; height: 18px; fill: #222; }
.hifi-btn:active { transform: translateY(3px); border-bottom-width: 1px; box-shadow: 0 1px 1px rgba(0,0,0,0.2); }

.hifi-btn-small { width: 40px !important; height: 25px !important; border-bottom: 3px solid #666; }
.hifi-btn-small svg { width: 16px; height: 16px; fill: #222; }
.hifi-btn-small:active, .hifi-btn-small.pressed {
    transform: translateY(2px) !important; border-bottom-width: 1px !important; box-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

#btn-shuffle.pressed {
    background: linear-gradient(to bottom, #ccc, #999); box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
}
.led-indicator {
    position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%;
    background: #330000; border: 1px solid #555; box-shadow: 0 1px 1px rgba(255,255,255,0.5);
}
#btn-shuffle.pressed .led-indicator { background: #ff0000; box-shadow: 0 0 5px #ff0000; }

.eq-knob-container { display: flex; flex-direction: column; align-items: center; position: relative; }
.eq-surround { position: relative; width: 34px; height: 34px; }
.eq-knob {
    width: 100%; height: 100%; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #ccc 20%, #999 60%, #555 100%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5), inset 0 0 0 1px #444; position: relative; cursor: ns-resize; transform: rotate(0deg); z-index: 5;
}
.eq-knob::after { content: ''; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 2px; height: 10px; background: #222; border-radius: 1px; }
.eq-label { font-size: 7px; color: #444; font-weight: bold; margin-top: 2px; font-family: monospace; letter-spacing: 0.5px; }
.eq-scale { position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px; pointer-events: none; }
.eq-tick { position: absolute; top: 0; left: 50%; width: 1px; height: 100%; margin-left: -0.5px; }
.eq-tick::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: #555; }

.volume-section { display: flex; flex-direction: column; align-items: center; position: relative; margin-top: 5px; margin-left: 20px; }
.knob-surround { position: relative; width: 70px; height: 70px; }
.knob {
    width: 100%; height: 100%; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #ccc 20%, #999 60%, #555 100%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 0 0 1px #444, inset 0 1px 2px rgba(255,255,255,0.8);
    position: relative; cursor: ns-resize; transform: rotate(0deg); z-index: 10; touch-action: none; 
}
.knob:active { cursor: ns-resize; }
.knob::after { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 4px; height: 20px; background: #222; border-radius: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,0.8); }
.knob-scale { position: absolute; top: -12px; left: -12px; right: -12px; bottom: -12px; pointer-events: none; }
.tick { position: absolute; top: 0; left: 50%; width: 2px; height: 100%; margin-left: -1px; }
.tick::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 7px; background: #333; }
.tick-label { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: bold; color: #444; font-family: monospace; }
.db-label { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); color: #444; font-size: 9px; font-weight: bold; pointer-events: none; }

/* =========================================
    TV PUSH BUTTON (Discography)
    ========================================= */
.tv-btn-container {
    display: flex; 
    flex-direction: column; 
    align-items: center;
}
.tv-push-btn {
    appearance: none; 
    width: 44px;
    height: 24px; 
    background: linear-gradient(to bottom, rgb(221, 51, 255), rgb(108, 0, 170)); 
    border: 2px solid #222; 
    border-radius: 4px;
    box-shadow: 0 4px 0 rgb(85, 0, 85), 0 5px 10px rgba(0,0,0,0.8), inset 0 2px 2px rgba(255,255,255,0.5);
    cursor: pointer; 
    padding: 0; 
    transition: all 0.1s;
}
.tv-push-btn:active {
    transform: translateY(4px); 
    box-shadow: 0 0 0 #500, 0 1px 2px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.2);
}

/* --- MODAL --- */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.95); overflow: auto; backdrop-filter: blur(5px);
}
.modal-content { margin: 5% auto; padding: 20px; width: 90%; max-width: 1000px; color: #ddd; font-family: Helvetica, Arial, sans-serif; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid #444; padding-bottom: 15px; }
.modal-header h2 { text-transform: uppercase; letter-spacing: 1px; font-size: 24px; margin: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px; }
.album-card { background: #222; border-radius: 4px; overflow: hidden; transition: transform 0.2s; cursor: pointer; border: 1px solid #333; }
.album-card:hover { transform: translateY(-5px); border-color: #555; }
.album-thumb { 
    width: 100%; 
    padding-bottom: 100%; 
    height: 0;
    aspect-ratio: 1/1; 
    background-size: cover; 
    background-position: center; 
    background-color: #111; 
}
.album-info { padding: 15px; }
.album-title { font-weight: bold; font-size: 14px; margin-bottom: 4px; color: #fff; text-transform: uppercase; }
.album-artist { font-size: 13px; color: #aaa; margin-bottom: 4px; font-style: italic; text-transform: capitalize; }
.album-year { font-size: 11px; color: #777; margin-bottom: 8px; font-family: monospace; }
.album-count { font-size: 10px; color: #555; text-transform: uppercase; }
.track-list-view { display: none; }
.track-list-header { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: center; }
.track-view-top { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; }
.track-view-art {
    width: 150px; height: 150px; background-size: cover; background-position: center;
    background-color: #111; border-radius: 4px; border: 1px solid #333; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.track-view-info { display: flex; flex-direction: column; }
.track-row { padding: 12px; border-bottom: 1px solid #333; cursor: pointer; display: flex; justify-content: space-between; font-size: 14px; text-transform: capitalize; letter-spacing: 0.5px; }
.track-row:hover { background: #333; }
.track-row:last-child { border-bottom: none; }
.track-time { font-family: monospace; font-size: 12px; color: #666; }
.hifi-text-btn {
    appearance: none; background: linear-gradient(to bottom, #e6e6e6, #bfbfbf);
    border: 1px solid #888; border-bottom: 3px solid #666; border-radius: 3px;
    cursor: pointer; color: #222; font-family: Helvetica, Arial, sans-serif;
    font-weight: bold; font-size: 11px; text-transform: uppercase; padding: 8px 15px;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3); transition: all 0.05s; margin-left: 10px;
}
.hifi-text-btn:active { transform: translateY(2px); border-bottom: 1px solid #666; box-shadow: 0 1px 1px rgba(0,0,0,0.2); }
#credits-container { margin-top: 0; border-top: 1px solid #333; padding-top: 20px; }
.credits-box {
    display: none; background: #1a1a1a; padding: 20px; border: 1px solid #444; 
    margin-top: 15px; border-radius: 4px; font-family: monospace; font-size: 12px; line-height: 1.5; color: #bbb; white-space: pre-wrap; 
}
.track-view-info h3 { text-transform: uppercase; letter-spacing: 1px; font-size: 20px; color: #fff; margin: 0 0 5px 0; }
.track-view-info h4 { text-transform: capitalize; font-size: 14px; color: #aaa; margin: 0 0 10px 0; font-weight: normal; }
.total-time-display { font-family: monospace; font-size: 12px; color: #666; display: block; }

/* --- UNRELEASED TRACKS --- */
.track-row.unreleased {
    opacity: 0.4;
    pointer-events: none; 
}
.track-row.unreleased .track-time {
    color: #f33; 
    font-size: 11px;
    letter-spacing: 1px;
}


#tv-mode-knob {
    cursor: pointer;
}

/* =========================================
   NEW TV VIDEO PLAYER CSS
   ========================================= */
.tv-video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block; 
    object-fit: contain; 
    object-position: center; 
    background-color: #000; 
    z-index: 3; 
    pointer-events: none; 
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.tv-video.show-video {
    opacity: 1 !important; 
}

/* --- TABLET / STACKED LAYOUT --- */
@media (max-width: 1350px) {
    .desk-layout {
        flex-direction: column; 
        align-items: center; 
        gap: 3px; 
    }
    .art-anchor, .amp-anchor {
        width: 100%; 
        justify-content: center; 
    }
    .tv-screen-wrapper { 
        align-items: center; 
    } 
    
    .vinyl-sleeve {
        width: 460px; 
        height: 460px; 
        aspect-ratio: 1/1; 
    }
    .hifi-unit {
        height: auto; 
    }
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
    .desk-layout { gap: 3px; flex-direction: column; }
    .art-anchor { justify-content: center; width: 100%; }
    .amp-anchor { justify-content: center; width: 100%; }
    
    .wood-case { width: 95%; max-width: 450px; padding: 10px; margin: 0 auto; }
    
   
    .tv-screen-wrapper { width: 100%; position: relative; }
    .tv-screen-wrapper::before { content: ""; display: block; padding-bottom: 100%; }
    
    .vinyl-sleeve { 
        position: absolute !important;
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100% !important; 
        height: 100% !important; 
        min-width: 0; 
        min-height: 0;
        border-width: 8px; 
        border-radius: 12px;
    }
    
    .tv-panel { width: 45px; padding: 10px 0; gap: 15px; }
    
  
    .tv-knob-orbit { width: 30px; height: 30px; }
    .tv-knob-scale { top: -6px; left: -6px; right: -6px; bottom: -6px; }
    
    .tv-knob { width: 30px; height: 30px; border-width: 1px; }
    .tv-knob::after { height: 8px; width: 3px; }
    .tv-knob-label { font-size: 7px; margin-top: 5px; }
    .tv-speaker { gap: 2px; margin-bottom: 5px; grid-template-columns: repeat(2, 1fr); }
    .speaker-hole { width: 4px; height: 4px; }
    
    .hifi-unit { width: 100%; padding: 20px 10px 30px 10px; }
    .control-section { flex-direction: column; gap: 20px; padding: 0; }
    .main-controls-wrapper { width: 100%; margin-bottom: 5px; }
    .volume-section { margin: 0; margin-top: 5px; align-self: center; }
    
    .track-view-top { flex-direction: column; align-items: flex-start; gap: 15px; }
    .track-view-art { width: 120px; height: 120px; }
}

/* --- iOS BG MODE SWITCH --- */
.bg-switch {
    width: 24px;
    height: 40px;
    background: #222;
    border-radius: 3px;
    border: 2px solid #555;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.8), 0 1px 1px rgba(255,255,255,0.2);
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
}
.bg-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(to bottom, #ddd, #999);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.8);
    transition: transform 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.bg-switch.active .bg-switch-thumb {
    transform: translateY(16px);
    background: linear-gradient(to bottom, #ff5555, #cc0000); 
}
/* --- THE STEALTH FULLSCREEN BUTTON --- */
.fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent; 
    border: none;
    cursor: pointer;
    z-index: 100;
    opacity: 0.2; 
    transition: opacity 0.3s ease;
    padding: 5px;
}


.tv-screen-wrapper:hover .fullscreen-btn,
.fullscreen-btn:hover {
    opacity: 0.9;
}

.fullscreen-btn svg {
    width: 24px;
    height: 24px;
   
    filter: drop-shadow(0px 0px 2px rgba(0,0,0,0.8)); 
}

/* --- THE FULLSCREEN ESCAPE HATCH --- */
.tv-screen-wrapper.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 999999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
   
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Forces the art to fit inside the screen without zooming/cropping on mobile */
.tv-screen-wrapper.is-fullscreen .vinyl-sleeve {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background-size: contain !important; 
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Fixes video zooming if a video is playing */
.tv-screen-wrapper.is-fullscreen .tv-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}






