:root {
  color-scheme: dark;
  --bg: #07080a;
  --panel: rgba(14, 16, 20, 0.72);
  --text: #f3f6f4;
  --muted: #9da7a9;
  --line: rgba(255, 255, 255, 0.12);
  --mint: #77ffd5;
  --lime: #d7ff5b;
  --red: #ff4f68;
  --ice: #90c8ff;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 4%, rgba(144, 200, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 8% 24%, rgba(255, 79, 104, 0.14), transparent 27rem),
    linear-gradient(180deg, #090a0d 0%, #07080a 46%, #0c0f11 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 56px) 72px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 56px;
  padding: 8px 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.profile-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 46px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  width: 126px;
  height: 38px;
  object-fit: contain;
}

.brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.brand-text strong {
  font-size: 15px;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 3px;
  border-radius: 8px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.profile-button {
  min-width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0 11px;
  border-radius: 50%;
  color: var(--text);
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.profile-button.is-signed-in {
  border-color: rgba(119, 255, 213, 0.44);
  background: rgba(119, 255, 213, 0.1);
  color: var(--mint);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.58fr);
  gap: clamp(22px, 3.5vw, 56px);
  align-items: center;
  min-height: auto;
  padding: clamp(14px, 2vw, 28px) 96px clamp(26px, 4vw, 54px) 0;
}

.hero-visual {
  min-width: 0;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(9, 13, 16, 0.05), rgba(9, 13, 16, 0.42)),
    linear-gradient(120deg, #121417 0%, #25111a 34%, #083834 66%, #12171f 100%);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.hero-frame::before,
.hero-frame::after {
  position: absolute;
  content: "";
  inset: 0;
  pointer-events: none;
}

.hero-frame::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 72px 72px;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 76%, transparent);
  opacity: 0.5;
}

.hero-frame::after {
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.32));
}

.hero-world {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-player {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050608;
}

.sound-unlock {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 10, 12, 0.78);
  color: var(--text);
  font-weight: 900;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}

.sound-unlock:hover {
  border-color: rgba(119, 255, 213, 0.52);
  color: var(--mint);
}

.orbital,
.neon-rain,
.signal-line,
.character-mask {
  position: absolute;
  display: block;
}

.orbital {
  border: 1px solid rgba(119, 255, 213, 0.38);
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(119, 255, 213, 0.3));
}

.orbital-one {
  width: 38%;
  aspect-ratio: 1;
  top: 10%;
  left: 9%;
}

.orbital-two {
  width: 18%;
  aspect-ratio: 1;
  right: 16%;
  top: 16%;
  border-color: rgba(255, 79, 104, 0.44);
  filter: drop-shadow(0 0 18px rgba(255, 79, 104, 0.34));
}

.neon-rain {
  width: 2px;
  height: 46%;
  background: linear-gradient(180deg, transparent, var(--ice), transparent);
  opacity: 0.68;
}

.rain-one {
  left: 58%;
  top: 12%;
}

.rain-two {
  left: 72%;
  top: 28%;
  background: linear-gradient(180deg, transparent, var(--lime), transparent);
}

.signal-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(119, 255, 213, 0.72), transparent);
}

.line-one {
  width: 44%;
  left: 6%;
  bottom: 24%;
}

.line-two {
  width: 34%;
  right: 9%;
  bottom: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 79, 104, 0.72), transparent);
}

.character-mask {
  right: 18%;
  bottom: 0;
  width: 28%;
  height: 70%;
  background:
    radial-gradient(circle at 52% 16%, #f8dfc4 0 8%, transparent 8.5%),
    linear-gradient(140deg, transparent 0 23%, rgba(16, 22, 26, 0.96) 23% 72%, transparent 72%),
    linear-gradient(180deg, transparent 0 36%, rgba(144, 200, 255, 0.42) 36% 100%);
  clip-path: polygon(42% 0, 64% 0, 76% 28%, 68% 100%, 24% 100%, 19% 30%);
  filter: drop-shadow(0 0 28px rgba(144, 200, 255, 0.36));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding-bottom: 18px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(56px, 6.8vw, 118px);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-description {
  max-width: 470px;
  margin-bottom: 18px;
  color: #d7dfde;
  font-size: 17px;
  line-height: 1.65;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #d4dcdd;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-cta {
  gap: 8px;
  background: var(--text);
  color: #07080a;
}

.primary-cta svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.secondary-cta {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.action-rail {
  position: fixed;
  top: 50%;
  right: clamp(18px, 2.3vw, 38px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(10, 12, 15, 0.42);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.rail-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.rail-button span {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  min-width: max-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(8, 10, 12, 0.82);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.rail-button:hover,
.rail-button[aria-pressed="true"] {
  border-color: rgba(119, 255, 213, 0.5);
  background: rgba(119, 255, 213, 0.1);
  color: var(--mint);
  transform: translateX(-4px);
}

.rail-button:hover span,
.rail-button:focus-visible span {
  opacity: 1;
  transform: translate(0, -50%);
}

.panel {
  position: fixed;
  right: clamp(82px, 7vw, 126px);
  top: 50%;
  z-index: 28;
  width: min(390px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 12, 15, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  transform: translateY(-50%);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.panel p {
  color: #c6ced0;
  line-height: 1.55;
}

.close-panel {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.episode-grid {
  display: grid;
  gap: 8px;
}

.episode-grid article {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.episode-grid span {
  color: var(--ice);
  font-weight: 800;
}

.episode-grid strong {
  min-width: 0;
  font-size: 14px;
}

.episode-grid p {
  margin: 0;
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-lane {
  margin-top: clamp(18px, 4vw, 42px);
}

.lane-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.lane-heading h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.2vw, 34px);
  letter-spacing: 0;
}

.lane-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-row {
  display: grid;
  grid-auto-columns: minmax(250px, 31%);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 0 18px;
  scrollbar-width: thin;
}

.series-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--poster);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  isolation: isolate;
}

.series-card:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.series-card::before,
.series-card::after {
  position: absolute;
  content: "";
  inset: 0;
  transition: transform 300ms ease, opacity 300ms ease;
}

.series-card::before {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 52px 52px;
  opacity: 0.42;
}

.series-card::after {
  z-index: 1;
  background: linear-gradient(180deg, transparent 12%, rgba(0, 0, 0, 0.2) 47%, rgba(0, 0, 0, 0.82));
}

.series-card:hover::before {
  opacity: 0.62;
  transform: scale(1.08);
}

.series-card.is-active {
  border-color: rgba(119, 255, 213, 0.72);
  box-shadow:
    0 0 0 1px rgba(119, 255, 213, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.34);
}

.series-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.series-card:hover .card-copy {
  transform: translateY(-3px);
}

.card-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--poster);
  pointer-events: none;
  transform: scale(1.01);
  transition: filter 220ms ease, transform 280ms ease;
}

.series-card:hover .card-preview {
  filter: saturate(1.08) brightness(1.06);
  transform: scale(1.04);
}

.card-copy {
  position: absolute;
  inset: auto 14px 14px;
  z-index: 2;
  transition: transform 220ms ease;
}

.card-copy h3 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: 0;
}

.card-copy p {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  color: #d3dadb;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
}

.card-play {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #090a0d;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.card-play svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 12, 15, 0.86);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 3, 5, 0.66);
  backdrop-filter: blur(18px);
}

.auth-modal {
  width: min(430px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(17, 19, 23, 0.95), rgba(8, 10, 12, 0.94)),
    radial-gradient(circle at 14% 0%, rgba(119, 255, 213, 0.16), transparent 16rem);
  box-shadow: var(--shadow);
}

.auth-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-header h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.google-button,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

.google-button {
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #101214;
}

.google-button svg {
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #d5ddde;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: 0;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  transition: border-color 180ms ease, background 180ms ease;
}

.auth-form input:focus {
  border-color: rgba(119, 255, 213, 0.52);
  background: rgba(119, 255, 213, 0.07);
}

.auth-submit {
  margin-top: 4px;
  background: var(--mint);
  color: #07100d;
}

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

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(119, 255, 213, 0.12);
  color: var(--mint);
  font-weight: 900;
}

.account-card strong {
  display: block;
  margin-bottom: 3px;
}

.account-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.member-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.member-perks span {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #d4dcdd;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-shell {
    padding-bottom: 96px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 30px 0 24px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .action-rail {
    top: auto;
    right: 50%;
    bottom: 18px;
    flex-direction: row;
    width: min(420px, calc(100vw - 34px));
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(8, 10, 12, 0.76);
    transform: translateX(50%);
    backdrop-filter: blur(22px);
  }

  .rail-button {
    flex: 1;
    width: auto;
    height: 44px;
    background: transparent;
    box-shadow: none;
  }

  .rail-button:hover,
  .rail-button[aria-pressed="true"] {
    transform: translateY(-2px);
  }

  .rail-button span {
    display: none;
  }

  .panel {
    top: auto;
    right: 18px;
    bottom: 86px;
    transform: none;
  }

  .card-row {
    grid-auto-columns: minmax(240px, 64%);
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    gap: 10px;
  }

  .brand {
    height: 38px;
    padding: 0 9px;
  }

  .brand-logo {
    width: 104px;
    height: 31px;
  }

  .profile-button {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 50px;
  }

  .hero-description {
    font-size: 15px;
  }

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

  .primary-cta,
  .secondary-cta {
    width: 100%;
    min-width: 0;
  }

  .lane-heading {
    display: block;
  }

  .lane-heading span {
    display: block;
    margin-top: 5px;
  }

  .card-row {
    grid-auto-columns: minmax(236px, 82%);
  }

  .episode-grid article {
    grid-template-columns: 32px 1fr;
  }

  .episode-grid p {
    grid-column: 2;
  }
}
