@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #081a2f;
  --navy-light: #12375a;
  --gold: #f0b44d;
  --cream: #fff8e8;
  --white: #ffffff;
  --muted: #b8c9d8;
  --panel: rgba(7, 23, 42, 0.82);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 24%, rgba(240, 180, 77, 0.18), transparent 28%),
    radial-gradient(circle at 84% 15%, rgba(38, 111, 170, 0.28), transparent 32%),
    linear-gradient(135deg, #071525 0%, #0b2743 50%, #061321 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.broadcast-frame {
  width: 100vw;
  height: 100vh;
  padding: 46px 58px 34px;
  display: grid;
  grid-template-rows: 120px 1fr 150px 74px;
  gap: 24px;
}

.station-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(240, 180, 77, 0.45);
  padding-bottom: 22px;
}

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

.logo-placeholder {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: linear-gradient(145deg, #ffd88c, var(--gold));
  font-size: 34px;
  font-weight: 800;
  box-shadow: 0 0 32px rgba(240, 180, 77, 0.32);
}

.brand h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.brand p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 22px;
  letter-spacing: 2px;
}

.clock-panel {
  text-align: right;
}

#clock {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 2px;
}

#date {
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
}

.now-playing {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 620px) 1fr;
  align-items: center;
  gap: 68px;
}

.artwork-wrap {
  aspect-ratio: 1 / 1;
  width: min(100%, 620px);
  justify-self: center;
  padding: 14px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  box-shadow:
    0 30px 80px rgba(0,0,0,0.45),
    0 0 55px rgba(240, 180, 77, 0.12);
}

#album-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  transition: opacity 0.45s ease, transform 8s ease;
  animation: slowZoom 16s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

.track-details {
  min-width: 0;
  padding-right: 35px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
}

#title {
  margin: 0;
  font-size: clamp(54px, 5vw, 94px);
  line-height: 1.03;
  letter-spacing: -2px;
  text-wrap: balance;
}

#artist {
  margin: 25px 0 0;
  color: var(--cream);
  font-size: clamp(30px, 2.7vw, 50px);
  font-weight: 600;
}

#album {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 24px;
}

.progress-row {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.14);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #ffe1a0);
  transition: width 1s linear;
}

.station-message {
  margin-top: 34px;
  padding: 20px 24px;
  border-left: 5px solid var(--gold);
  background: rgba(255,255,255,0.06);
  font-size: 22px;
}

.info-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 22px;
}

.info-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px 30px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 15px 35px rgba(0,0,0,0.18);
  font-size: 22px;
}

.info-card .label {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2.4px;
}

.verse-card {
  color: var(--cream);
}

.ticker {
  display: grid;
  grid-template-columns: 250px 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: rgba(0,0,0,0.34);
}

.ticker-label {
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  z-index: 2;
}

.ticker-window {
  overflow: hidden;
  white-space: nowrap;
}

.ticker-text {
  width: max-content;
  padding-left: 100%;
  font-size: 22px;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (max-width: 1200px) {
  .broadcast-frame {
    padding: 28px;
    grid-template-rows: 90px 1fr 120px 62px;
    gap: 18px;
  }

  .logo-placeholder {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

  .brand h1 {
    font-size: 34px;
  }

  .brand p,
  .info-card,
  .ticker-text {
    font-size: 16px;
  }

  #clock {
    font-size: 32px;
  }

  .now-playing {
    grid-template-columns: minmax(330px, 450px) 1fr;
    gap: 40px;
  }

  .progress-row {
    margin-top: 28px;
  }
}


.progress-bar.live {
  animation: liveSweep 2.4s ease-in-out infinite alternate;
  transition: none;
}

@keyframes liveSweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(285%); }
}

/* Beacon 0.2 song-change presentation */
.track-details > * {
  transform-origin: left center;
}

.song-change .eyebrow {
  animation: beaconEyebrowIn 700ms ease both;
}

.song-change #title {
  animation: beaconTitleIn 850ms cubic-bezier(.2,.8,.2,1) 80ms both;
}

.song-change #artist {
  animation: beaconTitleIn 850ms cubic-bezier(.2,.8,.2,1) 160ms both;
}

.song-change #album,
.song-change .progress-row,
.song-change .station-message {
  animation: beaconFadeUp 700ms ease 240ms both;
}

.song-change .artwork-wrap {
  animation: beaconArtworkIn 900ms cubic-bezier(.2,.8,.2,1) both;
}

#album-art.artwork-changing {
  opacity: 0;
  transform: scale(0.985);
}

@keyframes beaconEyebrowIn {
  from { opacity: 0; letter-spacing: 10px; }
  to { opacity: 1; letter-spacing: 4px; }
}

@keyframes beaconTitleIn {
  from { opacity: 0; transform: translateX(42px); filter: blur(5px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes beaconFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes beaconArtworkIn {
  from { opacity: 0; transform: scale(.94) rotate(-1deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .song-change .eyebrow,
  .song-change #title,
  .song-change #artist,
  .song-change #album,
  .song-change .progress-row,
  .song-change .station-message,
  .song-change .artwork-wrap {
    animation: none;
  }
}


/* Beacon 0.3 Scene Manager */
.scene-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.beacon-scene {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.99);
  transition:
    opacity 500ms ease,
    transform 600ms cubic-bezier(.2,.8,.2,1),
    visibility 0s linear 600ms;
}

.beacon-scene.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.beacon-scene .now-playing {
  height: 100%;
}

.special-scene {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 20%, rgba(240,180,77,0.18), transparent 38%),
    rgba(7,23,42,0.72);
}

.scene-icon {
  font-size: 118px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 24px;
}

.scene-kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 4px;
}

.special-scene h2 {
  margin: 0;
  font-size: clamp(66px, 7vw, 122px);
  line-height: 1;
  letter-spacing: -3px;
}

.scene-primary {
  margin: 30px 0 0;
  color: var(--cream);
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 600;
}

.scene-secondary {
  max-width: 1100px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.5;
}

.station-scene {
  background:
    radial-gradient(circle at 50% 28%, rgba(240,180,77,0.25), transparent 30%),
    linear-gradient(145deg, rgba(7,23,42,0.92), rgba(15,53,86,0.82));
}

.station-logo {
  width: 142px;
  height: 142px;
  font-size: 52px;
  margin-bottom: 30px;
}

.station-frequencies {
  margin: 24px 0 0;
  color: var(--gold);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 2px;
}

body[data-scene="weather"] .info-strip .info-card:first-child .label::after {
  content: " • WX";
}

body[data-scene="station"] .info-strip .info-card:first-child .label::after {
  content: " • STATION";
}

@media (prefers-reduced-motion: reduce) {
  .beacon-scene {
    transition: none;
  }
}


/* Beacon 0.3.1 Weather Module */
.weather-scene {
  height: 100%;
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 28px;
}

.weather-current,
.weather-forecast-panel {
  min-height: 0;
  padding: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  background: rgba(7,23,42,0.78);
}

.weather-current {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(240,180,77,0.24), transparent 38%),
    rgba(7,23,42,0.78);
}

.weather-location {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 25px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 34px;
}

.weather-icon {
  width: 160px;
  text-align: center;
  color: var(--gold);
  font-size: 118px;
  line-height: 1;
}

.weather-temperature {
  font-size: clamp(92px, 8vw, 150px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -7px;
}

.weather-condition {
  margin-top: 20px;
  color: var(--cream);
  font-size: 32px;
  font-weight: 600;
}

.weather-details {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.weather-details > div {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
}

.weather-label {
  display: block;
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.weather-details strong {
  font-size: 22px;
}

.weather-updated {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.weather-forecast-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.forecast-day {
  min-width: 0;
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: rgba(255,255,255,0.055);
}

.forecast-day-name {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
}

.forecast-icon {
  margin: 21px 0 17px;
  font-size: 48px;
  line-height: 1;
}

.forecast-condition {
  min-height: 46px;
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
}

.forecast-temperatures {
  margin-top: 18px;
  font-size: 25px;
  font-weight: 700;
}

.forecast-precipitation {
  min-height: 19px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 14px;
}

.forecast-loading {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 26px;
  text-align: center;
}

@media (max-width: 1200px) {
  .weather-current,
  .weather-forecast-panel {
    padding: 25px;
  }

  .weather-icon {
    width: 100px;
    font-size: 78px;
  }

  .weather-condition {
    font-size: 23px;
  }

  .forecast-day {
    padding: 17px 9px;
  }

  .forecast-icon {
    font-size: 35px;
  }

  .forecast-temperatures {
    font-size: 19px;
  }
}


/* Beacon 0.4.1 Broadcast-Safe Canvas */
:root {
  --beacon-edge-x: clamp(28px, 3vw, 58px);
  --beacon-edge-top: clamp(22px, 2.4vh, 34px);
  --beacon-edge-bottom: clamp(18px, 2vh, 28px);
  --beacon-header-height: clamp(88px, 11vh, 118px);
  --beacon-info-height: clamp(108px, 13vh, 142px);
  --beacon-ticker-height: clamp(52px, 6.8vh, 72px);
  --beacon-row-gap: clamp(12px, 1.8vh, 22px);
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.broadcast-frame {
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  padding:
    var(--beacon-edge-top)
    var(--beacon-edge-x)
    var(--beacon-edge-bottom);
  display: grid;
  grid-template-rows:
    var(--beacon-header-height)
    minmax(0, 1fr)
    var(--beacon-info-height)
    var(--beacon-ticker-height);
  gap: var(--beacon-row-gap);
  overflow: hidden;
}

.station-header,
.scene-stage,
.info-strip,
.ticker,
.beacon-scene,
.beacon-scene .now-playing,
.weather-scene,
.special-scene,
.station-scene {
  min-width: 0;
  min-height: 0;
}

.station-header {
  height: 100%;
  padding-bottom: clamp(12px, 1.6vh, 20px);
}

.scene-stage,
.beacon-scene,
.beacon-scene.active,
.beacon-scene .now-playing,
.weather-scene,
.special-scene,
.station-scene {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.info-strip,
.ticker {
  height: 100%;
}

.info-card {
  min-height: 0;
  overflow: hidden;
}

.now-playing {
  grid-template-columns: minmax(300px, min(37vw, 560px)) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 66px);
}

.artwork-wrap {
  width: min(100%, 54vh, 560px);
  max-height: 100%;
}

.track-details {
  min-width: 0;
  min-height: 0;
  padding-right: clamp(8px, 1.5vw, 28px);
  overflow: hidden;
}

#title {
  font-size: clamp(42px, 4.6vw, 84px);
  line-height: 1.02;
}

#artist {
  margin-top: clamp(14px, 2.2vh, 24px);
  font-size: clamp(28px, 2.5vw, 46px);
}

#album {
  margin-top: clamp(8px, 1.4vh, 14px);
  font-size: clamp(18px, 1.5vw, 24px);
}

.progress-row {
  margin-top: clamp(22px, 4vh, 42px);
}

.station-message {
  margin-top: clamp(18px, 3vh, 30px);
}

.weather-scene {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
  gap: clamp(16px, 1.8vw, 28px);
}

.weather-current,
.weather-forecast-panel {
  height: 100%;
  min-height: 0;
  padding: clamp(22px, 2.2vw, 38px);
  overflow: hidden;
}

.weather-main {
  gap: clamp(18px, 2vw, 32px);
}

.weather-icon {
  width: clamp(90px, 8vw, 150px);
  font-size: clamp(72px, 6vw, 112px);
}

.weather-temperature {
  font-size: clamp(78px, 7.4vw, 136px);
}

.weather-condition {
  margin-top: clamp(10px, 1.7vh, 18px);
  font-size: clamp(24px, 2.3vw, 38px);
}

.weather-details {
  margin-top: clamp(22px, 3vh, 38px);
  gap: clamp(10px, 1vw, 16px);
}

.weather-details > div {
  padding: clamp(12px, 1.2vw, 18px);
}

.weather-updated {
  margin-top: clamp(14px, 2vh, 22px);
}

.weather-forecast {
  min-height: 0;
  align-items: stretch;
}

.forecast-day {
  min-height: 0;
  padding: clamp(14px, 1.2vw, 22px) clamp(8px, 0.8vw, 14px);
  overflow: hidden;
}

.forecast-icon {
  margin: clamp(12px, 1.8vh, 18px) 0;
  font-size: clamp(34px, 3.4vw, 48px);
}

.forecast-condition {
  min-height: 0;
  font-size: clamp(13px, 1vw, 16px);
}

.forecast-temperatures {
  margin-top: clamp(10px, 1.5vh, 16px);
  font-size: clamp(18px, 1.5vw, 24px);
}

.special-scene {
  padding: clamp(28px, 4vh, 54px);
}

.special-scene h2 {
  font-size: clamp(56px, 6.2vw, 108px);
}

.scene-primary {
  margin-top: clamp(18px, 2.8vh, 28px);
  font-size: clamp(26px, 2.7vw, 44px);
}

.scene-secondary {
  margin-top: clamp(14px, 2.2vh, 22px);
  font-size: clamp(18px, 1.5vw, 24px);
}

.station-logo {
  width: clamp(108px, 10vw, 142px);
  height: clamp(108px, 10vw, 142px);
  margin-bottom: clamp(18px, 2.8vh, 28px);
}

.station-frequencies {
  margin-top: clamp(14px, 2vh, 22px);
  font-size: clamp(26px, 2.2vw, 34px);
}

@media (max-height: 800px) {
  :root {
    --beacon-header-height: 82px;
    --beacon-info-height: 96px;
    --beacon-ticker-height: 50px;
    --beacon-row-gap: 10px;
  }

  .logo-placeholder {
    width: 58px;
    height: 58px;
  }

  .brand h1 {
    font-size: 30px;
  }

  .brand p {
    margin-top: 7px;
    font-size: 14px;
  }

  #clock {
    font-size: 28px;
  }

  #date {
    font-size: 14px;
  }

  .info-card {
    padding: 16px 22px;
    font-size: 17px;
  }

  .ticker-text {
    font-size: 17px;
  }
}

/* Beacon 0.4.3 Web Player */
.audio-player{
 position:fixed; right:32px;
 bottom:calc(var(--beacon-ticker-height) + var(--beacon-edge-bottom) + 18px);
 z-index:100; display:flex; align-items:center; gap:18px;
 max-width:calc(100vw - 44px); padding:14px 18px;
 border:1px solid rgba(255,255,255,.16); border-radius:16px;
 color:var(--cream); background:rgba(7,23,42,.95);
 backdrop-filter:blur(12px);
}
.audio-player[hidden],body.display-only .audio-player{display:none!important}
.audio-toggle{
 display:inline-flex; align-items:center; justify-content:center; gap:10px;
 min-width:150px; padding:12px 18px; border:0; border-radius:10px;
 color:#07172a; background:var(--gold); font:inherit; font-weight:800; cursor:pointer
}
.audio-status{display:flex;align-items:center;gap:9px;min-width:170px;font-size:15px}
.audio-indicator{width:11px;height:11px;border-radius:50%;background:#777}
.audio-indicator[data-status="playing"]{background:#58dc86;box-shadow:0 0 12px rgba(88,220,134,.5)}
.audio-indicator[data-status="buffering"]{background:#f0b44d;animation:beaconAudioPulse 1s ease-in-out infinite alternate}
.audio-indicator[data-status="error"]{background:#ff6767}
.volume-control{display:flex;align-items:center;gap:10px;font-size:14px}
#audio-volume{width:112px;accent-color:var(--gold)}
@keyframes beaconAudioPulse{from{opacity:.45}to{opacity:1}}
@media(max-width:900px){
 .audio-player{left:18px;right:18px;bottom:18px;flex-wrap:wrap;justify-content:center}
 .audio-status{min-width:0}
}
