:root {
  color-scheme: dark;
  --bg: #204784;
  --panel: #28558f;
  --panel-strong: #478ac9;
  --ink: #ffffff;
  --muted: #c9d8ea;
  --line: rgba(255, 255, 255, 0.18);
  --accent: #adcce9;
  --accent-strong: #8db8e0;
  --amber: #ffffff;
  --danger: #ffaaa5;
  --shadow: 0 24px 70px rgba(8, 28, 57, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 80% 10%, rgba(71, 138, 201, 0.42), transparent 32rem),
    linear-gradient(135deg, #204784 0%, #28558f 55%, #183965 100%);
}

button,
input,
.link-button {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(24, 57, 101, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  border-radius: 0.48rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.top-actions,
.hero-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.solid-button,
.ghost-button,
.outline-button,
.icon-button,
.tab-button,
.play-button {
  min-height: 2.65rem;
  border: 0;
  border-radius: 0.45rem;
  font-weight: 750;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

a.solid-button,
a.ghost-button,
a.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.solid-button {
  padding: 0 1.1rem;
  color: #ffffff;
  background: #478ac9;
}

.solid-button:hover,
.outline-button:hover,
.ghost-button:hover,
.icon-button:hover,
.play-button:hover {
  transform: translateY(-1px);
}

.solid-button:hover {
  background: #387cbd;
}

.ghost-button,
.outline-button {
  padding: 0 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.outline-button {
  background: transparent;
}

.large {
  min-height: 3.15rem;
}

.wide {
  width: 100%;
}

main {
  min-height: calc(100vh - 4.75rem);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 38rem);
  align-items: end;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: calc(100vh - 4.75rem);
  padding: clamp(1.25rem, 5vw, 4rem);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8rem;
  background: linear-gradient(transparent, rgba(32, 71, 132, 0.92));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 43rem;
  padding-bottom: clamp(2rem, 5vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(4rem, 13vw, 9rem);
  line-height: 0.83;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.2rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
}

.lead {
  max-width: 38rem;
  color: #e2edf7;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.55;
}

.hero-media {
  position: relative;
  z-index: 1;
  min-height: min(58vw, 34rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 35%),
    linear-gradient(155deg, #478ac9 0%, #28558f 50%, #183965 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 8% 7% 38%;
  border-radius: 0.5rem;
  background:
    linear-gradient(90deg, rgba(173, 204, 233, 0.12) 0 2px, transparent 2px 14px),
    linear-gradient(#3166a5, #183965);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.meter {
  position: absolute;
  top: 17%;
  width: 0.55rem;
  height: 30%;
  border-radius: 2rem;
  background: linear-gradient(#ffffff 0 24%, var(--accent) 24% 68%, rgba(255, 255, 255, 0.16) 68%);
  box-shadow: 0 0 22px rgba(173, 204, 233, 0.3);
}

.meter-a { left: 18%; }
.meter-b { left: 23%; height: 24%; }
.meter-c { left: 28%; height: 36%; }

.deck {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 11%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.65rem, 2vw, 1.1rem);
  padding: 1.2rem;
  border-radius: 0.5rem;
  background: #183965;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.deck span {
  min-height: 8rem;
  border-radius: 0.35rem;
  background:
    linear-gradient(#3d4642 0 18%, transparent 18% 100%),
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.16) 47% 53%, transparent 53%),
    #173561;
}

.auth-shell,
.app-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.2rem, 5vw, 3.5rem) 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(16rem, 1fr);
  gap: 1rem;
}

.auth-panel,
.price-panel,
.payment-band,
.channels-shell,
.channel-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(40, 85, 143, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel,
.price-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.price-panel {
  display: flex;
  min-height: 21rem;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(173, 204, 233, 0.2), transparent 42%),
    linear-gradient(160deg, #478ac9, #28558f);
}

.price-panel h2 {
  margin-bottom: 0.55rem;
  color: var(--amber);
  font-size: clamp(2.6rem, 7vw, 5rem);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  padding: 0.3rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #183965;
}

.tab-button {
  color: var(--muted);
  background: transparent;
}

.tab-button.active {
  color: var(--ink);
  background: var(--panel-strong);
}

.auth-form,
.payment-form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0 0.85rem;
  color: #122033;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  outline: 0;
}

input:focus {
  border-color: #adcce9;
  box-shadow: 0 0 0 3px rgba(173, 204, 233, 0.25);
}

.form-message {
  min-height: 1.4rem;
  margin: 0.85rem 0 0;
  color: var(--amber);
  font-size: 0.9rem;
}

.app-topbar,
.toolbar,
.manual-stream,
.channel-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-topbar {
  margin-bottom: 1rem;
}

.account-chip {
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  overflow-wrap: anywhere;
}

.payment-band {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(18rem, 1.6fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
}

.payment-form {
  grid-template-columns: 1.35fr 0.6fr 0.5fr auto;
  align-items: end;
}

.channels-shell {
  padding: clamp(1rem, 3vw, 1.3rem);
}

.channels-shell.locked {
  opacity: 0.48;
  pointer-events: none;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-weight: 700;
}

.status-dot {
  width: 0.7rem;
  aspect-ratio: 1;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 114, 111, 0.12);
}

.status-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(52, 208, 161, 0.12);
}

.icon-button {
  width: 2.65rem;
  color: var(--ink);
  background: #183965;
  border: 1px solid var(--line);
}

.manual-stream {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.manual-stream label {
  flex: 1;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.channel-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  box-shadow: none;
}

.channel-card.playing {
  border-color: rgba(52, 208, 161, 0.55);
}

.channel-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.channel-meta,
.stream-url {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.play-button {
  width: 3rem;
  flex: 0 0 auto;
  color: #204784;
  background: #ffffff;
}

audio {
  width: 100%;
  height: 2.7rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.site-footer a,
.privacy-content a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

.privacy-shell {
  width: min(1120px, calc(100% - 2rem));
  min-height: auto;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
}

.privacy-intro {
  max-width: 51rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.privacy-intro h1 {
  max-width: 11ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.92;
}

.privacy-updated {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.privacy-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 45rem);
  align-items: start;
  justify-content: space-between;
  gap: clamp(2rem, 8vw, 7rem);
}

.privacy-contents {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 0.65rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(40, 85, 143, 0.92);
}

.privacy-contents strong {
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-contents a {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.35;
  text-decoration: none;
}

.privacy-contents a:hover {
  color: var(--ink);
}

.privacy-content section {
  padding: 0 0 2.35rem;
  margin: 0 0 2.35rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.privacy-content section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.privacy-content h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.privacy-content p,
.privacy-content li {
  color: #e2edf7;
  line-height: 1.72;
}

.privacy-content ul {
  padding-left: 1.25rem;
}

.privacy-content li + li {
  margin-top: 0.65rem;
}

.legal-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.55;
}

.legal-table th,
.legal-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-table td {
  color: #e2edf7;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 880px) {
  .hero,
  .auth-shell,
  .payment-band {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    min-height: auto;
  }

  .hero-media {
    order: -1;
    min-height: 20rem;
  }

  .payment-form {
    grid-template-columns: 1fr;
  }

  .privacy-layout {
    grid-template-columns: 1fr;
  }

  .privacy-contents {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header,
  .top-actions,
  .hero-actions,
  .app-topbar,
  .toolbar,
  .manual-stream {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    position: static;
  }

  .top-actions,
  .hero-actions {
    width: 100%;
  }

  .top-actions button,
  .top-actions a,
  .hero-actions button,
  .hero-actions a,
  .manual-stream button {
    width: 100%;
  }

  h1 {
    font-size: clamp(3.4rem, 21vw, 5rem);
  }
}
