/* ============================================================
   OCEANSOUL RADIO — ocean-themed player styles
   Palette: deep navy → teal → aqua blue · emerald green · gold accents
   ============================================================ */

:root {
  --bg-0: #03121f;
  --bg-1: #04263a;
  --bg-2: #05324a;

  --navy: #0a2f4d;
  --blue: #3b82f6;
  --aqua: #22d3ee;
  --teal: #14b8a6;
  --emerald: #10b981;
  --green: #34d399;
  --gold: #fbbf24;

  --text: #eaf7ff;
  --text-dim: #9fc3d8;
  --text-faint: #6d93ab;

  --glass-bg: rgba(13, 52, 78, 0.35);
  --glass-border: rgba(139, 220, 255, 0.14);
  --glass-blur: blur(22px) saturate(150%);

  --grad-brand: linear-gradient(135deg, var(--aqua) 0%, var(--teal) 45%, var(--emerald) 100%);
  --shadow-glow: 0 18px 60px -12px rgba(34, 211, 238, 0.35);
  --radius: 26px;

  --font-display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100dvh;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(1000px 600px at 8% 108%, rgba(16, 185, 129, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- ambient background layers ---------- */

#bubbles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  animation: glowFloat 14s ease-in-out infinite alternate;
}
.bg-glow-1 {
  width: 480px; height: 480px;
  top: -140px; right: -120px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
}
.bg-glow-2 {
  width: 520px; height: 520px;
  bottom: -180px; left: -160px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35), transparent 70%);
  animation-delay: -6s;
}
@keyframes glowFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(30px, 24px, 0) scale(1.08); }
}

.rays {
  position: fixed;
  inset: -40% -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 0%,
      rgba(125, 211, 252, 0.05) 0deg 6deg,
      transparent 6deg 24deg
    );
  animation: raysDrift 40s linear infinite;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 70%);
}
@keyframes raysDrift {
  from { transform: rotate(0deg); }
  to   { transform: rotate(8deg); }
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1080px;
  padding: 22px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.35), 0 8px 28px -6px rgba(34, 211, 238, 0.6);
  object-fit: cover;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand-text strong em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--aqua);
}
.brand-domain { font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.6px; }

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--text-dim);
}
.live-pill.is-live { color: var(--text); border-color: rgba(52, 211, 153, 0.5); }
.live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #64748b;
}
.is-live .live-dot {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.live-listeners { font-weight: 500; letter-spacing: 0; color: var(--text-faint); }

/* ---------- stage layout ---------- */

.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  padding: 26px 24px 40px;
  margin: 0 auto;
}

/* ---------- glass card base ---------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 70px -30px rgba(2, 12, 22, 0.85);
}

/* ---------- player card ---------- */

.player {
  padding: 38px 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.player::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 300px at 50% -10%, rgba(34, 211, 238, 0.14), transparent 65%),
    radial-gradient(420px 260px at 90% 110%, rgba(16, 185, 129, 0.12), transparent 65%);
  pointer-events: none;
}

/* -- disc + cover -- */

.disc-zone { position: relative; }
.disc {
  width: 218px;
  height: 218px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0 3px, rgba(255,255,255,0.018) 3px 4px),
    radial-gradient(circle at 50% 50%, rgba(13, 52, 78, 0.9) 0 40%, transparent 40.5%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0 1.5%, rgba(0,0,0,0.5) 1.5% 2.4%, transparent 2.5%),
    radial-gradient(circle at 50% 50%, rgba(13, 52, 78, 0.95) 0 9%, transparent 9.2%),
    linear-gradient(140deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 40%, rgba(0,0,0,0.25));
  box-shadow:
    inset 0 0 0 1px rgba(139, 220, 255, 0.16),
    0 22px 55px -18px rgba(2, 12, 22, 0.9),
    0 0 60px -18px rgba(34, 211, 238, 0.45);
  transition: box-shadow 0.5s ease;
}
.disc::after { /* vinyl sheen sweep */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.10) 46%, rgba(255,255,255,0.02) 52%, transparent 66%);
}
.disc .cover {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  box-shadow: 0 6px 22px -4px rgba(0,0,0,0.6);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
body.is-playing .disc { animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* equalizer bars under the disc */
.eq {
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 16px;
  opacity: 0.45;
}
.eq i {
  width: 4px;
  border-radius: 3px;
  background: var(--grad-brand);
  height: 4px;
  transition: height 0.3s ease;
}
body.is-playing .eq i { animation: eqBounce 1s ease-in-out infinite; }
body.is-playing .eq i:nth-child(1) { animation-duration: 0.9s; }
body.is-playing .eq i:nth-child(2) { animation-duration: 1.2s; animation-delay: 0.1s; }
body.is-playing .eq i:nth-child(3) { animation-duration: 0.7s; }
body.is-playing .eq i:nth-child(4) { animation-duration: 1.1s; animation-delay: 0.2s; }
body.is-playing .eq i:nth-child(5) { animation-duration: 0.85s; animation-delay: 0.05s; }
@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50%      { height: 16px; }
}

/* -- metadata -- */

.meta { width: 100%; display: flex; flex-direction: column; gap: 10px; }

.meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.4s ease;
}
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; transition: background 0.4s ease, box-shadow 0.4s ease; }

.status-tag.is-loading { color: var(--text); border-color: rgba(251, 191, 36, 0.45); }
.status-tag.is-loading .tag-dot { background: var(--gold); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6); animation: livePulse 1.4s ease-out infinite; }
.status-tag.is-playing { color: var(--green); border-color: rgba(52, 211, 153, 0.5); }
.status-tag.is-playing .tag-dot { background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: livePulse 1.8s ease-out infinite; }
.status-tag.is-direct { color: var(--aqua); border-color: rgba(34, 211, 238, 0.5); }
.status-tag.is-direct .tag-dot { background: var(--aqua); box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); animation: livePulse 1.8s ease-out infinite; }

.bitrate {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 1px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}

.song-title-wrap {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.song-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  letter-spacing: 0.2px;
  line-height: 1.2;
  display: inline-block;
  padding: 2px 0;
  background: linear-gradient(120deg, #ffffff 20%, #a5f3fc 55%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.song-title.fade { opacity: 0.12; transform: translateY(3px); }
.song-title.marquee { animation: marquee 14s linear infinite; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.song-artist {
  font-size: 0.95rem;
  color: var(--text-dim);
  min-height: 1.4em;
  letter-spacing: 0.2px;
  transition: opacity 0.35s ease;
}

/* -- controls -- */

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.ctl-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s ease;
}
.ctl-btn svg { width: 21px; height: 21px; }
.ctl-btn .icon-muted { display: none; }
.ctl-btn.on .icon-vol { display: none; }
.ctl-btn.on .icon-muted { display: block; }
.ctl-btn:hover { color: var(--text); transform: translateY(-2px); border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 10px 24px -10px rgba(34, 211, 238, 0.5); }
.ctl-btn:active { transform: scale(0.94); }
.ctl-btn.on { color: var(--aqua); border-color: rgba(34, 211, 238, 0.6); }

.play-btn {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  background: var(--grad-brand);
  color: #032430;
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 7px rgba(34, 211, 238, 0.12),
    0 18px 45px -10px rgba(20, 184, 166, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.play-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(34, 211, 238, 0.16), 0 22px 55px -10px rgba(20, 184, 166, 0.7); }
.play-btn:active { transform: scale(0.96); }
.play-btn svg { width: 36px; height: 36px; }
.icon-pause { display: none; }
.icon-play { margin-left: 4px; }

body.is-playing .icon-play { display: none; }
body.is-playing .icon-pause { display: block; }

.play-btn .spinner {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.play-btn.is-buffering .spinner { opacity: 1; animation: spin 0.8s linear infinite; }

/* -- volume -- */

.volume-row {
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.volume-row::before {
  content: "";
  width: 18px; height: 18px;
  flex: none;
  opacity: 0.55;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5' fill='black' stroke='none'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5' fill='black' stroke='none'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--text-dim);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aqua) var(--fill, 85%), rgba(255,255,255,0.12) var(--fill, 85%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--aqua);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--aqua);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: transparent; }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1080px;
  padding: 6px 24px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  transition: all 0.25s ease;
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -8px rgba(34, 211, 238, 0.55);
}
.tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}
.copy {
  font-size: 0.72rem;
  color: var(--text-faint);
}
.copy a { color: var(--aqua); text-decoration: none; }
.copy a:hover { text-decoration: underline; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 50;
  background: rgba(4, 26, 43, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .player { padding: 30px 22px 24px; }
  .disc { width: 176px; height: 176px; }
  .disc .cover { width: 104px; height: 104px; }
  .play-btn { width: 76px; height: 76px; }
  .site-header { padding: 18px 16px 4px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-text strong { font-size: 1.05rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .song-title.marquee { animation: none; }
}
