/* ============================================================
   Lesbian Space Princess Wiki — Cosmic Queer Design System
   70% deep-purple neutral · 20% violet support · 10% neon accents
   ============================================================ */

:root {
  /* Deep space backgrounds */
  --bg-deep-space: #10043A;
  --bg-space: #180653;
  --bg-space-light: #260A69;
  --bg-panel: #21105B;
  --bg-panel-hover: #301178;

  /* Neon primary */
  --neon-pink: #FF3AAE;
  --hot-pink: #FF267D;
  --electric-purple: #8B42FF;
  --violet: #6727E8;

  /* Cyan secondary */
  --cyan: #35F2E4;
  --cyan-bright: #52FFF1;
  --cyan-dark: #15BDB4;

  /* Alien green tertiary */
  --alien-green: #63F04D;
  --alien-green-bright: #A0FF55;

  /* Warm accents */
  --space-orange: #FF7A30;
  --space-yellow: #FFD84A;

  /* Text */
  --text-primary: #FFF9FF;
  --text-secondary: #C8BCE8;
  --text-muted: #8E82B8;
  --text-body: #E8E1F6;

  /* Category accent colors */
  --cat-main: #FF3AAE;
  --cat-support: #42E6DB;
  --cat-royalty: #A966FF;
  --cat-alien: #7AF44C;
  --cat-antagonist: #FF704D;

  /* Borders */
  --border-purple: rgba(147, 84, 220, .28);
  --border-purple-strong: rgba(179, 87, 255, .45);
  --border-pink: rgba(255, 58, 174, .65);
  --border-cyan: rgba(54, 231, 218, .45);

  /* Cosmic shadows */
  --shadow-cosmic: 0 12px 30px rgba(7, 0, 30, .35), 0 0 16px rgba(133, 60, 255, .08);
  --shadow-pink: 0 0 22px rgba(255, 54, 174, .18);

  /* Fonts */
  --font-display: "Baloo 2", "Fredoka", sans-serif;
  --font-body: "Nunito", "DM Sans", sans-serif;
  --font-hand: "Caveat", cursive;

  --header-h: 68px;
  --radius-card: 14px 18px 14px 18px;
  --radius-img: 12px;
  --radius-btn: 10px;
  --radius-panel: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  background:
    radial-gradient(circle at 20% 15%, rgba(190, 45, 255, .18), transparent 35%),
    radial-gradient(circle at 85% 35%, rgba(68, 35, 180, .20), transparent 40%),
    var(--bg-deep-space);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Cosmic background ---------- */
.cosmic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  opacity: .5;
  animation: starPulse 4s ease-in-out infinite;
}
.star::before, .star::after {
  content: '';
  position: absolute;
  background: inherit;
}
.star::before { left: -2px; top: 1px; width: 7px; height: 1px; }
.star::after { top: -2px; left: 1px; width: 1px; height: 7px; }
@keyframes starPulse {
  0%, 100% { opacity: .25; transform: scale(.8); }
  50% { opacity: .9; transform: scale(1.15); }
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .025;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(15, 4, 55, .92);
  border-bottom: 1px solid rgba(184, 98, 255, .25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}
.brand-full { display: flex; align-items: baseline; gap: .18em; }
.brand-short { display: none; }
.b-pink { color: var(--neon-pink); }
.b-outline {
  color: transparent;
  -webkit-text-stroke: 1px #E9D5FF;
  text-shadow: 0 0 12px rgba(139, 66, 255, .35);
}
.b-grad {
  background: linear-gradient(90deg, var(--space-orange), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.b-wiki {
  font-size: .72em;
  color: var(--cyan-bright);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand:hover .b-pink { text-shadow: 0 0 14px rgba(255, 58, 174, .7); transition: text-shadow .2s; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
  position: relative;
}
.header-nav a:hover { color: var(--text-primary); background: rgba(255, 58, 174, .08); }
.header-nav a.active {
  color: #FF4AB8;
}
.header-nav a.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  background: var(--neon-pink);
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(255, 58, 174, .5);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

.search-toggle {
  background: #25105D;
  border: 1px solid #5834A0;
  color: var(--cyan-bright);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  flex-shrink: 0;
}
.search-toggle:hover, .search-toggle.open {
  border-color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255, 58, 174, .12);
}

/* ---------- Search panel ---------- */
.search-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 99;
  background: rgba(21, 7, 61, .97);
  border-bottom: 1px solid var(--border-purple-strong);
  padding: 1.6rem 24px 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-cosmic);
}
.search-panel.open { display: block; }
.search-label {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  display: block;
  margin-bottom: .5rem;
}
#searchInput {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-purple-strong);
  color: var(--text-primary);
  font-size: 1.15rem;
  font-family: var(--font-body);
  padding: .6rem 0;
  outline: none;
}
#searchInput:focus { border-bottom-color: var(--neon-pink); }
.search-hit {
  display: block;
  text-decoration: none;
  color: var(--text-body);
  padding: .7rem .4rem;
  border-bottom: 1px solid rgba(160, 120, 220, .15);
  transition: background .15s;
}
.search-hit:hover { background: rgba(255, 58, 174, .06); }
.search-hit strong { color: var(--text-primary); display: block; font-size: .95rem; }
.search-hit span { font-size: .8rem; color: var(--text-muted); }
.search-empty { color: var(--text-muted); font-size: .9rem; padding: 1rem 0; }

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px;
}

.breadcrumb {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8275A8;
  margin-bottom: 1.4rem;
}
.breadcrumb a { color: #8275A8; text-decoration: none; }
.breadcrumb a:hover { color: var(--neon-pink); }
.breadcrumb span { color: #D6CBEF; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: #FFF;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 .9rem;
}
h2 {
  font-size: 28px;
  font-weight: 750;
  margin: 2.4rem 0 1rem;
  padding-bottom: .55rem;
  position: relative;
}
h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 80px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #FF3AAE, #8148FF, transparent);
}
h3 { font-size: 1.25rem; margin: 1.8rem 0 .7rem; }
h4 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }

p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.1rem 1.4rem; }
li { margin-bottom: .35rem; }
strong { color: var(--text-primary); font-weight: 800; }

/* Section heading with star ✦ */
h2 .star-mark, .star-head::before {
  color: var(--neon-pink);
  margin-right: .35em;
}

/* ---------- Links ---------- */
.main-content a, .article-body a {
  color: #4FE5DD;
  text-decoration: none;
  transition: color .15s ease;
}
.main-content a:hover, .article-body a:hover { color: #FF56BC; text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #FF318E, #B936F4);
  color: #fff;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .95rem;
  padding: .7rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 49, 142, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 49, 142, .38); text-decoration: none !important; color: #fff; }
.btn-secondary {
  background: rgba(69, 225, 218, .08);
  border: 1px solid #35D9D1;
  color: #58EEE6;
  box-shadow: none;
}
.btn-secondary:hover { color: #58EEE6; box-shadow: 0 0 18px rgba(53, 217, 209, .25); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
}
.hero-glow {
  position: absolute;
  top: -60px; left: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255, 48, 196, .28) 0%, rgba(145, 38, 255, .12) 35%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin-bottom: .4rem;
}
.hero h1 .b-pink { color: var(--neon-pink); }
.hero h1 .b-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px #E9D5FF;
}
.hero h1 .b-grad {
  background: linear-gradient(90deg, var(--space-orange), var(--neon-pink));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.12rem;
  color: var(--text-secondary);
  margin: .6rem 0 1.2rem;
  max-width: 520px;
}
.hero-meta {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: .1rem 0 .5rem;
}

/* Trending bar */
.trending-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: rgba(12, 3, 44, .85);
  border: 1px solid rgba(255, 58, 174, .45);
  border-radius: var(--radius-panel);
  padding: .7rem 1.1rem;
  margin: 0 0 1.6rem;
  font-size: .88rem;
}
.trending-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--neon-pink);
}
.trending-bar a { color: #FFFFFF; text-decoration: none; font-weight: 700; }
.trending-bar a:hover { color: var(--neon-pink); }
.trending-dot { color: rgba(168, 155, 200, .6); }

/* Article list (homepage Latest From the Wiki) — clean text rows */
.text-list {
  display: flex;
  flex-direction: column;
  margin: 1.4rem 0;
}
.text-list-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem .2rem;
  border-bottom: 1px solid rgba(157, 79, 230, .16);
  text-decoration: none;
  transition: background .15s ease, padding-left .15s ease;
}
.text-list-item:hover { background: rgba(157, 79, 230, .07); padding-left: .6rem; }
.tli-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.text-list-item:hover .tli-title { color: var(--neon-pink); }
.tli-desc {
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.5;
  min-width: 0;
  flex: 1;
}
.tli-arrow {
  color: var(--neon-pink);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  max-width: 100%;
  width: 340px;
  border-radius: var(--radius-panel);
  box-shadow:
    0 15px 40px rgba(5, 0, 30, .45),
    0 0 40px rgba(255, 48, 196, .25);
  transform: rotate(-1deg);
  transition: transform .3s ease;
}
.hero-art img:hover { transform: rotate(0deg) translateY(-4px); }
.hero-art-glow {
  position: absolute;
  inset: 10%;
  background: radial-gradient(circle, rgba(255, 48, 196, .22), transparent 65%);
  filter: blur(30px);
  z-index: -1;
}

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(255, 58, 174, .12);
  border: 1px solid rgba(255, 58, 174, .32);
  color: var(--text-primary);
  margin: 0 .3rem .4rem 0;
}
.chip--pink { background: rgba(255, 58, 174, .12); border-color: rgba(255, 58, 174, .32); }
.chip--cyan { background: rgba(53, 242, 228, .1); border-color: rgba(53, 242, 228, .32); color: var(--cyan-bright); }
.chip--purple { background: rgba(169, 102, 255, .12); border-color: rgba(169, 102, 255, .35); }
.chip--green { background: rgba(122, 244, 76, .1); border-color: rgba(122, 244, 76, .32); color: var(--alien-green-bright); }
.chip--orange { background: rgba(255, 112, 77, .12); border-color: rgba(255, 112, 77, .35); color: #FFB199; }

/* ---------- Article layout: sidebar + main ---------- */
.content-wrapper {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.2rem;
  padding: 0 0 2rem;
}
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  height: fit-content;
  align-self: start;
}
.nav-section {
  background: var(--bg-panel);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-panel);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.nav-section h3 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin: 0 0 .6rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--border-purple);
}
.nav-section ul { list-style: none; margin: 0; }
.nav-section li { margin-bottom: .3rem; }
.nav-section a {
  color: #A89BC8;
  text-decoration: none;
  font-size: .85rem;
  line-height: 1.5;
  display: block;
  padding: .22rem 0;
  border-left: 2px solid transparent;
  padding-left: .5rem;
  transition: color .15s, border-color .15s;
}
.nav-section a:hover { color: var(--neon-pink); }
.nav-section a.active {
  color: #FF54B8;
  border-left: 2px solid var(--neon-pink);
}

.main-content { max-width: 780px; min-width: 0; }
.main-content .lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.6rem;
}

/* ---------- Wiki infobox ---------- */
.wiki-infobox {
  width: 320px;
  float: right;
  margin: 0 0 1.4rem 1.8rem;
  background: linear-gradient(160deg, rgba(54, 20, 111, .95), rgba(28, 9, 73, .96));
  border: 1px solid var(--border-purple-strong);
  border-radius: var(--radius-panel);
  box-shadow: 0 15px 40px rgba(5, 0, 30, .35), 0 0 20px rgba(130, 55, 255, .08);
  overflow: hidden;
}
.wiki-infobox img {
  width: 100%;
  display: block;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
}
.infobox-body { padding: 1.1rem 1.2rem 1.2rem; }
.infobox-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #FFF;
  margin-bottom: .6rem;
}
.infobox-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(160, 120, 220, .15);
}
.infobox-row:last-child { border-bottom: none; }
.infobox-label {
  color: #49EADF;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  flex-shrink: 0;
}
.infobox-value { color: #FFF; font-size: .92rem; text-align: right; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1.1rem;
  margin: 1.4rem 0;
}
.card {
  background: var(--bg-panel);
  border: 1px solid rgba(150, 86, 225, .32);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #FF42B4;
  box-shadow: 0 12px 32px rgba(255, 40, 170, .14);
}
.card img { width: 100%; display: block; }
.card-body { padding: .9rem 1rem 1.05rem; }
.card h3 { font-size: 1.02rem; margin: 0 0 .15rem; }
.card .card-role { color: #AFA2D0; font-size: .84rem; margin: 0 0 .5rem; }
.card .card-desc { color: var(--text-secondary); font-size: .85rem; margin: 0 0 .6rem; }
.card-link {
  color: var(--cyan-bright);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.card-link:hover { color: var(--neon-pink); text-decoration: none !important; }

/* Character card accent borders by category */
.card[data-cat="main"] { border-top: 3px solid var(--cat-main); }
.card[data-cat="support"] { border-top: 3px solid var(--cat-support); }
.card[data-cat="royalty"] { border-top: 3px solid var(--cat-royalty); }
.card[data-cat="alien"] { border-top: 3px solid var(--cat-alien); }
.card[data-cat="antagonist"] { border-top: 3px solid var(--cat-antagonist); }

/* Location cards */
.location-card { position: relative; border-radius: var(--radius-panel); overflow: hidden; }
.location-card img { aspect-ratio: 16/9; object-fit: cover; transition: transform .25s ease; }
.location-card:hover img { transform: scale(1.04); }
.location-card .loc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, rgba(15, 3, 50, .9));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.location-card .loc-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cyan-bright);
  font-weight: 800;
}
.location-card .loc-name { font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.15rem; }

/* ---------- Tables ---------- */
.wiki-table-wrap { overflow-x: auto; margin: 1.4rem 0; border-radius: var(--radius-panel); }
table.wiki-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(37, 16, 93, .6);
  border: 1px solid rgba(140, 91, 210, .22);
  border-radius: var(--radius-panel);
  overflow: hidden;
  font-size: .92rem;
}
.wiki-table th {
  background: #321278;
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: left;
  padding: .7rem .9rem;
  white-space: nowrap;
}
.wiki-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid rgba(150, 110, 220, .12);
  color: var(--text-body);
}
.wiki-table tbody tr:hover { background: rgba(255, 55, 170, .05); }
.wiki-table a { color: #56EADF; text-decoration: none; }
.wiki-table a:hover { color: var(--neon-pink); }

/* ---------- Info / warning / tip boxes ---------- */
.info-box, .warning-box, .tip-box {
  border-radius: var(--radius-panel);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: .93rem;
}
.info-box {
  background: rgba(53, 242, 228, .07);
  border: 1px solid var(--border-cyan);
  color: var(--text-body);
}
.warning-box {
  background: rgba(255, 112, 77, .07);
  border: 1px solid rgba(255, 112, 77, .35);
  color: var(--text-body);
}
.tip-box {
  background: rgba(255, 58, 174, .07);
  border: 1px solid rgba(255, 58, 174, .3);
}
.info-box strong, .warning-box strong, .tip-box strong { color: var(--text-primary); }
.box-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .4rem;
}
.info-box .box-title { color: var(--cyan-bright); }
.warning-box .box-title { color: #FFB199; }
.tip-box .box-title { color: var(--neon-pink); }

/* ---------- Trivia cards ---------- */
.trivia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
}
.trivia-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-card);
  padding: 1rem 1.1rem;
}
.trivia-card .t-star { color: var(--space-yellow); }
.trivia-card p { margin: 0; font-size: .9rem; color: var(--text-secondary); }

/* ---------- FAQ ---------- */
details.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-panel);
  margin: .7rem 0;
  overflow: hidden;
}
details.faq-item summary {
  cursor: pointer;
  padding: .9rem 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-size: .97rem;
  list-style: none;
  position: relative;
  padding-right: 2.2rem;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-pink);
  font-size: 1.2rem;
  font-weight: 800;
}
details.faq-item[open] summary::after { content: '−'; }
details.faq-item .faq-a { padding: 0 1.1rem 1rem; font-size: .93rem; color: var(--text-secondary); }

/* ---------- Timeline (controversy) ---------- */
.timeline {
  list-style: none;
  margin: 1.5rem 0;
  padding-left: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--neon-pink), var(--electric-purple));
  border-radius: 2px;
  opacity: .6;
}
.timeline li {
  position: relative;
  padding: 0 0 1.3rem 2.2rem;
  margin: 0;
}
.timeline li::before {
  content: '✦';
  position: absolute;
  left: 0; top: 2px;
  color: var(--neon-pink);
  font-size: .85rem;
  width: 20px;
  text-align: center;
  background: var(--bg-deep-space);
}
.timeline .tl-date {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--cyan-bright);
  font-size: .9rem;
  letter-spacing: .04em;
  display: block;
}
.timeline p { margin: .2rem 0 0; }

/* ---------- Related grid (bottom of pages) ---------- */
.related-grid-wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 2.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: .7rem;
}
.related-head {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: .3rem;
}
.rel-card {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-card);
  padding: .85rem 1rem;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.rel-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon-pink);
  box-shadow: var(--shadow-pink);
  text-decoration: none !important;
}
.rel-card-title { font-family: var(--font-display); font-weight: 800; color: var(--text-primary); font-size: .9rem; margin-bottom: .2rem; }
.rel-card-desc { color: var(--text-muted); font-size: .78rem; line-height: 1.5; }

/* ---------- Movie info panel ---------- */
.movie-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.8rem;
  background: linear-gradient(160deg, rgba(54, 20, 111, .9), rgba(28, 9, 73, .94));
  border: 1px solid var(--border-purple-strong);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-cosmic);
  padding: 1.5rem;
  margin: 1.6rem 0;
}
.movie-panel img { width: 100%; border-radius: var(--radius-img); box-shadow: 0 10px 30px rgba(5, 0, 30, .4); }
.movie-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: .6rem; margin-top: .8rem; }
.movie-fact { background: rgba(37, 16, 93, .5); border: 1px solid var(--border-purple); border-radius: var(--radius-img); padding: .6rem .8rem; }
.movie-fact .mf-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-bright); font-weight: 700; display: block; }
.movie-fact .mf-value { color: #FFF; font-size: .9rem; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  background: #0C032C;
  border-top: 1px solid rgba(157, 79, 230, .25);
  margin-top: 1rem;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 480px; height: 160px;
  background: radial-gradient(circle, rgba(139, 66, 255, .18), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.6rem 24px 1.2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  position: relative;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: .02em;
  margin-bottom: .6rem;
}
.footer-brand p { color: var(--text-muted); font-size: .82rem; max-width: 300px; }
.footer-col h4 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin: 0 0 .7rem;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .86rem;
  padding: .18rem 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--neon-pink); }
.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  border-top: 1px solid rgba(157, 79, 230, .18);
  padding-top: 1.2rem;
  font-size: .84rem;
}
.footer-site-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.footer-site-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .15s;
}
.footer-site-links a:hover { color: var(--neon-pink); }
.fs-sep { color: rgba(168, 155, 200, .45); font-size: .8rem; }
.footer-tagline {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #A89BC8;
}

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page .error-code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; background: linear-gradient(90deg, var(--neon-pink), var(--electric-purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-art { order: -1; }
  .hero-art img { width: 260px; }
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 16px; gap: 10px; }
  .brand-full { display: none; }
  .brand-short { display: inline-flex; font-size: 1.1rem; align-items: baseline; gap: .2em; }
  .menu-toggle { display: block; margin-left: auto; }
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(15, 4, 55, .97);
    border-bottom: 1px solid var(--border-purple-strong);
    padding: .6rem 1rem 1rem;
    gap: 0;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-cosmic);
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: .65rem .8rem; font-size: 1rem; border-radius: 8px; }
  .header-nav a.active::after { display: none; }
  .header-nav a.active { background: rgba(255, 58, 174, .12); }
  .wiki-infobox { float: none; width: 100%; margin: 0 0 1.4rem; }
  .container { padding: 24px 16px; }
  .movie-panel { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .card .card-body { padding: .7rem .75rem .85rem; }
  .card h3 { font-size: .9rem; }
  .card .card-role { font-size: .76rem; }
  /* Mobile: hide sidebar Related section, keep On This Page */
  .sidebar .nav-section:not(:first-child) { display: none; }
  .search-panel { padding: 1.2rem 16px 1.6rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.4rem; padding: 2rem 16px 1.4rem; }
  .hero { padding: 2rem 0 2.4rem; }
  h2 { font-size: 24px; }
}
