:root {
  color-scheme: dark;
  --bg: #050a12;
  --panel: rgba(10, 19, 32, .82);
  --panel-strong: #0c1726;
  --line: rgba(169, 215, 255, .13);
  --muted: #8c9bad;
  --text: #eef7ff;
  --cyan: #58e5ff;
  --blue: #5577ff;
  --pink: #fa66df;
  --green: #73f0bd;
  --accent: var(--cyan);
  --accent-rgb: 88, 229, 255;
  --shadow: 0 24px 80px rgba(0, 0, 0, .44);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -8%, rgba(38, 95, 160, .22), transparent 35rem),
    radial-gradient(circle at -5% 35%, rgba(41, 43, 104, .2), transparent 30rem),
    var(--bg);
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: .65;
  pointer-events: none;
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand strong { display: block; font-size: .92rem; letter-spacing: .18em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .6rem; letter-spacing: .22em; }
.brand-mark { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(var(--accent-rgb), .4); border-radius: 10px; background: rgba(var(--accent-rgb), .07); box-shadow: inset 0 0 20px rgba(var(--accent-rgb), .06); }
.brand-mark i { display: block; width: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 7px var(--accent); animation: brandWave 1.1s ease-in-out infinite alternate; }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 18px; animation-delay: -.7s; }
.brand-mark i:nth-child(3) { height: 13px; animation-delay: -.2s; }
.brand-mark i:nth-child(4) { height: 6px; animation-delay: -.5s; }
@keyframes brandWave { to { transform: scaleY(.45); opacity: .55; } }

.signal-pill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(7, 14, 24, .72); font-size: .75rem; }
.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: #738094; }
.signal-pill.live { color: #bdf9dd; border-color: rgba(115, 240, 189, .22); }
.signal-pill.live .signal-dot { background: var(--green); box-shadow: 0 0 11px var(--green); animation: pulse 1.7s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.hero { min-height: 650px; display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; gap: clamp(42px, 6vw, 88px); padding: 74px 0 90px; }
.eyebrow { margin: 0 0 13px; color: var(--accent); font-size: .68rem; font-weight: 750; letter-spacing: .19em; }
.hero h1 { margin: 0; font-size: clamp(3.3rem, 6.3vw, 6.3rem); font-weight: 720; letter-spacing: -.065em; line-height: .88; }
.hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(220, 241, 255, .52); text-shadow: 0 0 36px rgba(var(--accent-rgb), .08); }
.lede { max-width: 500px; margin: 30px 0 0; color: #abb9c9; font-size: 1.02rem; line-height: 1.7; }
.feature-row { display: flex; flex-wrap: wrap; gap: 11px 20px; margin-top: 30px; color: #8292a4; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.feature-row span { display: flex; align-items: center; gap: 7px; }
.feature-row b { color: var(--accent); font-size: 1rem; }

.player-card { position: relative; padding: 12px 12px 18px; border: 1px solid rgba(var(--accent-rgb), .23); border-radius: 25px; background: linear-gradient(150deg, rgba(20, 35, 53, .92), rgba(6, 12, 21, .95)); box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.06); }
.player-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.1), transparent 24%, transparent 70%, rgba(var(--accent-rgb), .12)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; padding: 1px; }
.player-glow { position: absolute; inset: 14% 7%; z-index: -1; background: rgba(var(--accent-rgb), .25); filter: blur(70px); opacity: .45; }
.screen-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; border-radius: 16px; background: #03080e; }
#broadcastCanvas, #mediaOutput { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#broadcastCanvas { visibility: hidden; }
#mediaOutput { background: linear-gradient(135deg, #07121e, #0f2034); }
.screen-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.11) 51%); background-size: 100% 4px; mix-blend-mode: soft-light; }
.screen-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(to top, rgba(1, 6, 12, .76), transparent 48%); }
.live-badge { align-self: flex-start; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.16); border-radius: 5px; background: rgba(1, 7, 12, .43); backdrop-filter: blur(8px); font-size: .58rem; font-weight: 700; letter-spacing: .13em; }
.live-badge span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.track-copy { display: grid; gap: 3px; }
.track-copy small { color: var(--accent); font-size: .57rem; letter-spacing: .15em; }
.track-copy strong { font-size: clamp(1.25rem, 2vw, 1.65rem); letter-spacing: -.02em; }
.track-copy span { color: #a8b7c5; font-size: .72rem; }
.timecode { position: absolute; right: 18px; bottom: 19px; color: #b4c1cd; font: .66rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

.controls { display: grid; grid-template-columns: 54px 74px 1fr; align-items: center; gap: 10px; padding: 14px 8px 0; }
.icon-button, .play-button { display: grid; place-items: center; border: 0; cursor: pointer; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; color: #99a9ba; background: transparent; }
.icon-button:hover { color: var(--accent); background: rgba(var(--accent-rgb), .07); }
.icon-button svg, .volume-control svg, .utility-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.play-button { width: 64px; height: 64px; border-radius: 50%; color: #061019; background: var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .09), 0 0 34px rgba(var(--accent-rgb), .32); transition: transform .2s ease, box-shadow .2s ease; }
.play-button:hover { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(var(--accent-rgb), .1), 0 0 40px rgba(var(--accent-rgb), .43); }
.play-button svg { width: 26px; height: 26px; fill: currentColor; }
.play-button .pause-icon { display: none; }
.play-button.playing .play-icon { display: none; }
.play-button.playing .pause-icon { display: block; }
.volume-control { display: grid; grid-template-columns: 22px 1fr 28px; align-items: center; gap: 10px; margin-left: 10px; color: #7f91a3; }
.volume-control output { color: #a8b6c4; font: .66rem ui-monospace, monospace; text-align: right; }
input[type="range"] { width: 100%; height: 3px; appearance: none; border-radius: 4px; background: #263343; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { width: 13px; height: 13px; appearance: none; border: 2px solid #dffbff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .55); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 2px solid #dffbff; border-radius: 50%; background: var(--accent); }

.station-section { padding: 76px 0 86px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.section-heading h2, .utility-card h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.035em; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.station-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.station-card { position: relative; overflow: hidden; min-height: 255px; padding: 11px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: rgba(8, 16, 27, .78); cursor: pointer; transition: border-color .25s ease, transform .25s ease, background .25s ease; }
.station-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), .36); background: rgba(11, 22, 36, .92); }
.station-card.active { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .13), 0 17px 40px rgba(0,0,0,.26); }
.station-card.active::after { content: ""; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border: 2px solid #08111c; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.station-art { position: relative; display: block; overflow: hidden; height: 112px; margin-bottom: 17px; border-radius: 10px; background: #0c1724; }
.station-art::before, .station-art::after, .station-art i { content: ""; position: absolute; display: block; }
.art-chill { background: linear-gradient(160deg, #152843 0 38%, #6c70c6 39% 55%, #fc7fc8 56% 63%, #172746 64%); }
.art-chill::before { inset: 20% 22%; border-radius: 50%; background: #a2efff; filter: blur(12px); opacity: .65; }
.art-chill::after { inset: 55% -15% -30%; background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(83,228,255,.3) 20px 21px), linear-gradient(#1d3c5a, #08111d); transform: skewY(-5deg); }
.art-chill i { width: 46px; height: 70px; left: 45%; top: 31px; background: #07111d; clip-path: polygon(47% 0,58% 41%,100% 100%,0 100%,39% 41%); }
.art-cyber { background: linear-gradient(145deg, #090419, #280b43 52%, #071b31); }
.art-cyber::before { inset: 0; background: repeating-linear-gradient(90deg, transparent 0 20px, rgba(248,70,234,.19) 21px), repeating-linear-gradient(0deg, transparent 0 20px, rgba(75,207,255,.13) 21px); perspective: 100px; transform: rotateX(55deg) scale(1.4) translateY(38px); }
.art-cyber::after { width: 68px; height: 68px; left: 50%; top: 24px; transform: translateX(-50%); border: 2px solid #ff58ea; clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); box-shadow: inset 0 0 18px #7e1aa5; }
.art-cyber i { width: 12px; height: 12px; left: calc(50% - 6px); top: 53px; border-radius: 50%; background: #68e7ff; box-shadow: 0 0 18px 5px #49b3ff; }
.art-retro { background: linear-gradient(#452069, #ee5b94 55%, #ff9b65 56%, #211444 58%); }
.art-retro::before { width: 64px; height: 64px; left: calc(50% - 32px); top: 20px; border-radius: 50%; background: repeating-linear-gradient(#ffd38c 0 6px, transparent 7px 10px); filter: drop-shadow(0 0 15px rgba(255,159,122,.55)); }
.art-retro::after { inset: 54% -20% -30%; background: repeating-linear-gradient(90deg, transparent 0 24px, rgba(255,92,217,.38) 25px 26px), repeating-linear-gradient(0deg, transparent 0 14px, rgba(255,92,217,.32) 15px 16px), #11102b; transform: perspective(100px) rotateX(42deg); }
.art-focus { background: radial-gradient(circle at 50% 48%, #a2f6e2 0 3px, transparent 4px), radial-gradient(circle at 50% 50%, transparent 0 19px, rgba(92,236,194,.55) 20px 21px, transparent 22px 34px, rgba(92,236,194,.19) 35px 36px, transparent 37px), linear-gradient(145deg,#0c2631,#0a1421); }
.art-focus::before { inset: 0; background: linear-gradient(120deg, transparent 40%, rgba(109,244,209,.13), transparent 60%); animation: sweep 5s linear infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.art-rain { background: linear-gradient(145deg, #07111c, #173044); }
.art-rain::before { inset: -30%; background: repeating-linear-gradient(105deg, transparent 0 13px, rgba(137,211,255,.32) 14px 15px); animation: rain .8s linear infinite; }
.art-rain::after { width: 72px; height: 50px; left: calc(50% - 36px); bottom: -24px; border-radius: 50%; border: 1px solid rgba(106,210,255,.7); box-shadow: 0 0 25px rgba(62,162,255,.28); }
@keyframes rain { to { transform: translate(18px, 20px); } }
.station-meta { display: grid; gap: 4px; }
.station-meta small { color: var(--accent); font-size: .55rem; letter-spacing: .11em; }
.station-meta strong { font-size: .94rem; }
.station-meta em { color: #76879a; font-size: .67rem; font-style: normal; line-height: 1.4; }
.station-wave { position: absolute; right: 12px; bottom: 13px; height: 20px; display: none; align-items: center; gap: 2px; }
.station-card.active .station-wave { display: flex; }
.station-wave i { width: 2px; height: 7px; border-radius: 2px; background: var(--accent); animation: cardWave .9s ease-in-out infinite alternate; }
.station-wave i:nth-child(2) { height: 13px; animation-delay: -.5s; }.station-wave i:nth-child(3) { height: 18px; animation-delay: -.2s; }.station-wave i:nth-child(4) { height: 11px; animation-delay: -.7s; }.station-wave i:nth-child(5) { height: 5px; animation-delay: -.35s; }
@keyframes cardWave { to { transform: scaleY(.35); opacity: .5; } }

.utility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 0 90px; }
.utility-card { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 0 18px; padding: 26px; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, rgba(12,24,39,.88), rgba(7,14,24,.88)); box-shadow: 0 18px 50px rgba(0,0,0,.17); }
.utility-icon { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .23); border-radius: 13px; background: rgba(var(--accent-rgb), .06); }
.utility-copy { margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.timer-display { grid-column: 1 / -1; margin: 29px 0 19px; color: #dffaff; font: 300 clamp(3rem, 6vw, 5.7rem) ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.07em; text-align: center; text-shadow: 0 0 30px rgba(var(--accent-rgb), .12); }
.timer-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.duration-pills { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: rgba(3,9,16,.52); }
.duration-pills button, .text-button { border: 0; cursor: pointer; }
.duration-pills button { padding: 7px 10px; border-radius: 6px; color: #788a9b; background: transparent; font-size: .68rem; }
.duration-pills button.active { color: #07121c; background: var(--accent); }
.text-button { padding: 10px 15px; border-radius: 9px; color: var(--accent); background: rgba(var(--accent-rgb), .09); font-size: .75rem; font-weight: 700; }
.status-list { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.status-list span { display: flex; align-items: center; gap: 9px; color: #96a6b7; font-size: .76rem; }
.status-list i { width: 7px; height: 7px; border-radius: 50%; }
.status-list i.ok { background: var(--green); box-shadow: 0 0 8px rgba(115,240,189,.6); }
.status-list i.neutral { background: #748295; }

footer { min-height: 110px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: #627184; font-size: .62rem; letter-spacing: .1em; }
footer p { margin: 0; text-align: center; text-transform: none; letter-spacing: 0; font-size: .72rem; }
footer span:last-child { text-align: right; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 20; max-width: min(440px, calc(100% - 32px)); padding: 12px 16px; transform: translate(-50%, 30px); border: 1px solid rgba(var(--accent-rgb), .3); border-radius: 10px; color: #d9f8ff; background: rgba(6,14,24,.94); box-shadow: 0 14px 40px rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: .25s ease; font-size: .78rem; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 62px; }
  .hero-copy { max-width: 700px; }
  .player-card { width: min(720px, 100%); margin: 0 auto; }
  .station-grid { grid-template-columns: repeat(3, 1fr); }
  .utility-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 74px; }
  .signal-pill { padding: 8px; }
  .signal-pill #signalLabel { display: none; }
  .hero { min-height: auto; gap: 48px; padding: 50px 0 70px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .feature-row { gap: 9px 15px; }
  .controls { grid-template-columns: 46px 65px 1fr; }
  .play-button { width: 58px; height: 58px; }
  .volume-control { margin-left: 0; gap: 7px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 16px; }
  .station-grid { grid-template-columns: 1fr 1fr; }
  .station-card { min-height: 235px; }
  .utility-card { padding: 20px; grid-template-columns: 44px 1fr; gap: 0 13px; }
  .utility-icon { width: 42px; height: 42px; }
  .timer-actions { align-items: stretch; flex-direction: column; }
  .duration-pills { justify-content: center; }
  .duration-pills button { flex: 1; }
  footer { grid-template-columns: 1fr; padding: 26px 0; text-align: center; }
  footer span:last-child { text-align: center; }
}
@media (max-width: 430px) {
  .station-grid { grid-template-columns: 1fr; }
  .station-card { min-height: 0; display: grid; grid-template-columns: 98px 1fr; gap: 13px; align-items: center; }
  .station-art { height: 88px; margin: 0; }
  .station-wave { right: 14px; bottom: 12px; }
  .track-copy span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
