:root {
  --ink: #f3f8ff;
  --muted: #8495ae;
  --blue: #3d9dff;
  --blue-bright: #7fc8ff;
  --background: #020711;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

.station-shell {
  position: relative;
  display: flex;
  min-height: 100svh;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 20px
    max(24px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.station-shell::before {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 50% -10%, rgba(37, 116, 196, 0.18), transparent 46%),
    linear-gradient(160deg, #050c19 0%, #020711 50%, #030814 100%);
  content: "";
}

.station-shell::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  pointer-events: none;
  content: "";
}

.ambient {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}

.ambient-one {
  top: 12%;
  left: -100px;
  width: 250px;
  height: 250px;
  background: rgba(0, 112, 255, 0.1);
}

.ambient-two {
  right: -120px;
  bottom: 4%;
  width: 290px;
  height: 290px;
  background: rgba(21, 83, 160, 0.1);
}

.player-card {
  position: relative;
  width: min(100%, 410px);
  padding: 24px;
  border: 1px solid rgba(154, 201, 255, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(17, 32, 54, 0.7), rgba(5, 13, 27, 0.76));
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  background: url("./baba-misha-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(125, 198, 255, 0.13));
}

.brand-kicker {
  margin: 0 0 3px;
  color: var(--blue-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(25px, 7vw, 31px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
}

.on-air {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 32px;
  color: #aebdd0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(61, 157, 255, 0.08), 0 0 16px var(--blue);
  animation: live-pulse 2.4s ease-in-out infinite;
}

.player-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 23px 0 24px;
}

.player-main::before {
  position: absolute;
  top: -45px;
  left: 50%;
  z-index: -1;
  width: 270px;
  height: 235px;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse at center,
      rgba(43, 143, 255, 0.13) 0%,
      rgba(19, 82, 161, 0.055) 43%,
      transparent 72%
    );
  pointer-events: none;
  content: "";
  transform: translateX(-50%);
}

.play-button {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  border: 1px solid rgba(128, 198, 255, 0.28);
  border-radius: 50%;
  outline: none;
  color: #dff2ff;
  background:
    radial-gradient(
      circle at 34% 26%,
      rgba(101, 183, 255, 0.17),
      transparent 31%
    ),
    linear-gradient(145deg, #10233b 0%, #071526 53%, #030b16 100%);
  box-shadow:
    0 18px 48px rgba(0, 50, 118, 0.36),
    0 0 32px rgba(43, 147, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.13),
    inset 0 -15px 28px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.play-button::before {
  position: absolute;
  inset: -15px;
  border: 1px solid rgba(99, 183, 255, 0.11);
  border-radius: inherit;
  box-shadow:
    0 0 28px rgba(38, 137, 255, 0.11),
    inset 0 0 18px rgba(54, 156, 255, 0.035);
  content: "";
}

.play-button::after {
  position: absolute;
  inset: -9px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from 210deg,
    transparent 0 36%,
    rgba(119, 203, 255, 0.12) 48%,
    rgba(119, 203, 255, 0.86) 54%,
    rgba(51, 151, 255, 0.16) 64%,
    transparent 76% 100%
  );
  content: "";
  opacity: 0.72;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.play-button:hover {
  transform: scale(1.035);
  border-color: rgba(145, 213, 255, 0.5);
  box-shadow:
    0 22px 58px rgba(0, 68, 156, 0.44),
    0 0 42px rgba(49, 154, 255, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.17),
    inset 0 -15px 28px rgba(0, 0, 0, 0.22);
}

.play-button.is-playing {
  border-color: rgba(147, 217, 255, 0.46);
  box-shadow:
    0 20px 60px rgba(0, 91, 204, 0.36),
    0 0 48px rgba(46, 157, 255, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -15px 28px rgba(0, 0, 0, 0.22);
}

.play-button.is-playing::before {
  animation: broadcast-pulse 2.8s ease-out infinite;
}

.play-button.is-playing::after {
  opacity: 1;
  animation: signal-orbit 7s linear infinite;
}

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

.play-button:focus-visible,
.volume-button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #9dd5ff;
  outline-offset: 4px;
}

.play-ring {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(160, 216, 255, 0.1);
  border-radius: inherit;
  box-shadow: inset 0 0 22px rgba(43, 145, 255, 0.04);
}

.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pause-bars {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.play-button.is-playing .play-triangle {
  display: none;
}

.play-button.is-playing .pause-bars {
  display: flex;
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #e5f6ff;
  filter: drop-shadow(0 0 8px rgba(94, 190, 255, 0.35));
}

.pause-bar {
  width: 7px;
  height: 28px;
  border-radius: 3px;
  background: #e5f6ff;
  box-shadow: 0 0 8px rgba(94, 190, 255, 0.25);
}

.track-info {
  margin-top: 29px;
  text-align: center;
}

.track-label {
  margin: 0 0 8px;
  color: var(--blue-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.track-title {
  margin: 0;
  color: #edf5ff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.volume-control {
  display: grid;
  grid-template-columns: 28px 1fr 30px;
  align-items: center;
  gap: 11px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.volume-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(135, 196, 255, 0.12);
  border-radius: 9px;
  color: #9eb6d0;
  background: linear-gradient(145deg, rgba(22, 45, 74, 0.64), rgba(5, 15, 28, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 7px 18px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.volume-button:hover {
  border-color: rgba(135, 196, 255, 0.3);
  color: #e6f5ff;
  background: linear-gradient(145deg, rgba(27, 58, 94, 0.74), rgba(7, 19, 35, 0.82));
}

.volume-icon {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: currentColor;
}

.volume-wave {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.volume-wave[hidden] {
  display: none;
}

.system-volume-note {
  display: none;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--blue-bright) 0%,
    var(--blue-bright) var(--volume),
    rgba(255, 255, 255, 0.12) var(--volume),
    rgba(255, 255, 255, 0.12) 100%
  );
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  appearance: none;
  border: 3px solid #f5faff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(61, 157, 255, 0.5);
}

input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: var(--blue-bright);
}

input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 3px solid #f5faff;
  border-radius: 50%;
  background: var(--blue);
}

.volume-value {
  color: #71839b;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  text-align: right;
}

footer {
  display: flex;
  width: min(100%, 410px);
  flex-direction: column;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  text-align: center;
}

footer p {
  margin: 0;
  color: #697b93;
  font-size: 11px;
  letter-spacing: 0.04em;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #8294ab;
  font-size: 11px;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

footer a:hover {
  color: #c2d9ef;
  background: rgba(255, 255, 255, 0.035);
}

.external-icon {
  width: 14px;
  height: 14px;
  overflow: visible;
  fill: none;
  stroke: #66819d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
  transition: stroke 160ms ease, transform 160ms ease;
}

footer a:hover .external-icon {
  stroke: #9bc9ef;
  transform: translate(1px, -1px);
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes signal-orbit {
  to {
    transform: rotate(1turn);
  }
}

@keyframes broadcast-pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.96);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@media (min-width: 700px) {
  .station-shell {
    padding: 48px 28px;
  }

  .player-card {
    padding: 30px;
    border-radius: 32px;
  }

  .player-main {
    padding-block: 29px 27px;
  }

  .play-button {
    width: 126px;
    height: 126px;
  }
}

@media (max-height: 690px) and (min-width: 700px) {
  .station-shell {
    justify-content: flex-start;
  }

  .on-air {
    margin-top: 24px;
  }

  .player-main {
    flex-direction: row;
    gap: 25px;
    padding: 22px 3px;
  }

  .play-button {
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
  }

  .track-info {
    margin-top: 0;
    text-align: left;
  }
}

.volume-control.uses-system-volume {
  display: block;
}

.volume-control.uses-system-volume > :not(.system-volume-note) {
  display: none;
}

.volume-control.uses-system-volume .system-volume-note {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #8195ad;
  font-size: 11px;
  letter-spacing: 0.025em;
}

.system-volume-note svg {
  width: 17px;
  height: 17px;
  overflow: visible;
  fill: currentColor;
}

.system-volume-note svg path:not(:first-child) {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

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