/* ============================================================
   191.9 AZAH — Station Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rokkitt:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Code+Pro:wght@400;600&display=swap');

/* ============================================================
   THEME VARIABLES
   ============================================================ */

/* Dark mode (default) */
:root {
  --bg:           #0d0809;
  --bg-mid:       #120709;
  --bg-panel:     #1a0b0d;
  --bg-warm:      #200d10;
  --border:       #3a1a1e;
  --border-accent:#7a2030;
  --accent:       #c4404f;
  --accent-light: #e06070;
  --accent-pale:  #f5c0c8;
  --cream:        #f5e6d0;
  --text:         #e8d8cc;
  --text-dim:     #8a6e6e;
  --text-faint:   #4a2a2e;
  --crimson:      #53000d;
  --red-bright:   #e04050;

  --font-display: 'Rokkitt', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, serif;
  --font-mono:    'Source Code Pro', 'Courier New', monospace;

  --radius:       2px;
  --transition:   0.2s ease;
}

/* Light mode */
[data-theme="light"] {
  --bg:           #f5e6d0;
  --bg-mid:       #eddcc4;
  --bg-panel:     #e8d4ba;
  --bg-warm:      #dfc8aa;
  --border:       #c8a888;
  --border-accent:#7a2030;
  --accent:       #53000d;
  --accent-light: #7a1020;
  --accent-pale:  #a02030;
  --cream:        #f5e6d0;
  --text:         #1a0608;
  --text-dim:     #5a3030;
  --text-faint:   #9a7070;
  --crimson:      #53000d;
  --red-bright:   #c4404f;
}

/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(83, 0, 13, 0.12) 0%, transparent 60%);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-pale); }

/* ============================================================
   CRT EFFECTS
   ============================================================ */

/* Screen-door: horizontal scanlines + RGB subpixel columns */
body::before {
  content: ' ';
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.015), rgba(0, 0, 255, 0.04));
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  z-index: 998;
}

/* Flicker overlay — toned down from original for readability */
@keyframes flicker {
  0%   { opacity: 0.08; }
  5%   { opacity: 0.05; }
  10%  { opacity: 0.09; }
  15%  { opacity: 0.13; }
  20%  { opacity: 0.06; }
  25%  { opacity: 0.11; }
  30%  { opacity: 0.07; }
  35%  { opacity: 0.10; }
  40%  { opacity: 0.06; }
  45%  { opacity: 0.12; }
  50%  { opacity: 0.14; }
  55%  { opacity: 0.04; }
  60%  { opacity: 0.07; }
  65%  { opacity: 0.11; }
  70%  { opacity: 0.09; }
  75%  { opacity: 0.06; }
  80%  { opacity: 0.10; }
  85%  { opacity: 0.09; }
  90%  { opacity: 0.08; }
  95%  { opacity: 0.07; }
  100% { opacity: 0.05; }
}

body::after {
  content: ' ';
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: rgba(18, 16, 16, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  animation: flicker 0.15s infinite;
}

/* Color separation — scoped to hero h1 only */
@keyframes textShadow {
  0%   { text-shadow: 0.44px 0 1px rgba(0,30,255,0.3), -0.44px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  5%   { text-shadow: 2.79px 0 1px rgba(0,30,255,0.3), -2.79px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  10%  { text-shadow: 0.03px 0 1px rgba(0,30,255,0.3), -0.03px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  15%  { text-shadow: 0.40px 0 1px rgba(0,30,255,0.3), -0.40px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  20%  { text-shadow: 3.48px 0 1px rgba(0,30,255,0.3), -3.48px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  25%  { text-shadow: 1.61px 0 1px rgba(0,30,255,0.3), -1.61px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  30%  { text-shadow: 0.70px 0 1px rgba(0,30,255,0.3), -0.70px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  35%  { text-shadow: 3.90px 0 1px rgba(0,30,255,0.3), -3.90px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  40%  { text-shadow: 3.87px 0 1px rgba(0,30,255,0.3), -3.87px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  45%  { text-shadow: 2.23px 0 1px rgba(0,30,255,0.3), -2.23px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  50%  { text-shadow: 0.08px 0 1px rgba(0,30,255,0.3), -0.08px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  55%  { text-shadow: 2.38px 0 1px rgba(0,30,255,0.3), -2.38px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  60%  { text-shadow: 2.20px 0 1px rgba(0,30,255,0.3), -2.20px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  65%  { text-shadow: 2.86px 0 1px rgba(0,30,255,0.3), -2.86px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  70%  { text-shadow: 0.49px 0 1px rgba(0,30,255,0.3), -0.49px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  75%  { text-shadow: 1.89px 0 1px rgba(0,30,255,0.3), -1.89px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  80%  { text-shadow: 0.08px 0 1px rgba(0,30,255,0.3), -0.08px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  85%  { text-shadow: 0.10px 0 1px rgba(0,30,255,0.3), -0.10px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  90%  { text-shadow: 3.44px 0 1px rgba(0,30,255,0.3), -3.44px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  95%  { text-shadow: 2.18px 0 1px rgba(0,30,255,0.3), -2.18px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
  100% { text-shadow: 2.62px 0 1px rgba(0,30,255,0.3), -2.62px 0 1px rgba(255,0,80,0.2), 0 0 3px; }
}

/* Light mode: dampen all CRT effects significantly */
[data-theme="light"] body::before {
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.04) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.01), rgba(0, 255, 0, 0.005), rgba(0, 0, 255, 0.01));
  background-size: 100% 3px, 3px 100%;
}

[data-theme="light"] body::after {
  animation: none;
  opacity: 0;
}

/* ============================================================
   HEADER
   ============================================================ */

header {
  border-bottom: 2px solid var(--border-accent);
  background: var(--bg-mid);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease;
  height: 168px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
}

/* Station logo — breaks out of masthead */
.station-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 180px;
  position: relative;
  z-index: 101;
  margin-top: 20px; /* pushes bottom half below masthead border */
}

.station-logo img {
  height: 180px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}

/* Right-side header group — absolutely positioned to prevent reflow */
.header-right {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

/* Logo invert in light mode */
[data-theme="light"] .station-logo img {
  filter: invert(1) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.3));
}

/* Theme toggle — inside player upper right */
.theme-toggle {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.1rem;
  transition: color var(--transition);
  z-index: 2;
}

.theme-toggle:hover {
  color: var(--text-dim);
}

/* ============================================================
   PLAYER
   ============================================================ */

/* ON AIR indicators */
.on-air {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.on-air-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background var(--transition);
}

.on-air-dot.live {
  background: var(--red-bright);
  animation: pulse 1.4s ease-in-out infinite;
}

.on-air-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.on-air-label.live {
  color: var(--red-bright);
}

.on-air-show {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Player wrap — fully rigid, no content influence */
.header-player-wrap {
  position: relative;
  width: 480px;
  height: 140px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-accent);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

/* Art — fills full player height, no padding */
.player-art {
  height: 140px;
  width: 140px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: var(--bg-warm);
  padding: 0.65rem 0 0.65rem 0.85rem;
  box-sizing: border-box;
}

/* Right column */
.player-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.65rem 0.85rem;
  overflow: hidden;
}

/* Controls row: play + status + volume */
.player-controls-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.player-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.player-btn:hover {
  background: var(--accent-light);
  transform: scale(1.05);
}

.player-status-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.player-vol {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  color: var(--text-dim);
  width: 90px;
}

/* Track title row */
.player-track-scroll {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.player-track-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.marquee-text, .marquee-sep {
  white-space: nowrap;
  flex-shrink: 0;
}

.player-track-title.scrolling {
  animation: marquee linear infinite;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * var(--marquee-width, 50%))); }
}

/* Remove old row classes */
.player-row { display: none; }
.player-row-bottom { display: none; }

.player-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.player-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.player-volume::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.off-air-msg { display: none; }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(83, 0, 13, 0.15) 0%, transparent 70%),
    var(--bg-mid);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.hero::before {
  content: '191.9';
  position: absolute;
  font-family: var(--font-display);
  font-size: 18rem;
  font-weight: 900;
  color: rgba(83, 0, 13, 0.05);
  letter-spacing: -0.05em;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.1;
  position: relative;
  animation: textShadow 1.6s infinite;
}

/* Disable color separation in light mode */
[data-theme="light"] .hero h1 {
  animation: none;
  text-shadow: none;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-light);
}

.hero-rule {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
  margin: 1.2rem auto 0;
}

/* Soundwave */
.soundwave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 40px;
  margin: 1.25rem auto 0;
}

.soundwave span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.6;
  animation: wave 1.4s ease-in-out infinite;
}

/* Stagger each bar with a different delay and height */
.soundwave span:nth-child(1)  { height: 8px;  animation-delay: 0.0s; }
.soundwave span:nth-child(2)  { height: 16px; animation-delay: 0.1s; }
.soundwave span:nth-child(3)  { height: 24px; animation-delay: 0.2s; }
.soundwave span:nth-child(4)  { height: 14px; animation-delay: 0.15s; }
.soundwave span:nth-child(5)  { height: 30px; animation-delay: 0.05s; }
.soundwave span:nth-child(6)  { height: 20px; animation-delay: 0.25s; }
.soundwave span:nth-child(7)  { height: 10px; animation-delay: 0.3s; }
.soundwave span:nth-child(8)  { height: 26px; animation-delay: 0.1s; }
.soundwave span:nth-child(9)  { height: 18px; animation-delay: 0.2s; }
.soundwave span:nth-child(10) { height: 34px; animation-delay: 0.0s; }
.soundwave span:nth-child(11) { height: 22px; animation-delay: 0.35s; }
.soundwave span:nth-child(12) { height: 12px; animation-delay: 0.15s; }
.soundwave span:nth-child(13) { height: 28px; animation-delay: 0.05s; }
.soundwave span:nth-child(14) { height: 38px; animation-delay: 0.25s; }
.soundwave span:nth-child(15) { height: 16px; animation-delay: 0.3s; }
.soundwave span:nth-child(16) { height: 38px; animation-delay: 0.1s; }
.soundwave span:nth-child(17) { height: 28px; animation-delay: 0.2s; }
.soundwave span:nth-child(18) { height: 12px; animation-delay: 0.0s; }
.soundwave span:nth-child(19) { height: 22px; animation-delay: 0.15s; }
.soundwave span:nth-child(20) { height: 34px; animation-delay: 0.35s; }
.soundwave span:nth-child(21) { height: 18px; animation-delay: 0.05s; }
.soundwave span:nth-child(22) { height: 26px; animation-delay: 0.25s; }
.soundwave span:nth-child(23) { height: 10px; animation-delay: 0.3s; }
.soundwave span:nth-child(24) { height: 20px; animation-delay: 0.1s; }
.soundwave span:nth-child(25) { height: 30px; animation-delay: 0.2s; }
.soundwave span:nth-child(26) { height: 14px; animation-delay: 0.15s; }
.soundwave span:nth-child(27) { height: 24px; animation-delay: 0.05s; }
.soundwave span:nth-child(28) { height: 16px; animation-delay: 0.25s; }
.soundwave span:nth-child(29) { height: 8px;  animation-delay: 0.3s; }
.soundwave span:nth-child(30) { height: 12px; animation-delay: 0.0s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%       { transform: scaleY(1);   opacity: 0.8; }
}

/* Recently Played */
.recent-tracks {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.recent-tracks-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.recent-tracks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recent-track-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.recent-track-art {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  opacity: 0.8;
}

.recent-track-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.recent-track-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-track-artist {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-track-loading {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ============================================================
   SCHEDULE
   ============================================================ */

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.schedule-block {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-accent);
  padding: 1.75rem;
  transition: background-color 0.3s ease;
}

.schedule-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.schedule-subtitle {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* Schedule header row: day toggle + listen live */
.schedule-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Day toggle */
.day-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  width: fit-content;
  overflow: hidden;
  border-radius: var(--radius);
}

.day-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.day-btn:last-child { border-right: none; }
.day-btn:hover { background: var(--bg-warm); color: var(--text); }

.day-btn.active {
  background: var(--border-accent);
  color: #fff;
}

/* Schedule table */
.schedule-table { width: 100%; border-collapse: collapse; }

.schedule-table tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  border-left: 2px solid transparent;
}

.schedule-table tr:last-child { border-bottom: none; }
.schedule-table tr:hover { background: rgba(83, 0, 13, 0.06); }

.schedule-table tr.current-show {
  background: rgba(83, 0, 13, 0.1);
  border-left: 2px solid var(--accent);
}

.schedule-table td {
  padding: 0.65rem 0.5rem;
  vertical-align: middle;
  overflow: hidden;
}

.time-cell {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding-right: 1rem;
  width: 1%;
}

.show-cell {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
}

.show-cell.special { color: var(--accent-light); }

.current-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-bright);
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}

/* Listen Live button in schedule */
.schedule-listen {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-listen-schedule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-listen-schedule:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Sunday note */
.sunday-note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--border-accent);
  background: rgba(83, 0, 13, 0.06);
}

.sunday-note p {
  font-size: 0.92rem;
  color: var(--text-dim);
  font-style: italic;
}

.sunday-note strong { color: var(--accent-light); font-style: normal; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

/* Ad slot */

/* Scanline + color separation wrapper */
.ad-slot-img-wrap {
  position: relative;
}

.ad-slot-img-wrap::after {
  content: ' ';
  display: block;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05));
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  z-index: 1;
}
.ad-slot {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-accent);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.ad-slot-img {
  display: block;
  width: 100%;
  aspect-ratio: 73 / 46;
  object-fit: cover;
  background: var(--bg-warm);
  animation: adColorShift 2.4s infinite;
}

@keyframes adColorShift {
  0%   { filter: drop-shadow(1.5px 0 0 rgba(255,0,80,0.25)) drop-shadow(-1.5px 0 0 rgba(0,30,255,0.25)); }
  15%  { filter: drop-shadow(3px 0 0 rgba(255,0,80,0.2)) drop-shadow(-3px 0 0 rgba(0,30,255,0.2)); }
  30%  { filter: drop-shadow(0.5px 0 0 rgba(255,0,80,0.3)) drop-shadow(-0.5px 0 0 rgba(0,30,255,0.3)); }
  45%  { filter: drop-shadow(2.5px 0 0 rgba(255,0,80,0.15)) drop-shadow(-2.5px 0 0 rgba(0,30,255,0.15)); }
  60%  { filter: drop-shadow(1px 0 0 rgba(255,0,80,0.25)) drop-shadow(-1px 0 0 rgba(0,30,255,0.25)); }
  75%  { filter: drop-shadow(3.5px 0 0 rgba(255,0,80,0.2)) drop-shadow(-3.5px 0 0 rgba(0,30,255,0.2)); }
  90%  { filter: drop-shadow(0.8px 0 0 rgba(255,0,80,0.3)) drop-shadow(-0.8px 0 0 rgba(0,30,255,0.3)); }
  100% { filter: drop-shadow(1.5px 0 0 rgba(255,0,80,0.25)) drop-shadow(-1.5px 0 0 rgba(0,30,255,0.25)); }
}

.ad-placeholder {
  width: 100%;
  aspect-ratio: 73 / 46;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-warm);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px dashed var(--border);
  margin: 0.5rem;
}

/* Info card */
.info-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-accent);
  padding: 1.25rem;
  transition: background-color 0.3s ease;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.info-card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.65;
  font-style: italic;
}

.info-card p + p { margin-top: 0.75rem; }

/* Donate card */
.donate-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-accent);
  border-top: 2px solid var(--accent);
  padding: 1.25rem;
  transition: background-color 0.3s ease;
  text-align: center;
}

.donate-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent-light);
  margin-bottom: 0.6rem;
}

.donate-card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1rem;
}

.btn-donate {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn-donate:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  border-top: 1px solid var(--border-accent);
  background: var(--bg-mid);
  padding: 2.5rem 2rem 1.5rem;
  margin-top: 2rem;
  transition: background-color 0.3s ease;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-partners-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
  text-align: center;
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: center;
}

.footer-partners a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: opacity var(--transition), transform var(--transition);
  opacity: 0.85;
}

.footer-partners a:hover {
  opacity: 1;
  transform: scale(1.08);
}

.footer-partners a img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
}

.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.footer-station-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-station {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-light);
  letter-spacing: 0.08em;
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Tablet (768px – 1024px) --- */
@media (max-width: 1024px) {

  /* Header: stack logo above player, auto height */
  header {
    height: auto;
    position: relative; /* unstick on tablet — optional, remove if you want sticky */
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 2rem;
    position: relative;
  }

  .station-logo {
    height: 180px;
  }

  .station-logo img {
    height: 180px;
  }

  .header-right {
    position: static;
    transform: none;
    width: 90%;
    max-width: 600px;
  }

  .header-player-wrap {
    width: 100%;
  }

  /* Single column main */
  main {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.5rem;
  }

  /* Sidebar becomes single column */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero { padding: 2rem 1.5rem; }
  .hero::before { font-size: 10rem; }

  footer { padding: 2rem 1.5rem 1rem; }
}

/* --- Mobile (<768px) --- */
@media (max-width: 768px) {

  header { position: relative; }

  .header-inner {
    padding: 1rem 1rem;
  }

  .station-logo { height: 180px; }
  .station-logo img { height: 180px; }

  .header-right {
    width: 90vw;
    max-width: none;
  }

  .header-player-wrap {
    width: 100%;
    height: auto;
    min-height: 140px;
    padding: 1.6rem 0.75rem 0.75rem;
  }

  /* Reorder main content:
     1. ad-slot-1  (first ad above schedule)
     2. schedule
     3. info-card  (about)
     4. ad-slot-2
     5. donate-card
  */
  main {
    grid-template-columns: 1fr;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  main > section       { order: 2; }
  main > aside         { order: 1; display: contents; }

  .sidebar             { display: contents; }

  /* Target sidebar children by their position in the sidebar */
  .sidebar > .ad-slot:nth-child(1)  { order: 1; }  /* ad 1: before schedule */
  .sidebar > .info-card             { order: 3; }  /* about: after schedule */
  .sidebar > .ad-slot:nth-child(3)  { order: 4; }  /* ad 2: after about */
  .sidebar > .donate-card           { order: 5; }  /* donate: last */

  .hero {
    padding: 1.5rem 1rem;
  }

  .hero::before { font-size: 5rem; }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  footer { padding: 1.5rem 1rem 1rem; }

  .footer-partners {
    gap: 1rem;
  }

  .footer-partners a img {
    width: 120px;
    height: 120px;
  }
}

/* --- Small mobile (<480px) --- */
@media (max-width: 480px) {
  .footer-partners a img {
    width: 90px;
    height: 90px;
  }
}

