:root {
  --bg: #08111b;
  --panel: rgba(10, 22, 35, 0.92);
  --panel-soft: rgba(14, 29, 47, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f7fc;
  --muted: #b8c7d7;
  --accent: #01b4e4;
  --good: #83efb8;
  --warn: #ffd37d;
  --danger: #ff9fac;
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(1, 180, 228, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(128, 80, 184, 0.12), transparent 20%),
    linear-gradient(180deg, #07111a 0%, #08111b 48%, #061018 100%);
}

button, input { font: inherit; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }

.page-shell {
  width: min(1340px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 18px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #7fe2ff;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 800;
}

.intro {
  margin-top: 8px;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.6;
}

.search-shell {
  width: min(460px, 100%);
}

.search-box,
.search-panel,
.hero-surface,
.tab-bar,
.main-card,
.side-card,
.search-result,
.ownership-card,
.media-row,
.availability-card,
.source-card,
.person-card {
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.search-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.search-label {
  font-size: .82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.search-box input {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-panel {
  padding: 20px;
  border-radius: 24px;
  background: var(--panel);
}

.search-panel.is-hidden { display: none; }

.search-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.search-result-list,
.stack {
  display: grid;
  gap: 12px;
}

.search-result {
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  background: var(--panel-soft);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-result.is-active {
  outline: 2px solid rgba(1, 180, 228, 0.55);
}

.search-result p,
.main-card > p,
.side-card > p,
.ownership-card > p,
.availability-card p,
.source-card p,
.person-card p,
.muted {
  color: var(--muted);
}

.meta-row,
.hero-meta,
.hero-stats,
.tab-bar,
.pill-row,
.ownership-meta,
.availability-meta,
.source-meta,
.person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.tab-button,
.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 14, 23, 0.34);
  font-size: .84rem;
}

.pill.good { color: var(--good); }
.pill.warn { color: var(--warn); }
.pill.danger { color: var(--danger); }

.hero-surface {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(5, 12, 19, 0.96) 0%, rgba(5, 12, 19, 0.8) 34%, rgba(5, 12, 19, 0.32) 100%),
    linear-gradient(140deg, var(--hero-start), var(--hero-end));
}

.hero-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.14), transparent 14%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.poster-card {
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(165deg, var(--hero-start), var(--hero-end));
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poster-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.poster-title {
  font-size: 1.72rem;
  line-height: 1.05;
  font-weight: 800;
}

.poster-caption,
.subtitle,
.summary {
  color: rgba(255, 255, 255, 0.8);
}

.poster-caption {
  line-height: 1.55;
}

.hero-copy h2 {
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 1.02;
}

.subtitle {
  margin-top: 8px;
  font-size: 1.02rem;
}

.tagline {
  margin-top: 14px;
  color: #d7f2fb;
  font-size: 1.08rem;
}

.summary {
  margin-top: 18px;
  max-width: 68ch;
  line-height: 1.7;
}

.hero-meta,
.hero-stats {
  margin-top: 18px;
}

.stat-chip {
  min-width: 134px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(4, 12, 19, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-chip strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.tab-bar {
  padding: 10px;
  border-radius: 22px;
  background: var(--panel);
}

.tab-button {
  color: var(--muted);
  cursor: pointer;
}

.tab-button.is-active {
  color: var(--text);
  background: rgba(1, 180, 228, 0.16);
  border-color: rgba(1, 180, 228, 0.28);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, .82fr);
  gap: 18px;
}

.main-content,
.side-content {
  display: grid;
  gap: 18px;
  align-content: start;
}

.main-card,
.side-card {
  padding: 24px;
  border-radius: 26px;
  background: var(--panel);
}

.main-card h3,
.side-card h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.fact-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fact-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.fact-item dt {
  color: var(--muted);
  font-size: .84rem;
  margin-bottom: 6px;
}

.fact-item dd {
  font-weight: 700;
  line-height: 1.45;
}

.media-row,
.ownership-card,
.availability-card,
.source-card,
.person-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.media-row h4,
.ownership-card h4,
.availability-card h4,
.source-card h4,
.person-card h4 {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.media-row p,
.ownership-card p,
.availability-card p,
.source-card p,
.person-card p {
  line-height: 1.55;
}

.person-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.empty-state {
  padding: 30px 18px;
  border-radius: 22px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .site-header,
  .hero-content,
  .content-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-surface { min-height: 0; }
  .poster-card { max-width: 290px; }
}

@media (max-width: 720px) {
  .page-shell { width: min(100%, calc(100% - 16px)); }
  .hero-surface,
  .main-card,
  .side-card,
  .search-panel { padding: 18px; }
  .fact-grid,
  .person-grid { grid-template-columns: 1fr; }
}
