:root {
  color-scheme: dark;
  --bg: #080509;
  --panel: #130a19;
  --panel-strong: #21102b;
  --ink: #fff8ed;
  --muted: #d8c8df;
  --gold: #f1bd3b;
  --gold-soft: #ffe08b;
  --purple: #7b22c6;
  --purple-deep: #321043;
  --line: rgba(241, 189, 59, 0.28);
  --danger: #f05d5d;
  --ok: #7ee28a;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(123, 34, 198, 0.2), transparent 34rem),
    radial-gradient(circle at 82% 0%, rgba(241, 189, 59, 0.12), transparent 26rem),
    linear-gradient(180deg, #060406 0%, #120817 52%, #070407 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 5, 9, 0.78);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.brand strong {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.nav a,
.button,
.ghost-button {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
}

.button {
  border-color: rgba(241, 189, 59, 0.55);
  background: linear-gradient(135deg, #f9d66d, #bb7d13);
  color: #160b18;
  font-weight: 800;
}

.purple-button {
  border-color: rgba(172, 88, 255, 0.72);
  background: linear-gradient(135deg, #7b22c6, #3b1052);
  color: #fff8ed;
  font-weight: 800;
}

.ghost-button[disabled],
.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.network-hero,
.admin-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.network-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.72fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 7vw, 88px) 0;
}

.network-copy h1 {
  margin: 0 0 18px;
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.network-copy p {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.network-actions,
.cta-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.featured-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(19, 10, 25, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.featured-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1054 / 1492;
  object-fit: cover;
}

.featured-image-link {
  display: block;
}

.featured-image-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.featured-card div {
  padding: 18px;
}

.featured-card h2 {
  margin: 0 0 8px;
  color: var(--gold);
}

.page-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 3vw, 30px);
}

.poster-stage {
  position: relative;
  width: min(100%, 860px);
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.poster-stage.episode {
  width: min(100%, 980px);
}

.poster-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.hotspot {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.hotspot:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  background: rgba(241, 189, 59, 0.12);
}

.hotspot.is-off {
  cursor: not-allowed;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(11, 6, 12, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.episode-panel {
  width: min(980px, calc(100% - 28px));
  margin: 28px auto 70px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 10, 25, 0.72);
}

.episode-panel h1,
.episode-panel h2 {
  margin: 0 0 8px;
}

.episode-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.admin-page {
  padding: 36px 0 72px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(19, 10, 25, 0.78);
}

.admin-login {
  width: min(520px, 100%);
  margin: 0 auto;
}

.admin-card h1,
.admin-card h2,
.admin-card h3 {
  margin-top: 0;
}

.field,
.button-row {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.button-row {
  grid-template-columns: 150px 92px minmax(0, 1fr);
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.button-row:last-child {
  border-bottom: 0;
}

label {
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.status-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.status-note strong {
  color: var(--gold);
}

.preview-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-strip img {
  width: 100%;
  border-radius: var(--radius);
}

.analytics-chart,
.analytics-row {
  display: grid;
  gap: 8px;
}

.analytics-row {
  grid-template-columns: 130px minmax(0, 1fr) 36px;
  align-items: center;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.analytics-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.analytics-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--gold));
}

.video-embed {
  width: 100%;
  margin: 20px 0;
}

.video-embed iframe,
.video-embed video {
  width: 100%;
  min-height: min(56vw, 540px);
  border: 0;
  border-radius: var(--radius);
}

.audio-player {
  display: block;
  width: 100%;
  margin: 18px 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--gold-soft);
  text-decoration: none;
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(46px, 7vw, 86px) 0;
}

.legal-page h1 {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: clamp(38px, 6vw, 68px);
}

.legal-page p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav a {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    text-align: center;
  }

  .poster-stage,
  .poster-stage.episode {
    width: calc(100vw - 28px);
  }

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

  .button-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
