/* Olisa's radio */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #000; color: #fff; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #fff; }

.rd-backdrop { position: fixed; inset: -12%; z-index: 0; }
.rd-backdrop img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(70px) saturate(1.4) brightness(0.5); transform: scale(1.2);
  opacity: 0; transition: opacity 2s ease;
}
.rd-backdrop img.show { opacity: 1; }
.rd-vignette { position: fixed; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%); pointer-events: none; }
.rd-grain {
  position: fixed; inset: -50%; z-index: 1; opacity: 0.07; pointer-events: none; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.rd-bar { position: fixed; left: 0; right: 0; height: 8vh; background: #000; z-index: 3; }
.rd-bar-top { top: 0; } .rd-bar-bottom { bottom: 0; }

.rd-home {
  position: fixed; top: calc(8vh + 1rem); left: 1.25rem; z-index: 5; text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.55;
}
.rd-home:hover { opacity: 1; }
.rd-onair {
  position: fixed; top: calc(8vh + 1rem); right: 1.25rem; z-index: 5; display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.6;
}
.rd-onair .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 10px #ff3b30; }
.rd-onair.live .dot { animation: rd-blink 1.6s ease-in-out infinite; }
@keyframes rd-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

main.rd-stage {
  position: relative; z-index: 4; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10vh 1.25rem 16vh;
}
.rd-eyebrow { font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; }
.rd-station { margin-top: 0.4rem; font-size: 0.95rem; letter-spacing: 0.12em; opacity: 0.85; min-height: 1.4em; }
.rd-frame {
  padding: 10px; border-radius: 26px; background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 50px 140px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: rd-float 9s ease-in-out infinite;
}
.rd-art {
  width: min(48vmin, 22rem); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #111;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4); position: relative;
}
@keyframes rd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.rd-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s ease; }
.rd-art img.show { opacity: 1; }
.rd-title { margin-top: 2.2rem; font-weight: 300; line-height: 1.15; letter-spacing: 0.03em; font-size: clamp(1.5rem, 4.5vw, 2.6rem); min-height: 1.2em; max-width: 36rem; text-shadow: 0 2px 30px rgba(0,0,0,0.6); }

/* Only the cover and the title are always on screen. The dock (controls, progress, status) and the
   corner labels appear when the mouse moves or the screen is tapped, then fade again. */
.rd-dock {
  position: fixed; left: 0; right: 0; bottom: calc(8vh + 1.25rem); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0 1.25rem;
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
body.on-radio .rd-home, body.on-radio .rd-onair { opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
body.show-controls .rd-dock, body.show-controls .rd-home, body.show-controls .rd-onair { opacity: 1; pointer-events: auto; }
body.embed-mode .rd-dock { bottom: calc(8vh + 7.25rem); }
.rd-dock .rd-progress { margin-top: 0; }
.rd-dock .rd-controls { margin-top: 1rem; min-height: 3.2rem; }
.rd-dock .rd-status { margin-top: 0.4rem; }
.rd-dock .rd-meta { margin-top: 0.4rem; }
.rd-artist { margin-top: 0.7rem; font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.65; min-height: 1.2em; }
.rd-progress { margin-top: 1.4rem; width: min(50vmin, 20rem); height: 2px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden; }
.rd-progress > div { height: 100%; width: 0; background: #fff; opacity: 0.8; }

.rd-controls { margin-top: 1.75rem; display: flex; align-items: center; gap: 1.25rem; min-height: 3.4rem; }
.rd-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; color: #000; background: #fff;
  padding: 0.9rem 1.8rem; border-radius: 999px; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform 0.2s, opacity 0.2s;
}
.rd-btn:hover { transform: translateY(-1px); }
.rd-btn[disabled] { opacity: 0.4; cursor: default; transform: none; }
.rd-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.rd-icon {
  appearance: none; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: #fff;
  width: 3.2rem; height: 3.2rem; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.rd-icon svg { width: 1.1rem; height: 1.1rem; fill: #fff; }
.rd-icon:hover { background: rgba(255,255,255,0.18); }
.rd-volume { -webkit-appearance: none; appearance: none; width: 7rem; height: 2px; background: rgba(255,255,255,0.3); border-radius: 2px; outline: none; }
.rd-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.rd-volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
.rd-status { margin-top: 1rem; font-size: 0.8rem; letter-spacing: 0.12em; opacity: 0.55; min-height: 1.2em; }
.rd-meta { margin-top: 0.9rem; display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; font-size: 0.8rem; letter-spacing: 0.1em; }
.rd-source { opacity: 0.5; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.7rem; }
.rd-link { text-decoration: none; opacity: 0.7; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 2px; }
.rd-link:hover { opacity: 1; }
.rd-switch { appearance: none; background: none; border: 0; color: #fff; font: inherit; font-size: 0.8rem; letter-spacing: 0.1em; opacity: 0.45; cursor: pointer; border-bottom: 1px solid transparent; }
.rd-switch:hover { opacity: 0.9; border-bottom-color: rgba(255,255,255,0.4); }

/* the chooser: one half per service */
.rd-choose { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; background: #000; }
.rd-half {
  appearance: none; border: 0; cursor: pointer; color: #fff; font: inherit; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 2rem;
  background: #000; transition: background 0.5s ease;
}
.rd-half::before { content: ""; position: absolute; inset: 0; opacity: 0.35; transition: opacity 0.5s ease, transform 0.8s ease; transform: scale(1); }
.rd-half-apple::before { background: radial-gradient(ellipse at 50% 60%, #fc3c5a 0%, #b5002c 40%, #000 80%); }
.rd-half-spotify::before { background: radial-gradient(ellipse at 50% 60%, #1ed760 0%, #0f6f33 40%, #000 80%); }
.rd-half:hover::before, .rd-half:focus-visible::before { opacity: 0.85; transform: scale(1.08); }
.rd-half:focus-visible { outline: none; }
.rd-half > * { position: relative; }
.rd-half-icon svg { width: clamp(64px, 10vw, 96px); height: auto; transition: transform 0.5s cubic-bezier(.2,.8,.2,1); }
.rd-half:hover .rd-half-icon svg { transform: translateY(-6px) scale(1.06); }
.rd-half-name { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 300; letter-spacing: 0.08em; margin-top: 0.5rem; }
.rd-choose-hint {
  position: absolute; left: 50%; bottom: 10vh; transform: translateX(-50%); z-index: 2; pointer-events: none;
  padding: 0.55rem 1rem; border-radius: 999px; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.78rem; letter-spacing: 0.08em; opacity: 0.8; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.rd-choose.leaving { animation: rd-leave 0.7s ease forwards; }
@keyframes rd-leave { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }

/* Spotify's embedded player, used when full playback isn't available */
.rd-embed { position: fixed; left: 50%; bottom: calc(8vh + 0.75rem); transform: translateX(-50%); z-index: 6; width: min(92vw, 28rem); }
.rd-embed iframe { border-radius: 12px; }


[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .rd-onair.live .dot { animation: none; } .rd-frame { animation: none; } }
@media (max-width: 640px) {
  .rd-choose { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .rd-choose-hint { bottom: 7vh; font-size: 0.72rem; }
}
@media (max-width: 480px) {
  .rd-bar { height: 6vh; }
  .rd-embed { bottom: calc(6vh + 0.5rem); }
  .rd-home, .rd-onair { top: calc(6vh + 0.8rem); }
  .rd-art { width: min(66vw, 18rem); } .rd-progress { width: min(66vw, 18rem); }
  .rd-dock { bottom: calc(6vh + 0.9rem); }
  body.embed-mode .rd-dock { bottom: calc(6vh + 6.5rem); }
  .rd-frame { padding: 7px; border-radius: 20px; } .rd-art { border-radius: 14px; }
  .rd-controls { gap: 0.9rem; }
  .rd-volume { width: 5rem; }
}
