:root {
  --yellow: #ffe523;
  --yellow-soft: #fff171;
  --red: #e81922;
  --red-deep: #9e0710;
  --black: #070708;
  --panel: rgba(14, 14, 16, 0.9);
  --muted: #a8a8ad;
  --white: #ffffff;
  --volume: 85%;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  overflow-x: hidden;
  color: var(--white);
  background:
    linear-gradient(rgba(5, 5, 6, 0.78), rgba(5, 5, 6, 0.94)),
    var(--custom-background, none),
    radial-gradient(circle at 50% -5%, #451014 0, #111115 36%, #050506 76%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

.background-glow {
  position: fixed;
  width: 340px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.14;
  pointer-events: none;
  animation: drift 9s ease-in-out infinite alternate;
}

.background-glow--one {
  top: -150px;
  left: -120px;
  background: var(--red);
}

.background-glow--two {
  right: -160px;
  bottom: -160px;
  background: var(--yellow);
  animation-delay: -4s;
}

.player-card {
  position: relative;
  width: min(100%, 460px);
  padding: 24px 24px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 34%),
    var(--panel);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  isolation: isolate;
}

.top-line {
  position: absolute;
  top: 0;
  left: 15%;
  width: 70%;
  height: 3px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, transparent, var(--yellow), var(--red), transparent);
  box-shadow: 0 0 22px rgba(255, 229, 35, 0.5);
}

.station-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-badge,
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--white);
  border: 1px solid rgba(232, 25, 34, 0.48);
  border-radius: 999px;
  background: rgba(232, 25, 34, 0.12);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(232, 25, 34, 0.7);
  animation: live-pulse 1.8s infinite;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.48);
}

.identity {
  padding-top: 10px;
  text-align: center;
}

.logo-stage {
  position: relative;
  width: 184px;
  height: 184px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
}

.logo-halo {
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: var(--yellow);
  filter: blur(32px);
  opacity: 0.18;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.station-logo {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.42));
  transition: transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.is-playing .station-logo {
  animation: logo-breathe 3.2s ease-in-out infinite;
}

.is-playing .logo-halo {
  opacity: 0.3;
  transform: scale(1.12);
}

h1 {
  margin: 0;
  line-height: 0.98;
  text-transform: uppercase;
}

h1 span,
h1 strong {
  display: block;
}

h1 span {
  font-size: clamp(1.25rem, 5.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.09em;
}

h1 strong {
  margin-top: 7px;
  color: var(--yellow);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(2.45rem, 11vw, 3.35rem);
  letter-spacing: -0.045em;
  text-shadow: 0 4px 0 rgba(158, 7, 16, 0.9);
}

.slogan {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.broadcast {
  position: relative;
  margin-top: 16px;
  padding: 24px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.equalizer {
  position: absolute;
  inset: 18px 14px auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  opacity: 0.23;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 16%, black 84%, transparent);
}

.equalizer span {
  width: 5px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(to top, var(--red), var(--yellow));
  transform-origin: center;
}

.is-playing .equalizer {
  opacity: 0.52;
}

.is-playing .equalizer span {
  animation: equalize 0.82s ease-in-out infinite alternate;
}

.equalizer span:nth-child(2n) { animation-duration: 0.58s; }
.equalizer span:nth-child(3n) { animation-duration: 1.05s; }
.equalizer span:nth-child(4n) { animation-delay: -0.34s; }
.equalizer span:nth-child(5n) { animation-delay: -0.6s; }

.play-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 0;
  color: var(--black);
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--yellow-soft), var(--yellow));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.5),
    0 0 0 7px rgba(255, 229, 35, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.25s ease;
}

.play-button:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.55),
    0 0 0 9px rgba(255, 229, 35, 0.1);
}

.play-button:active {
  transform: scale(0.96);
}

.play-button:focus-visible,
.share-button:focus-visible,
.icon-button:focus-visible,
.social-link:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(255, 229, 35, 0.55);
  outline-offset: 4px;
}

.play-button svg {
  width: 45px;
  height: 45px;
  fill: currentColor;
}

.play-icon {
  margin-left: 5px;
}

.pause-icon,
.loading-ring {
  display: none;
}

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

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

.is-loading .play-icon,
.is-loading .pause-icon {
  display: none;
}

.is-loading .loading-ring {
  width: 35px;
  height: 35px;
  display: block;
  border: 4px solid rgba(7, 7, 8, 0.22);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.status-copy {
  min-height: 24px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.94rem;
  font-weight: 720;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #77777c;
  box-shadow: 0 0 10px transparent;
}

.is-playing .connection-dot {
  background: #34db78;
  box-shadow: 0 0 12px rgba(52, 219, 120, 0.62);
}

.is-error .connection-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(232, 25, 34, 0.65);
}

.signal-details {
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.signal-details i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.volume-control {
  margin-top: 14px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: 34px 1fr 44px;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.volume-off-icon {
  display: none;
}

.is-muted .volume-on-icon {
  display: none;
}

.is-muted .volume-off-icon {
  display: block;
}

input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow) var(--volume), rgba(255, 255, 255, 0.14) var(--volume));
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  appearance: none;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 229, 35, 0.28);
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px rgba(255, 229, 35, 0.28);
}

output {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: right;
}

.social-links {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.social-links.has-links {
  display: grid;
}

.social-link {
  min-height: 43px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  color: var(--yellow);
  border-color: rgba(255, 229, 35, 0.3);
  background: rgba(255, 229, 35, 0.06);
}

.share-button {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--white);
  border: 1px solid rgba(255, 229, 35, 0.3);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(232, 25, 34, 0.23), rgba(255, 229, 35, 0.08));
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease;
}

.share-button:hover {
  border-color: rgba(255, 229, 35, 0.58);
  transform: translateY(-1px);
}

.share-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

footer {
  padding-top: 14px;
  text-align: center;
}

footer p,
footer a {
  margin: 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.68rem;
  text-decoration: none;
}

footer strong {
  color: rgba(255, 255, 255, 0.52);
}

footer a {
  display: inline-block;
  margin-top: 4px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  color: var(--black);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

noscript {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  color: white;
  background: #a40008;
  text-align: center;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 25, 34, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(232, 25, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 25, 34, 0); }
}

@keyframes equalize {
  from { height: 8px; transform: scaleY(0.75); }
  to { height: 57px; transform: scaleY(1); }
}

@keyframes logo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}

@keyframes drift {
  to { transform: translate3d(35px, 24px, 0) scale(1.1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 420px) {
  body {
    padding-inline: 10px;
  }

  .player-card {
    padding: 20px 17px 16px;
    border-radius: 25px;
  }

  .logo-stage {
    width: 160px;
    height: 160px;
  }

  .station-logo {
    width: 148px;
    height: 148px;
  }

  .broadcast {
    padding-inline: 10px;
  }
}

@media (max-height: 700px) and (orientation: landscape) {
  body {
    display: block;
  }

  .player-card {
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
