@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

@font-face {
    font-family: 'LedDotMatrix';
    src: url('fonts/led-dot-matrix.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(255, 190, 90, 0.10), rgba(0, 0, 0, 0.82)),
        url('/logos/background.webp') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    min-height: 100vh;
    padding: 18px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #f5e6c8;
}

.radio-container,
.station-info-container {
    width: 94%;
    max-width: 760px;
    position: relative;
    color: #f5e6c8;
    border-radius: 22px;
    border: 4px solid #24130b;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.05), transparent 18%, rgba(0,0,0,0.28) 50%, rgba(255,255,255,0.04)),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,0.035) 0px,
            rgba(255,255,255,0.035) 2px,
            rgba(0,0,0,0.04) 4px,
            rgba(0,0,0,0.04) 8px
        ),
        linear-gradient(145deg, #704427, #3b2114 48%, #1f1009);
    box-shadow:
        inset 0 0 0 2px rgba(255, 204, 120, 0.16),
        inset 0 18px 30px rgba(255,255,255,0.06),
        inset 0 -22px 38px rgba(0,0,0,0.45),
        0 18px 38px rgba(0,0,0,0.65);
}

.radio-container {
    padding: 64px 24px 24px 210px;
    min-height: 390px;
    margin-bottom: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.radio-container::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 58px;
    width: 160px;
    height: 240px;
    border-radius: 18px;
    border: 3px solid #160b06;
    background:
        radial-gradient(circle, rgba(255, 196, 105, 0.13) 1px, transparent 2px),
        repeating-linear-gradient(45deg, rgba(0,0,0,0.55) 0 4px, rgba(255,255,255,0.04) 4px 8px),
        linear-gradient(145deg, #2a1a12, #0b0705);
    background-size: 9px 9px, auto, auto;
    box-shadow:
        inset 0 0 24px rgba(0,0,0,0.9),
        0 0 0 1px rgba(255, 195, 95, 0.14);
}

.radio-container::after {
    content: "jejecast.com";
    position: absolute;
    left: 46px;
    bottom: 43px;
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: bold;
    font-size: 22px;
    color: #e8b65e;
    text-shadow: 0 0 8px rgba(232, 182, 94, 0.45), 0 2px 2px #000;
    transform: rotate(-5deg);
}

.radio-label {
    position: absolute;
    top: 20px;
    left: 28px;
    right: 28px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    color: #d7b35e;
    text-shadow: 0 0 7px rgba(255, 204, 90, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.95;
}

.top-display-panel {
    display: grid;
    grid-template-columns: 1fr 95px;
    gap: 10px;
    margin-bottom: 12px;
}

.station-title-window,
.weather-display,
.digital-clock,
.frequency-scale,
.station-info-container {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), transparent 32%),
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.035) 0px,
            rgba(255,255,255,0.035) 1px,
            transparent 1px,
            transparent 3px
        ),
        linear-gradient(145deg, #071308, #020402);
    border: 2px solid #15150e;
    box-shadow:
        inset 0 0 18px rgba(0,0,0,0.95),
        inset 0 0 8px rgba(126,255,100,0.18),
        0 0 0 1px rgba(255, 210, 110, 0.10),
        0 8px 18px rgba(0,0,0,0.45);
}

.station-title-window {
    height: 70px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'LedDotMatrix', sans-serif;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
}

.on-air-dot {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5c1410;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.6);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.on-air-dot.is-live {
    background: #7dff6a;
    box-shadow: 0 0 8px rgba(125, 255, 106, 0.9), 0 0 16px rgba(125, 255, 106, 0.5);
    animation: onAirPulse 1.4s ease-in-out infinite;
}

@keyframes onAirPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .on-air-dot.is-live {
        animation: none;
    }
}

#topStationName {
    font-size: 22px;
    color: #9cff83;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(120, 255, 100, 0.85);
    white-space: nowrap;
    max-width: 100%;
}

#topStationMeta {
    margin-top: 7px;
    font-size: 10px;
    color: #e7d26c;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 220, 80, 0.45);
}

.digital-clock {
    height: 70px;
    border-radius: 10px;
    font-family: 'LedDotMatrix', sans-serif;
    font-size: 16px;
    color: #9cff83;
    text-shadow: 0 0 8px rgba(120, 255, 100, 0.85);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tuning-row {
    display: grid;
    grid-template-columns: 1fr 86px;
    gap: 12px;
    align-items: center;
    margin: 14px auto 12px;
}

.frequency-scale {
    --tuner-position: 50%;
    width: 100%;
    height: 90px;
    margin: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-family: 'LedDotMatrix', sans-serif;
    color: #d8d36a;
    text-shadow: 0 0 9px rgba(255, 220, 80, 0.55);
    display: block;
    position: relative;
    overflow: hidden;
}

.frequency-scale::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 45px;
    height: 2px;
    background: linear-gradient(90deg, #6f8f35, #d8d36a, #6f8f35);
    box-shadow: 0 0 10px rgba(255, 220, 80, 0.55);
}

.frequency-scale::after {
    content: "";
    position: absolute;
    left: var(--tuner-position);
    top: 16px;
    bottom: 10px;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, transparent, #ffb347, #ff2b18, #ffb347, transparent);
    box-shadow: 0 0 12px rgba(255, 55, 25, 0.95);
    transition: left 0.45s ease;
}

.tuner-row {
    position: relative;
    display: block;
    height: 22px;
    font-family: 'LedDotMatrix', sans-serif;
    color: #d8d36a;
    font-size: 13px;
    text-shadow: 0 0 8px rgba(255, 220, 80, 0.45);
}

.tuner-row.fm {
    margin-bottom: 34px;
}

.tuner-row.am {
    color: #e5b95c;
}

.tuner-label {
    position: absolute;
    left: -2px;
    color: #9cff83;
    font-size: 10px;
}

.fm-mark,
.am-mark {
    position: absolute;
    transform: translateX(-50%);
}

.mhz-label,
.khz-label {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 9px;
    transform: none;
}

.fm-mark[style*="92%"],
.am-mark[style*="91%"] {
    transform: translateX(-100%);
}

.tuning-knob {
    --knob-rotation: 0deg;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 3px solid #1b0d05;
    cursor: pointer;
    position: relative;
    justify-self: center;
    background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,0.45), transparent 20%),
        radial-gradient(circle at center, #d9ad67 0%, #8a5525 42%, #2a1408 100%);
    box-shadow:
        inset 0 4px 8px rgba(255,255,255,0.28),
        inset 0 -8px 14px rgba(0,0,0,0.55),
        0 5px 0 #160b05,
        0 10px 18px rgba(0,0,0,0.55);
    transform: rotate(var(--knob-rotation));
    transition: transform 0.2s ease, filter 0.12s ease;
}

.tuning-knob:hover {
    filter: brightness(1.1);
}

.tuning-knob:active {
    /* Layers the "press" offset on top of the current rotation instead of
       being silently overridden by an inline style. */
    transform: translateY(3px) rotate(var(--knob-rotation));
}

.tuning-knob-inner {
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,0.38), transparent 24%),
        repeating-conic-gradient(from 0deg, rgba(255,255,255,0.10) 0deg 8deg, rgba(0,0,0,0.20) 8deg 16deg),
        radial-gradient(circle, #b97a35 0%, #4d2810 72%);
    box-shadow:
        inset 0 0 12px rgba(0,0,0,0.65),
        0 0 0 1px rgba(255,220,145,0.22);
}

.tuning-knob-inner::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 5px;
    width: 4px;
    height: 15px;
    border-radius: 4px;
    background: #ffdc84;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255, 220, 132, 0.8);
}

.tuning-knob-label {
    display: none;
}

.weather-display {
    width: 100%;
    height: 52px;
    border-radius: 10px;
    margin: 12px auto 0;
    color: #e7d26c;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#weatherInfo {
    font-family: 'LedDotMatrix', sans-serif;
    font-size: 13px;
    color: #9cff83;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(120, 255, 100, 0.85);
}

.weather-display span {
    display: block;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.station-controls {
    margin-top: 14px;
    padding: 16px 14px;
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.12), transparent 45%, rgba(0,0,0,0.25)),
        linear-gradient(145deg, #8b6236, #4b2d17);
    border: 2px solid #201008;
    box-shadow:
        inset 0 0 0 1px rgba(255, 220, 145, 0.18),
        inset 0 12px 18px rgba(255,255,255,0.06),
        0 8px 20px rgba(0,0,0,0.45);
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

#stationSelect {
    max-width: 260px;
    background: #160d08;
    color: #e5bd62;
    border: 1px solid rgba(255, 210, 120, 0.35);
    border-radius: 8px;
    padding: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    outline: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.85);
}

.control-button,
.retro-button,
.station-website {
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,0.34), transparent 28%),
        linear-gradient(145deg, #d8a85e, #7a4a20 52%, #2b160a);
    color: #231306;
    border: 2px solid #1b0d05;
    border-radius: 999px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    padding: 12px 16px;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
    box-shadow:
        inset 0 2px 5px rgba(255,255,255,0.35),
        inset 0 -5px 8px rgba(0,0,0,0.45),
        0 5px 0 #160b05,
        0 9px 16px rgba(0,0,0,0.45);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.control-button:hover,
.retro-button:hover,
.station-website:hover {
    filter: brightness(1.12);
}

.control-button:active,
.retro-button:active,
.station-website:active {
    transform: translateY(3px);
}

#playButton {
    min-width: 78px;
    color: #bfffb1;
    background:
        radial-gradient(circle at 40% 30%, rgba(255,255,255,0.35), transparent 30%),
        linear-gradient(145deg, #5d8a42, #2d4c24 48%, #172411);
    text-shadow: 0 0 8px rgba(160, 255, 130, 0.55);
}

#playButton.is-playing {
    color: #eaffb1;
    box-shadow:
        inset 0 3px 6px rgba(0,0,0,0.55),
        inset 0 -2px 4px rgba(255,255,255,0.12),
        0 0 12px rgba(125, 255, 106, 0.45);
    transform: translateY(2px);
}

#stopButton {
    min-width: 78px;
}

.station-info-container {
    max-width: 760px;
    margin-top: 10px;
    padding: 22px 24px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    min-height: 240px;
    overflow: hidden;
}

.station-logo {
    visibility: visible;
    display: block;
    width: 210px;
    max-height: 210px;
    object-fit: contain;
    margin: 0 24px 0 0;
    float: left;
    border-radius: 14px;
    padding: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 35%),
        linear-gradient(145deg, #2a1a12, #120a06);
    border: 2px solid #15150e;
    box-shadow:
        inset 0 0 14px rgba(0,0,0,0.75),
        0 0 12px rgba(0, 0, 0, 0.35);
}

.station-description {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: #d9c56e;
    text-transform: uppercase;
    text-align: left;
    margin: 8px 0 14px;
    line-height: 1.9;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(255, 220, 90, 0.35);
}

.station-website {
    display: inline-block;
    text-decoration: none;
    color: #251305;
    padding: 10px 16px;
    margin-top: 4px;
}

.legal-links-inline {
    clear: both;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    color: #d7b35e;
    opacity: 0.85;
    text-align: center;
    margin-top: 22px;
    padding-top: 12px;
    line-height: 2.2;
}

.legal-links-inline a {
    color: #d7b35e;
    text-decoration: none;
    margin: 0 5px;
}

.legal-links-inline a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    body {
        padding-left: 0;
        padding-right: 0;
    }

    .radio-container,
    .station-info-container {
        width: 100%;
        max-width: none;
        border-left: 0;
        border-right: 0;
        border-radius: 28px;
    }

    .radio-container {
        padding: 58px 18px 20px;
        min-height: auto;
    }

    .radio-container::before,
    .radio-container::after {
        display: none;
    }

    .radio-label {
        font-size: 6px;
        top: 18px;
        left: 16px;
        right: 16px;
    }

    .top-display-panel {
        grid-template-columns: 1fr 78px;
        gap: 7px;
    }

    .station-title-window,
    .digital-clock {
        height: 58px;
    }

    .on-air-dot {
        width: 6px;
        height: 6px;
        top: 7px;
        right: 8px;
    }

    #topStationName {
        font-size: 15px;
        letter-spacing: 2px;
    }

    #topStationMeta {
        font-size: 8px;
    }

    .digital-clock {
        font-size: 12px;
    }

    .tuning-row {
        grid-template-columns: 1fr 56px;
        gap: 8px;
    }

   .frequency-scale {
    height: 68px;
    padding: 10px 14px;
    }

    .frequency-scale::before {
        left: 12px;
        right: 12px;
        top: 34px;
    }

    .frequency-scale::after {
        top: 10px;
        bottom: 7px;
    }

    .tuner-row {
        font-size: 10px;
        height: 18px;
    }

   .tuner-label,
   .mhz-label,
   .khz-label {
   font-size: 8px;
   }

   .mhz-label,
   .khz-label {
    right: 0;
    top: 1px;
    transform: none;
   }

   .fm-mark[style*="92%"],
   .am-mark[style*="91%"] {
    transform: translateX(-100%);
   }

    .tuner-row.fm {
        margin-bottom: 22px;
    }

    .tuning-knob {
        width: 50px;
        height: 50px;
    }

    .tuning-knob-inner {
        inset: 9px;
    }

    .weather-display {
        height: 46px;
    }

    #weatherInfo {
        font-size: 10px;
    }

    .station-controls {
        padding: 14px 10px;
        gap: 8px;
        border-radius: 20px;
    }

    #stationSelect {
        width: 100%;
        max-width: none;
        font-size: 7px;
    }

    .control-button {
        flex: 1;
        min-width: 110px;
    }

    .station-info-container {
        padding: 18px;
        min-height: auto;
    }

    .station-logo {
        float: none;
        width: 120px;
        max-height: 120px;
        margin: 0 auto 18px;
    }

    .station-description {
        text-align: center;
        font-size: 9px;
        line-height: 1.8;
        margin: 0 auto 14px;
    }

    .legal-links-inline {
        clear: none;
    }
}
