/* ClubBeat Radio – wspólne style playerów do osadzania. */
:root {
  --bg1: #0e1a44; --bg2: #1b1f6b; --text: #eef3ff; --muted: #b7c5ec;
  --mag: #ff2bd6; --pink: #f51c67; --cyan: #00e5ff; --violet: #a855ff;
  --line: rgba(130, 170, 255, .26);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.head { font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif; font-weight: 800; letter-spacing: .02em; }

/* przycisk play / pauza */
.play {
  position: relative; flex: none; display: grid; place-items: center;
  width: var(--size, 52px); height: var(--size, 52px); padding: 0; border: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--mag));
  color: #fff; cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 43, 214, .55), 0 8px 22px rgba(245, 28, 103, .45);
  transition: transform .2s, box-shadow .2s;
  animation: cbPulse 2.4s ease-out infinite;
}
.play:hover { transform: scale(1.07); }
.play:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.play svg { width: 42%; height: 42%; }
.play .i-pause, .play .spin { display: none; }
[data-state="playing"] .play { animation: none; }
[data-state="playing"] .play .i-play, [data-state="loading"] .play .i-play { display: none; }
[data-state="playing"] .play .i-pause { display: block; }
[data-state="loading"] .play .spin {
  display: block; position: absolute; inset: -5px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--cyan); border-right-color: var(--cyan);
  animation: cbSpin .9s linear infinite;
}
[data-state="loading"] .play .i-pause { display: block; opacity: .6; }
@keyframes cbPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 43, 214, .55), 0 8px 22px rgba(245, 28, 103, .45); }
  70% { box-shadow: 0 0 0 14px rgba(255, 43, 214, 0), 0 8px 22px rgba(245, 28, 103, .45); }
  100% { box-shadow: 0 0 0 0 rgba(255, 43, 214, 0), 0 8px 22px rgba(245, 28, 103, .45); }
}
@keyframes cbSpin { to { transform: rotate(360deg); } }

/* przewijany tytuł */
.clip { overflow: hidden; white-space: nowrap; min-width: 0; }
.clip > span { display: inline-block; white-space: nowrap; }
.clip > span.is-marquee { animation: cbMarquee var(--dur, 10s) ease-in-out infinite alternate; }
@keyframes cbMarquee { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--shift)); } }

/* znaczek NA ŻYWO */
.live {
  display: none; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  background: rgba(245, 28, 103, .2); border: 1px solid rgba(245, 28, 103, .6);
  font: 700 10px/1.5 'Montserrat', 'Segoe UI', sans-serif; letter-spacing: .08em; color: #fff;
}
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); animation: cbBlink 1.2s infinite; }
.is-live .live { display: inline-flex; }
@keyframes cbBlink { 50% { opacity: .25; } }

/* korektor (animacja tylko podczas grania) */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: linear-gradient(var(--cyan), var(--mag)); }
[data-state="playing"] .eq i { animation: cbEq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; }
.eq i:nth-child(3) { animation-delay: -.6s !important; }
.eq i:nth-child(4) { animation-delay: -.15s !important; }
.eq i:nth-child(5) { animation-delay: -.45s !important; }
@keyframes cbEq { 0% { height: 20%; } 100% { height: 100%; } }

/* głośność */
.vol { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.vol svg { width: 18px; height: 18px; flex: none; }
.vol input {
  -webkit-appearance: none; appearance: none; width: 84px; height: 4px; border-radius: 4px; margin: 0;
  background: linear-gradient(90deg, var(--cyan), var(--mag) var(--v, 80%), rgba(255, 255, 255, .2) var(--v, 80%));
  cursor: pointer;
}
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px var(--mag); }
.vol input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 8px var(--mag); }
.vol input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

.status { font-size: 11px; color: var(--muted); min-height: 1em; }
.site { text-decoration: none; color: var(--muted); font-size: 11px; }
.site:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .play, .clip > span.is-marquee, [data-state="playing"] .eq i, .live::before { animation: none !important; }
}
