:root {
  --ink: #f7f9ff;
  --muted: #9eabc7;
  --panel: rgba(8, 23, 57, 0.82);
  --panel-strong: rgba(12, 31, 72, 0.94);
  --line: rgba(148, 171, 219, 0.17);
  --station-accent: #2f9cff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #030b20;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, #173c75 0%, transparent 38%),
    linear-gradient(160deg, #06132f 0%, #03091b 65%, #07132c 100%);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--station-accent), white 20%);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  padding: 28px 18px;
  display: grid;
  place-items: center;
}

.ambient {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.16;
}

.ambient-one {
  top: -160px;
  left: -120px;
  background: #3da8ff;
}

.ambient-two {
  right: -180px;
  bottom: -140px;
  background: var(--station-accent);
}

.app-card {
  position: relative;
  width: min(100%, 520px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(165deg, rgba(14, 37, 83, 0.92), rgba(4, 14, 37, 0.96));
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
}

.brand img {
  width: 190px;
  height: auto;
  display: block;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(84, 236, 173, 0.22);
  border-radius: 999px;
  color: #8ff1c4;
  background: rgba(28, 146, 96, 0.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.live-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52e7a6;
  box-shadow: 0 0 12px #52e7a6;
  animation: pulse 1.8s ease-in-out infinite;
}

.station-switcher {
  margin-top: 25px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 6, 21, 0.46);
}

.station-switcher button {
  min-height: 62px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.station-switcher button:active {
  transform: scale(0.98);
}

.station-switcher button.active {
  color: white;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--station-accent), transparent 68%),
      rgba(255, 255, 255, 0.06)
    );
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--station-accent), transparent 50%);
}

.station-switcher span,
.station-switcher small {
  display: block;
}

.installation-guide {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid
    color-mix(in srgb, var(--station-accent), transparent 48%);
  border-radius: 16px;
  color: white;
  text-align: left;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--station-accent), transparent 78%),
      rgba(255, 255, 255, 0.035)
    );
}

.installation-guide-title {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
}

.install-hint-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--station-accent);
  font-size: 21px;
  font-weight: 900;
}

.installation-guide-title strong,
.installation-guide-title small {
  display: block;
}

.installation-guide-title strong {
  font-size: 13px;
}

.installation-guide-title small {
  margin-top: 4px;
  color: #aab8d3;
  font-size: 10px;
  line-height: 1.35;
}

.installation-guide p {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: #aab8d3;
  font-size: 11px;
  line-height: 1.5;
}

.installation-guide p strong {
  color: #eef5ff;
}

.station-switcher span {
  font-size: 15px;
  font-weight: 800;
}

.station-switcher small {
  margin-top: 3px;
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.now-playing-card {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 154px 1fr;
  align-items: center;
  gap: 22px;
}

.cover-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 27px;
  overflow: hidden;
  background: #07153d;
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.cover-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.signal-bars {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  height: 30px;
  padding: 7px 8px;
  display: flex;
  align-items: end;
  gap: 3px;
  border-radius: 10px;
  background: rgba(1, 7, 20, 0.76);
  backdrop-filter: blur(8px);
}

.signal-bars i {
  width: 3px;
  height: 8px;
  border-radius: 4px;
  background: var(--station-accent);
}

.signal-bars.playing i {
  animation: bars 0.8s ease-in-out infinite alternate;
}

.signal-bars.playing i:nth-child(2) {
  animation-delay: -0.45s;
}

.signal-bars.playing i:nth-child(3) {
  animation-delay: -0.2s;
}

.signal-bars.playing i:nth-child(4) {
  animation-delay: -0.6s;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--station-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.track-copy h1 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: white;
  font-size: clamp(23px, 5vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.artist {
  margin: 9px 0 0;
  color: #cdd7ee;
  font-size: 16px;
  line-height: 1.35;
}

.station-line {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.station-line span {
  margin: 0 3px;
  color: var(--station-accent);
}

.player-controls {
  margin-top: 24px;
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  gap: 12px;
}

.play-button {
  width: 82px;
  height: 82px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #041129;
  background: var(--station-accent);
  box-shadow:
    0 16px 32px color-mix(in srgb, var(--station-accent), transparent 72%),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.play-button:hover {
  filter: brightness(1.08);
}

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

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

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-control svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: #a9b8d7;
}

.volume-control input {
  width: 100%;
  accent-color: var(--station-accent);
}

.listener-count {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aebbd6;
  font-size: 12px;
  font-weight: 700;
}

.listener-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--station-accent);
}

.player-status {
  min-height: 18px;
  margin: 4px 0 0;
  color: #8999ba;
  text-align: center;
  font-size: 12px;
}

.player-status.error {
  color: #ff9299;
}

.quick-actions {
  margin-top: 23px;
  display: grid;
  gap: 9px;
}

.quick-actions a,
.action-disabled {
  min-height: 67px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.quick-actions a:hover {
  transform: translateY(-1px);
  border-color: color-mix(
    in srgb,
    var(--station-accent),
    transparent 55%
  );
  background: rgba(255, 255, 255, 0.06);
}

.action-disabled {
  color: #7f8aa4;
  cursor: not-allowed;
}

.action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--station-accent);
  background: color-mix(
    in srgb,
    var(--station-accent),
    transparent 88%
  );
  font-size: 19px;
  font-weight: 900;
}

.quick-actions strong,
.quick-actions small {
  display: block;
}

.quick-actions strong {
  font-size: 14px;
}

.quick-actions small {
  margin-top: 4px;
  color: #8695b3;
  font-size: 11px;
}

.quick-actions svg {
  width: 17px;
  height: 17px;
  fill: #70809f;
}

.install-button {
  width: 100%;
  min-height: 53px;
  margin-top: 16px;
  border: 1px solid
    color-mix(in srgb, var(--station-accent), transparent 46%);
  border-radius: 16px;
  color: #eaf4ff;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--station-accent), transparent 70%),
      rgba(255, 255, 255, 0.035)
    );
  font-weight: 800;
  cursor: pointer;
}

.install-button span {
  margin-right: 8px;
  color: var(--station-accent);
  font-size: 19px;
}

footer {
  margin-top: 19px;
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #64718e;
  text-align: center;
  font-size: 10px;
}

.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 20px;
  display: grid;
  place-items: end center;
  background: rgba(0, 5, 18, 0.72);
  backdrop-filter: blur(10px);
}

.install-sheet {
  position: relative;
  width: min(100%, 480px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0a1c42;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #bdc9e0;
  background: rgba(255, 255, 255, 0.07);
  font-size: 24px;
  cursor: pointer;
}

.install-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: linear-gradient(145deg, #2f9cff, #e5233f);
  font-weight: 900;
}

.install-sheet h2 {
  margin: 19px 0 10px;
  font-size: 24px;
}

.install-sheet p {
  margin: 10px 0 0;
  color: #aab8d3;
  font-size: 14px;
  line-height: 1.65;
}

.install-sheet ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: #aab8d3;
  font-size: 14px;
  line-height: 1.65;
}

.install-sheet li + li {
  margin-top: 5px;
}

.external-icon {
  color: #70809f;
  font-size: 18px;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes bars {
  from {
    height: 6px;
  }
  to {
    height: 18px;
  }
}

@media (max-width: 540px) {
  .app-shell {
    padding: 0;
    place-items: start center;
  }

  .app-card {
    min-height: 100dvh;
    padding: 22px 18px 28px;
    border: 0;
    border-radius: 0;
    background:
      linear-gradient(165deg, rgba(12, 34, 77, 0.97), rgba(3, 12, 33, 0.99));
  }

  .brand img {
    width: 164px;
  }

  .now-playing-card {
    grid-template-columns: 126px 1fr;
    gap: 17px;
  }

  .cover-wrap {
    border-radius: 23px;
  }

  .track-copy h1 {
    font-size: 24px;
  }

  .player-controls {
    grid-template-columns: 1fr 78px 1fr;
  }

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

@media (max-width: 380px) {
  .now-playing-card {
    grid-template-columns: 108px 1fr;
  }

  .track-copy h1 {
    font-size: 21px;
  }

  .station-line {
    display: none;
  }
}

@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;
  }
}
