/* ==========================================================================
   RETRO-FUTURISTIC AI RADIO STYLING (COMPACT & CENTERED)
   ========================================================================== */

:root {
    --color-chassis-wood: #1e140d;
    --color-chassis-dark: #121418;
    --color-faceplate: #1a1d24;
    --color-faceplate-metal: #232730;
    --color-accent-amber: #ff9900;
    --color-accent-vfd: #33ffaa;
    --color-vfd-bg: #03150e;
    --color-vfd-dim: rgba(51, 255, 170, 0.4);
    --color-vfd-glow: rgba(51, 255, 170, 0.8);
    --color-needle: #ff2a2a;
    --color-needle-glow: rgba(255, 42, 42, 0.9);
    --font-display: 'Orbitron', 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background: radial-gradient(circle at 50% 40%, #151821 0%, #07080a 100%);
    color: #e0e6ed;
    font-family: var(--font-mono);
    overflow: hidden;
}

/* Perfect Center Wrapper */
.radio-app-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 10px;
    box-sizing: border-box;
}

/* Radio Cabinet (Compact Body) */
.radio-cabinet {
    width: 100%;
    max-width: 680px;
    background: linear-gradient(180deg, #2c1a0e 0%, #170d06 100%);
    border-radius: 14px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.9),
        0 0 0 6px #100804,
        0 0 0 8px #422917,
        inset 0 2px 3px rgba(255, 255, 255, 0.15),
        inset 0 -3px 6px rgba(0, 0, 0, 0.7);
    padding: 10px 12px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.radio-cabinet.power-off {
    filter: brightness(0.65);
}

/* Cabinet Trims */
.cabinet-top-trim, .cabinet-bottom-trim {
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chassis-screws {
    display: flex;
    gap: 30px;
    margin: 0 auto;
}

.screw {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #888 0%, #333 100%);
    border-radius: 50%;
    box-shadow: inset 0 1px 1px #fff, 0 1px 2px #000;
    display: inline-block;
}

/* Front Faceplate (Brushed Metal) */
.cabinet-faceplate {
    background: linear-gradient(180deg, #252a33 0%, #1c2027 50%, #15181e 100%);
    border: 2px solid #363c48;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        inset 0 0 15px rgba(0, 0, 0, 0.6),
        0 3px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Header & Brand Badge */
.faceplate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2d333f;
    padding-bottom: 8px;
    flex-wrap: nowrap;
    gap: 8px;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo {
    font-size: 18px;
    color: var(--color-accent-amber);
    text-shadow: 0 0 8px rgba(255, 153, 0, 0.8);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #f0f3f8;
    display: block;
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    color: #838e9e;
    display: block;
}

/* VU Meters (Compact) */
.vu-meters-cluster {
    display: flex;
    gap: 8px;
}

.vu-meter {
    background: #0d1015;
    border: 1px solid #363d4a;
    border-radius: 4px;
    padding: 3px 6px 2px 6px;
    width: 58px;
    text-align: center;
    box-shadow: inset 0 2px 4px #000;
}

.vu-face {
    height: 24px;
    background: radial-gradient(ellipse at bottom, #ffe699 0%, #d4a036 80%, #996e1a 100%);
    border-radius: 3px 3px 1px 1px;
    position: relative;
    overflow: hidden;
}

.vu-scale-art {
    display: flex;
    justify-content: space-between;
    font-size: 0.45rem;
    font-weight: bold;
    color: #222;
    padding: 1px 2px;
}

.vu-scale-art .vu-max {
    color: #b30000;
}

.vu-needle-pivot {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #111;
    border-radius: 50%;
}

.vu-needle {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 1px;
    height: 20px;
    background: #111;
    transform-origin: bottom center;
    transform: rotate(-35deg);
    transition: transform 0.05s ease-out;
}

.vu-label {
    font-size: 0.5rem;
    color: #8c96a5;
    margin-top: 1px;
    display: block;
}

/* Status Pills */
.broadcast-status-pills {
    display: flex;
    gap: 6px;
}

.pill-badge {
    background: #13171d;
    border: 1px solid #313845;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: #6d7889;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pill-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #444;
}

.on-air-badge.pill-pulse {
    color: #ff3344;
    border-color: #ff3344;
    background: rgba(255, 51, 68, 0.1);
    text-shadow: 0 0 6px rgba(255, 51, 68, 0.8);
}

.on-air-badge.pill-pulse .pill-dot {
    background: #ff3344;
    box-shadow: 0 0 6px #ff3344;
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* ==========================================================================
   TUNING DIAL PANEL (COMPACT)
   ========================================================================== */
.tuning-dial-panel {
    background: #0e1116;
    border: 1px solid #2d3442;
    border-radius: 6px;
    padding: 6px 12px;
    box-shadow: inset 0 2px 6px #000;
    position: relative;
    overflow: hidden;
}

.dial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: #8591a5;
    margin-bottom: 4px;
}

.dial-indicators {
    display: flex;
    gap: 10px;
}

.led-badge {
    font-size: 0.55rem;
    letter-spacing: 1px;
    color: #4a5464;
    display: flex;
    align-items: center;
    gap: 3px;
}

.led-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #252b36;
    display: inline-block;
}

.led-badge.led-active.led-green {
    color: #33ffaa;
    text-shadow: 0 0 5px #33ffaa;
}

.led-badge.led-active.led-green .led-dot {
    background: #33ffaa;
    box-shadow: 0 0 6px #33ffaa;
}

.led-badge.led-active.led-amber {
    color: #ffaa00;
    text-shadow: 0 0 5px #ffaa00;
}

.led-badge.led-active.led-amber .led-dot {
    background: #ffaa00;
    box-shadow: 0 0 6px #ffaa00;
}

/* Scale & Ticks */
.dial-scale-container {
    height: 44px;
    position: relative;
    background: linear-gradient(180deg, #090c10 0%, #151a22 50%, #090c10 100%);
    border: 1px solid #262c37;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px #000;
}

.dial-scale-background {
    position: absolute;
    inset: 0;
}

.dial-tick-group {
    position: absolute;
    top: 2px;
    transform: translateX(-50%);
    text-align: center;
}

.tick-major {
    width: 1.5px;
    height: 12px;
    background: #ffaa00;
    margin: 0 auto;
}

.freq-label {
    font-size: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: #ffe6a0;
    margin-top: 1px;
    display: block;
}

.tick-minor {
    position: absolute;
    top: 2px;
    width: 1px;
    height: 6px;
    background: rgba(255, 170, 0, 0.4);
    transform: translateX(-50%);
}

.station-dial-marker {
    position: absolute;
    bottom: 2px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 5;
}

.marker-pip {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-bottom: 1px;
}

.marker-text {
    font-size: 0.48rem;
    color: #9aa7bc;
    white-space: nowrap;
}

.station-dial-marker.marker-active .marker-text {
    color: #fff;
    font-weight: bold;
}

/* Red Tuning Needle */
.tuning-needle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    transition: left 0.1s ease-out;
}

.needle-line {
    position: absolute;
    inset: 0;
    background: var(--color-needle);
    box-shadow: 0 0 6px var(--color-needle-glow);
}

.needle-head {
    position: absolute;
    top: 0;
    left: -3px;
    width: 8px;
    height: 6px;
    background: #ff2a2a;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Signal Meter Bar */
.signal-meter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.6rem;
    color: #8591a5;
}

.meter-track {
    flex: 1;
    height: 4px;
    background: #090c10;
    border: 1px solid #262c37;
    border-radius: 2px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9900 0%, #33ffaa 80%, #00f0ff 100%);
    transition: width 0.1s ease;
}

.current-freq-readout {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-accent-amber);
    font-size: 0.65rem;
}

/* ==========================================================================
   MIDDLE GRID: VINYL DECK & VFD SCREEN (COMPACT)
   ========================================================================== */
.faceplate-middle-grid {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .faceplate-middle-grid {
        grid-template-columns: 1fr;
    }
}

/* Vinyl Platter */
.artwork-deck {
    background: #0e1116;
    border: 1px solid #2d3442;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px #000;
}

.vinyl-turntable {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #111;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.7),
        0 0 0 3px #222630;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vinyl-disc {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, #222 0%, #151515 40%, #080808 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vinyl-grooves {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 
        inset 0 0 0 6px rgba(0,0,0,0.8),
        inset 0 0 0 14px rgba(255,255,255,0.02),
        inset 0 0 0 24px rgba(0,0,0,0.9);
}

.vinyl-center-label {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ff9900;
    box-shadow: 0 0 6px rgba(0,0,0,0.8);
    position: relative;
    z-index: 2;
    background: #000;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fallback-cover-badge {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 0.9rem;
}

.vinyl-turntable.vinyl-spinning .vinyl-disc {
    animation: spin 5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.deck-station-caption {
    margin-top: 6px;
    text-align: center;
}

.caption-genre {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: #8591a5;
    text-transform: uppercase;
}

/* ==========================================================================
   VFD PHOSPHOR SCREEN & SMART LYRICS (COMPACT)
   ========================================================================== */
.vfd-screen {
    background: var(--color-vfd-bg);
    border: 1px solid #143525;
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--color-accent-vfd);
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
    height: 155px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        inset 0 0 15px rgba(0, 40, 25, 0.9),
        0 0 10px rgba(51, 255, 170, 0.12);
}

.vfd-screen.vfd-off {
    background: #040806;
    border-color: #0b1812;
    color: #123022;
}

.vfd-glass-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.vfd-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 2px, transparent 2px, transparent 4px);
    pointer-events: none;
    z-index: 5;
}

.vfd-top-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--color-vfd-dim);
    margin-bottom: 4px;
}

.vfd-track-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 6px var(--color-vfd-glow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vfd-track-artist {
    font-size: 0.62rem;
    color: var(--color-vfd-dim);
    margin-top: 1px;
}

.vfd-style-tag {
    color: var(--color-accent-amber);
    margin-left: 4px;
}

.vfd-station-info {
    font-size: 0.58rem;
    color: #38bdf8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.85;
}

.vfd-lyrics-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid var(--color-vfd-dim);
    padding-top: 4px;
    margin-top: 4px;
}

.vfd-panel-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.52rem;
    letter-spacing: 1px;
    color: var(--color-vfd-dim);
    margin-bottom: 2px;
}

.vfd-lyrics-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-vfd) transparent;
}

.vfd-lyrics-container::-webkit-scrollbar {
    width: 3px;
}

.vfd-lyrics-container::-webkit-scrollbar-thumb {
    background: var(--color-accent-vfd);
}

.vfd-lyrics-text {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    line-height: 1.35;
    margin: 0;
    white-space: pre-wrap;
    color: #e0fff4;
    text-shadow: 0 0 4px rgba(51, 255, 170, 0.4);
}

.vfd-no-signal {
    text-align: center;
    padding: 10px 4px;
    font-size: 0.65rem;
    color: var(--color-vfd-dim);
}

.vfd-noise-art {
    letter-spacing: 2px;
    margin-bottom: 4px;
    color: var(--color-accent-amber);
}

/* ==========================================================================
   CONTROLS, PRESETS & KNOBS (COMPACT)
   ========================================================================== */
.radio-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.presets-container {
    background: #11141a;
    border: 1px solid #2b323f;
    border-radius: 4px;
    padding: 6px 8px;
}

.panel-section-label {
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    color: #727f93;
    display: block;
    margin-bottom: 4px;
}

.preset-buttons-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.preset-btn {
    background: linear-gradient(180deg, #2b323e 0%, #1c212a 100%);
    border: 1px solid #3c4556;
    border-radius: 3px;
    padding: 4px 6px;
    color: #cbd5e1;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.preset-btn:hover {
    background: linear-gradient(180deg, #384252 0%, #242b37 100%);
}

.preset-btn.preset-active {
    border-color: var(--color-accent-amber);
    background: linear-gradient(180deg, #44321b 0%, #291c0e 100%);
    color: #ffaa00;
}

.preset-num {
    font-weight: bold;
    color: var(--color-accent-amber);
    font-size: 0.65rem;
}

.preset-name {
    font-size: 0.55rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55px;
}

.preset-freq {
    font-size: 0.55rem;
    color: #8b98ac;
}

/* Knobs Row */
.knobs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    background: #11141a;
    border: 1px solid #2b323f;
    border-radius: 6px;
    padding: 8px 12px;
}

.control-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.control-label {
    font-size: 0.55rem;
    letter-spacing: 1px;
    color: #838fa3;
    font-weight: bold;
}

/* Power Toggle */
.toggle-switch-wrapper {
    cursor: pointer;
    user-select: none;
}

.toggle-plate {
    background: #1e232c;
    border: 1px solid #363d4a;
    border-radius: 3px;
    padding: 2px 4px;
    width: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-size: 0.48rem;
    font-weight: bold;
    color: #636f82;
}

.toggle-lever {
    width: 10px;
    height: 22px;
    background: linear-gradient(180deg, #999 0%, #444 100%);
    border-radius: 5px;
    margin: 2px 0;
    position: relative;
    transition: transform 0.15s ease;
}

.lever-up {
    transform: rotate(-18deg);
    background: linear-gradient(180deg, #ffaa00 0%, #885500 100%);
}

.lever-down {
    transform: rotate(18deg);
}

.lever-tip {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 6px;
    background: #ccc;
    border-radius: 3px;
}

/* Transport Buttons */
.transport-buttons {
    display: flex;
    gap: 4px;
}

.retro-btn {
    background: linear-gradient(180deg, #363e4d 0%, #1e232c 100%);
    border: 1px solid #485264;
    border-radius: 4px;
    width: 32px;
    height: 30px;
    color: #d1d9e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.retro-btn-play {
    width: 38px;
    border-color: var(--color-accent-amber);
    color: var(--color-accent-amber);
}

.retro-btn-play.active-playing {
    background: linear-gradient(180deg, #4d351b 0%, #291d0e 100%);
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.4);
}

.knob-sub-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-btn {
    background: #1c212a;
    border: 1px solid #363d4a;
    border-radius: 2px;
    color: #9aa7bc;
    font-size: 0.52rem;
    padding: 1px 4px;
    cursor: pointer;
}

.mini-btn.muted {
    color: #ff3344;
    border-color: #ff3344;
}

.retro-slider {
    width: 55px;
    accent-color: var(--color-accent-amber);
    cursor: pointer;
}

.native-audio-toggle {
    background: transparent;
    border: none;
    color: #4a5568;
    font-size: 0.5rem;
    font-family: var(--font-mono);
    cursor: pointer;
    margin-left: auto;
    padding: 2px 6px;
    letter-spacing: 1px;
}

.native-audio-toggle:hover {
    color: var(--color-accent-amber);
}

.native-audio-wrapper {
    background: #090c10;
    border: 1px solid #2d3442;
    border-radius: 4px;
    padding: 4px 8px;
    margin-top: 6px;
}
