:root {
  --bg: #071827;
  --panel: #0d2740;
  --panel-2: #123653;
  --text: #f8fafc;
  --muted: #c8d6e2;
  --brand: #00c2ff;
  --brand-2: #d6fb41;
  --danger: #ff6678;
  --card-radius: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at top left, rgba(0, 194, 255, 0.2), transparent 34rem),
    linear-gradient(180deg, #071827 0%, #052239 54%, #071827 100%);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.offline {
  filter: saturate(0.92);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  background: var(--brand);
  border-radius: 999px;
  color: #071827;
  font-weight: 900;
  left: 1rem;
  padding: 0.7rem 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
  z-index: 120;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(3, 18, 30, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  gap: 0.8rem;
  font-weight: 900;
  min-height: 56px;
  padding: 0;
  text-align: left;
}

.brand img {
  height: 46px;
  object-fit: contain;
  width: 66px;
}

nav {
  display: grid;
  gap: 0.55rem;
}

.nav-link,
.menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 1rem;
  text-align: left;
}

.nav-link:hover,
.nav-link.active,
.menu-toggle {
  background: rgba(0, 194, 255, 0.18);
  border-color: rgba(0, 194, 255, 0.48);
  color: var(--text);
}

.nav-badge {
  align-items: center;
  background: var(--brand-2);
  border-radius: 999px;
  color: #071827;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: center;
  min-height: 1.35rem;
  min-width: 1.35rem;
  padding: 0 0.35rem;
}

main {
  margin: 0 auto;
  max-width: 1720px;
  min-width: 0;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2rem;
  width: 100%;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.topbar div {
  display: grid;
  text-align: right;
}

.topbar span {
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 1.5rem;
}

.view:focus {
  outline: 0;
}

.app-status {
  align-items: center;
  background: rgba(0, 194, 255, 0.13);
  border: 1px solid rgba(0, 194, 255, 0.32);
  border-radius: 14px;
  color: var(--text);
  display: flex;
  gap: 0.9rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
}

.app-status[hidden] {
  display: none;
}

.app-status.error,
.app-status.warning {
  background: rgba(255, 102, 120, 0.13);
  border-color: rgba(255, 102, 120, 0.38);
}

.app-status button {
  background: var(--brand);
  border: 0;
  border-radius: 999px;
  color: #071827;
  font-weight: 900;
  min-height: 38px;
  padding: 0 1rem;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.hero-copy,
.player-card,
.section-block,
.chat-panel,
.live-layout,
.content-card,
.plan-card,
.banner-card,
.legal-card {
  background: linear-gradient(180deg, rgba(15, 47, 76, 0.98), rgba(9, 34, 56, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--card-radius);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-copy {
  align-content: center;
  display: grid;
  justify-items: center;
  min-height: 500px;
  padding: clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}

.main-logo {
  max-height: 230px;
  max-width: min(520px, 92%);
  object-fit: contain;
}

#heroSlogan {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin: 1rem 0 1.5rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.social-row a,
.primary-action,
.composer button,
.modal-card button,
.filter-chip {
  align-items: center;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  text-decoration: none;
}

.social-row a,
.filter-chip {
  background: rgba(0, 194, 255, 0.15);
  border: 1px solid rgba(0, 194, 255, 0.5);
  color: var(--text);
}

.social-row a:hover,
.filter-chip:hover {
  background: rgba(0, 194, 255, 0.24);
}

.player-card {
  align-content: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.player-card h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  margin: 0;
}

.play-button {
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  color: #004f7b;
  font-size: 3rem;
  height: 148px;
  margin: 1rem 0 0.2rem;
  width: 148px;
}

.play-button span {
  display: inline-block;
  transform: translateX(0.05em);
}

#playerStatus {
  font-size: 1.3rem;
  letter-spacing: 0.08em;
}

.primary-action,
.composer button,
.modal-card button {
  background: var(--brand);
  color: #071827;
}

.section-block {
  padding: 1.25rem;
}

.section-heading {
  align-items: end;
  display: grid;
  gap: 0.4rem 1rem;
  grid-template-columns: 1fr auto;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  grid-column: 1;
  margin: 0;
}

.section-heading p,
.content-card p,
.plan-card p,
.banner-card p {
  color: var(--muted);
}

.section-heading p {
  grid-column: 1;
  margin: 0;
}

.horizontal-cards,
.content-grid,
.plans-grid {
  display: grid;
  gap: 1rem;
}

.horizontal-cards {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.content-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plans-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.content-card,
.plan-card,
.banner-card {
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease;
}

.content-card:hover,
.plan-card:hover,
.banner-card:hover {
  border-color: rgba(0, 194, 255, 0.36);
  transform: translateY(-2px);
}

.content-card img,
.banner-card img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.card-body,
.plan-card {
  padding: 1rem;
}

.card-body h3,
.plan-card h3,
.banner-card h3 {
  margin: 0 0 0.5rem;
}

.category {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip.active {
  background: var(--brand);
  color: #071827;
}

.empty-state {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
  grid-column: 1 / -1;
  padding: 1.1rem;
}

.empty-state strong {
  color: var(--text);
}

.live-layout {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.video-frame {
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 16px;
  width: 100%;
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(340px, 56vh) auto;
  overflow: hidden;
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding: 1rem;
}

.chat-message {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  max-width: 780px;
  padding: 0.8rem 1rem;
}

.chat-message strong {
  color: var(--brand);
}

.composer {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr auto;
  padding: 1rem;
}

.composer input,
.modal-card input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  min-height: 46px;
  padding: 0 1rem;
}

.search-input {
  grid-column: 1 / -1;
}

.modal-root {
  align-items: center;
  background: rgba(3, 18, 30, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 80;
}

.modal-root[hidden] {
  display: none;
}

.modal-card {
  background: #ffffff;
  border-radius: 18px;
  color: #071827;
  display: grid;
  gap: 0.9rem;
  max-height: min(88vh, 860px);
  max-width: 560px;
  overflow-y: auto;
  padding: 1.4rem;
  width: 100%;
}

.modal-card-wide {
  max-width: 860px;
}

.modal-card p {
  color: #52677a;
}

.modal-card input {
  background: #f7fafc;
  border-color: #d8e2ec;
  color: #071827;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.detail-list span {
  background: #edf5fb;
  border-radius: 999px;
  color: #123653;
  font-weight: 800;
  padding: 0.45rem 0.75rem;
}

.episode-list {
  display: grid;
  gap: 0.75rem;
}

.episode-card {
  align-items: center;
  background: #f6fafc;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr auto;
  padding: 0.85rem;
}

.episode-card p {
  color: #52677a;
  margin: 0.3rem 0 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.secondary-action {
  background: #e5edf3 !important;
  color: #071827 !important;
}

.compact-action {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  min-height: 40px;
  padding: 0 1rem;
}

.notification-action {
  align-items: center;
  background: linear-gradient(135deg, #00b6e8, #005c8f) !important;
  border: 1px solid rgba(214, 251, 65, 0.46);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 111, 170, 0.2);
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  gap: 0.45rem;
  justify-content: center;
  letter-spacing: 0;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0 1.15rem;
  width: min(100%, 320px);
}

.notification-action::before {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  content: "!";
  display: inline-grid;
  font-size: 0.78rem;
  height: 1.35rem;
  place-items: center;
  width: 1.35rem;
}

.notification-action:disabled {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.notification-status {
  color: rgba(255, 255, 255, 0.72);
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 320px;
  text-align: center;
}

.legal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.legal-card {
  padding: 1rem;
}

.legal-card h3 {
  margin: 0 0 0.5rem;
}

.legal-card p {
  color: var(--muted);
}

footer {
  margin-top: 2rem;
  text-align: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer-link {
  background: transparent;
  border: 0;
  color: var(--brand);
  display: block;
  font-weight: 800;
  margin: 0.75rem auto 0;
  text-decoration: underline;
}

.toast {
  background: #ffffff;
  border-radius: 14px;
  bottom: 1rem;
  color: #071827;
  left: 50%;
  padding: 1rem 1.2rem;
  position: fixed;
  transform: translateX(-50%);
  z-index: 100;
}

@media (min-width: 1440px) {
  .content-grid,
  .horizontal-cards,
  .plans-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .player-card h1 {
    font-size: clamp(2.4rem, 4vw, 4.7rem);
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    height: 100dvh;
    left: 0;
    overflow-y: auto;
    position: fixed;
    top: 0;
    width: min(320px, 86vw);
    z-index: 60;
  }

  .sidebar.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 360px;
  }

  .topbar {
    background: rgba(7, 24, 39, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: -1.25rem calc(clamp(1rem, 3vw, 2.5rem) * -1) 1.25rem;
    padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
    position: sticky;
    top: 0;
    z-index: 45;
  }
}

@media (max-width: 620px) {
  .section-heading {
    grid-template-columns: 1fr;
  }

  .compact-action {
    justify-self: start;
  }

  main {
    padding: 0.8rem;
  }

  .topbar {
    margin: -0.8rem -0.8rem 1rem;
    padding: 0.75rem 0.8rem;
  }

  .topbar div {
    max-width: 68vw;
  }

  .topbar strong,
  .topbar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    gap: 0.9rem;
  }

  .hero-copy,
  .player-card,
  .section-block,
  .chat-panel,
  .live-layout {
    border-radius: 14px;
  }

  .hero-copy {
    min-height: auto;
    padding: 1.3rem;
  }

  .main-logo {
    max-height: 150px;
  }

  #heroSlogan {
    font-size: clamp(1.45rem, 8vw, 2.1rem);
    margin: 0.4rem 0 1rem;
  }

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

  .player-card {
    padding: 1.2rem;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .episode-card {
    grid-template-columns: 1fr;
  }

  .app-status {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-card {
    border-radius: 16px;
    max-height: 92dvh;
    padding: 1rem;
  }
}

@media (max-width: 420px) {
  .social-row a,
  .primary-action,
  .secondary-action {
    width: 100%;
  }
}

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

  .content-card:hover,
  .plan-card:hover,
  .banner-card:hover {
    transform: none;
  }
}

.legal-document-page {
  min-height: 100dvh;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.legal-document-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: var(--text);
  line-height: 1.7;
  margin: 0 auto;
  max-width: 1050px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.legal-document-card h1,
.legal-document-card h2 {
  color: var(--accent);
}

.legal-document-card .notice {
  background: rgba(0, 194, 255, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem;
}
