:root {
  --bg: #fff8ee;
  --surface: #ffffff;
  --surface-2: #fdeedb;
  --ink: #2a1a12;
  --ink-soft: #6b5446;
  --line: #ecd9c3;
  --saffron: #e07b00;
  --turmeric: #f6b73c;
  --chilli: #d7263d;
  --chilli-ink: #ffffff;
  --leaf: #2e8b57;
  --hero-a: #fff1dc;
  --hero-b: #ffe0e4;
  --shadow: 0 6px 24px rgba(80, 40, 10, 0.08);
  --shadow-lg: 0 18px 50px rgba(80, 40, 10, 0.16);
  --radius: 18px;
  --font-display: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16100c;
    --surface: #211812;
    --surface-2: #2d2019;
    --ink: #f7ebe0;
    --ink-soft: #c2ab99;
    --line: #3d2d23;
    --saffron: #ffa733;
    --turmeric: #ffc65c;
    --chilli: #ff5a6e;
    --chilli-ink: #1a0b0d;
    --leaf: #5cc98b;
    --hero-a: #2a1a10;
    --hero-b: #2c1418;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #16100c;
  --surface: #211812;
  --surface-2: #2d2019;
  --ink: #f7ebe0;
  --ink-soft: #c2ab99;
  --line: #3d2d23;
  --saffron: #ffa733;
  --turmeric: #ffc65c;
  --chilli: #ff5a6e;
  --chilli-ink: #1a0b0d;
  --leaf: #5cc98b;
  --hero-a: #2a1a10;
  --hero-b: #2c1418;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 64px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }
.fine { font-size: 0.78rem; color: var(--ink-soft); margin: 8px 0 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 800;
  color: var(--chilli); margin: 0 0 12px;
}
[hidden] { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; text-decoration: none;
  letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 8px;
}
.logo span:not(.logo-mark) { color: var(--chilli); }
.logo-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--turmeric); font-size: 1rem; transform: rotate(-12deg);
}
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; order: 2; }
.theme-btn {
  order: 3; border: 1.5px solid var(--line); background: var(--surface); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; font-size: 1rem; flex: none;
}
.nav a {
  text-decoration: none; padding: 6px 12px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--chilli-ink); background: var(--chilli); }
.nav .soon { font-size: 0.62rem; vertical-align: super; margin-left: 2px; color: var(--saffron); }
.nav a.active .soon { color: inherit; }
@media (max-width: 760px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  .theme-btn { order: 1; margin-left: auto; }
  .nav { order: 4; margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

/* Hero */
.hero-band {
  background:
    radial-gradient(circle at 15% 20%, var(--hero-a), transparent 55%),
    radial-gradient(circle at 85% 30%, var(--hero-b), transparent 50%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-top: 32px; } }
.hero p.lead, .page-head .lead { font-size: 1.12rem; max-width: 620px; color: var(--ink-soft); }
.hero h1 em { font-style: normal; color: var(--chilli); position: relative; z-index: 0; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.05em; height: 0.18em;
  background: var(--turmeric); opacity: 0.55; z-index: -1; border-radius: 4px;
}
.page-head { padding: 40px 0 24px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 2px solid var(--ink);
  text-decoration: none; cursor: pointer;
  background: transparent; color: var(--ink); font: inherit; font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn.primary { background: var(--chilli); border-color: var(--chilli); color: var(--chilli-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--chilli) 35%, transparent); }
.btn:hover { transform: translateY(-2px); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.stats strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--chilli); }
.stats span { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

.featured {
  display: block; text-decoration: none; background: var(--surface); border-radius: calc(var(--radius) + 6px);
  overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); transform: rotate(1deg);
  transition: transform 0.2s;
}
.featured:hover { transform: rotate(0) translateY(-4px); }
.featured .poster.big { border-radius: 0; min-height: 240px; }
.featured-body { padding: 18px 20px 20px; display: grid; gap: 8px; }
.featured-body h2 { margin: 4px 0 0; }
.featured-body p { margin: 0; color: var(--ink-soft); }
@media (max-width: 900px) { .featured { transform: none; } }

/* Ticker */
.ticker { background: var(--ink); color: var(--bg); overflow: hidden; padding: 10px 0; }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 40s linear infinite; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.ticker-track span { white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; color: var(--chilli); text-decoration: none; }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  box-shadow: var(--shadow); transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:hover .poster-icon { transform: rotate(-8deg) scale(1.1); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }

/* Generated poster tile */
.poster {
  aspect-ratio: 16 / 9; display: flex; align-items: flex-end; padding: 14px;
  color: #fff; position: relative; overflow: hidden; isolation: isolate;
}
.poster::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18;
  background-image: radial-gradient(circle at 1px 1px, #fff 1.2px, transparent 0);
  background-size: 14px 14px;
}
.poster::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 60%);
}
.poster-title {
  font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1.05;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); max-width: 80%;
}
.poster-icon {
  position: absolute; right: 12px; bottom: 6px; font-size: 3.2rem; opacity: 0.9;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); transition: transform 0.2s;
}
.poster .lang-pill, .age-pill {
  position: absolute; top: 12px; left: 12px; font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.38); padding: 3px 9px; border-radius: 999px; color: #fff;
}
.age-pill { left: auto; right: 12px; background: var(--leaf); }
.age-pill.static { position: static; vertical-align: middle; margin-left: 6px; }
.poster.big { aspect-ratio: auto; min-height: 260px; border-radius: var(--radius); padding: 24px; }
.poster.big .poster-title { font-size: clamp(2rem, 6vw, 3.6rem); }
.poster.big .poster-icon { font-size: 5.5rem; right: 24px; bottom: 16px; }
.lang-Hindi { background: linear-gradient(135deg, #f08a00, #d7263d); }
.lang-Tamil { background: linear-gradient(135deg, #c2185b, #6a1b9a); }
.lang-Telugu { background: linear-gradient(135deg, #5e35b1, #1e88e5); }
.lang-Malayalam { background: linear-gradient(135deg, #2e8b57, #00796b); }
.lang-Kannada { background: linear-gradient(135deg, #e65100, #6d4c41); }
.lang-English { background: linear-gradient(135deg, #1f2a44, #b8860b); }

/* Ratings */
.meter { display: inline-flex; gap: 1px; font-size: 1rem; line-height: 1; }
.meter .off { filter: grayscale(1); opacity: 0.25; }
.score {
  font-family: var(--font-display); font-weight: 800; font-size: 0.95rem;
  background: var(--surface-2); border-radius: 8px; padding: 2px 8px; white-space: nowrap;
}
.score small { font-weight: 600; color: var(--ink-soft); }

/* OTT badges */
.otts { display: flex; flex-wrap: wrap; gap: 6px; }
.ott {
  font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.01em;
  background: var(--surface-2); color: var(--ink); white-space: nowrap;
}
.ott-netflix { background: #e50914; color: #fff; }
.ott-prime-video { background: #00a8e1; color: #00131c; }
.ott-jiohotstar { background: #0f1e64; color: #fff; }
.ott-zee5 { background: #8230c6; color: #fff; }
.ott-sonyliv { background: #222; color: #f5c518; }
.ott-sun-nxt { background: #f57c00; color: #1a0d00; }
.ott-aha { background: #ff6d00; color: #fff; }
.ott-manoramamax { background: #c62828; color: #fff; }
.ott-lionsgate-play { background: #333; color: #fff; }
.ott-mx-player { background: #1565c0; color: #fff; }
.ott-apple-tv, .ott-amazon { background: var(--ink); color: var(--bg); }

/* Chips & filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--saffron); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 18px; box-shadow: var(--shadow);
}
.filters .title { display: block; font-weight: 700; margin-bottom: 8px; }
.title-inline { font-weight: 700; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  font: inherit; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink);
}
.toolbar input { flex: 1; min-width: 200px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--chilli); }
.count { margin: 18px 0 10px; font-weight: 600; }

/* Mood tiles */
.moods { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mood {
  display: block; text-decoration: none; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s;
}
.mood:hover { border-color: var(--saffron); transform: translateY(-2px); }
.mood .e { font-size: 1.8rem; }
.mood strong { display: block; font-family: var(--font-display); font-size: 1.12rem; }
.mood span.b { font-size: 0.85rem; color: var(--ink-soft); }

/* Masala meter explainer */
.explainer {
  display: grid; gap: 20px; grid-template-columns: 1fr 1fr;
  background: var(--surface-2); border-radius: var(--radius); padding: 24px;
}
.explainer p { margin: 0.3em 0 0; color: var(--ink-soft); }
@media (max-width: 640px) { .explainer { grid-template-columns: 1fr; } }

/* Charts */
.charts { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-box ol { list-style: none; margin: 0; padding: 0; }
.chart-box li a {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.chart-box li:first-child a { border-top: 0; }
.chart-box li b { font-family: var(--font-display); font-size: 1.4rem; color: var(--saffron); }
.chart-box li span { font-weight: 700; line-height: 1.25; }
.chart-box li small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.8rem; }

/* Teasers */
.teasers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.teaser {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; display: block;
}
.teaser h3 { margin-top: 10px; }
.teaser.live { border-style: solid; border-color: color-mix(in srgb, var(--leaf) 45%, var(--line)); background: color-mix(in srgb, var(--leaf) 7%, var(--surface)); }
.teaser:hover { border-color: var(--saffron); }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--turmeric); color: #1a0e00; padding: 2px 9px; border-radius: 999px;
}
.badge.leaf { background: var(--leaf); color: #fff; }

/* Review detail */
.review-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) 320px; margin-top: 28px; }
@media (max-width: 880px) { .review-layout { grid-template-columns: 1fr; } }
.review-layout aside { display: grid; gap: 16px; align-content: start; }
.review-body p { font-size: 1.08rem; }
.tagline { font-size: 1.25rem; font-style: italic; color: var(--ink-soft); }
.side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.side h3 { margin-bottom: 8px; }
.side .small { margin: 0 0 6px; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 0.95rem; }
.side dt { color: var(--ink-soft); }
.side dd { margin: 0; font-weight: 600; }
.panel-watch .ott { font-size: 0.85rem; padding: 5px 11px; }
.stream-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: -6px 0 18px; }
.jw { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--chilli); text-decoration: none; }
.rating-big { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.rating-big > div { background: var(--surface-2); border-radius: var(--radius); padding: 14px 18px; }
.rating-big .label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.rating-big .meter { font-size: 1.6rem; }
.rating-big .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.hm { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 24px; }
@media (max-width: 560px) { .hm { grid-template-columns: 1fr; } }
.hm ul { margin: 0; padding-left: 1.1em; }
.hm h3 { font-size: 1rem; }
.hits h3 { color: var(--leaf); }
.misses h3 { color: var(--chilli); }
.panel { margin-top: 28px; border-radius: var(--radius); padding: 20px; background: var(--surface-2); }
.panel p { font-size: 1rem; margin: 10px 0 0; }
.panel.parent { background: color-mix(in srgb, var(--leaf) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--leaf) 30%, var(--line)); }
.share-row { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Your rating */
.rate { display: flex; gap: 6px; margin-top: 10px; }
.rate button {
  font-size: 1.9rem; background: none; border: 0; cursor: pointer; padding: 2px;
  filter: grayscale(1); opacity: 0.3; transition: transform 0.12s, opacity 0.12s, filter 0.12s;
}
.rate button.on { filter: none; opacity: 1; }
.rate button:hover { transform: scale(1.2) rotate(-8deg); }
.rate-msg { font-weight: 700; color: var(--chilli); min-height: 1.6em; }

/* Parent-note bars */
.notes { display: grid; gap: 8px; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } }
.note-row { display: grid; grid-template-columns: 1fr auto 52px; gap: 10px; align-items: center; font-weight: 600; font-size: 0.92rem; }
.note-row em { font-style: normal; color: var(--ink-soft); font-size: 0.82rem; }
.bars { display: inline-flex; gap: 3px; vertical-align: middle; }
.bars i { width: 14px; height: 8px; border-radius: 3px; background: var(--line); }
.bars.lvl-1 i:nth-child(-n+1) { background: var(--leaf); }
.bars.lvl-2 i:nth-child(-n+2) { background: var(--saffron); }
.bars.lvl-3 i { background: var(--chilli); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.legend > span { display: inline-flex; gap: 6px; align-items: center; }

/* Family page */
.family-theme .page-head h1 { color: var(--leaf); }
.family-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .family-list { grid-template-columns: 1fr; } }
.family-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform 0.18s;
  display: flex; flex-direction: column;
}
.family-card:hover { transform: translateY(-4px); }
.family-body { padding: 16px; display: grid; gap: 10px; }
.family-body h3 { margin: 0; }
.family-body p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.notes.compact { margin: 0; grid-template-columns: 1fr; gap: 4px; }
.notes.compact .note-row { font-size: 0.85rem; }

.empty { padding: 40px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); grid-column: 1 / -1; }
.why { font-size: 0.82rem; color: var(--saffron); font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: 0.92rem; color: var(--ink-soft); background: var(--surface); }
.site-footer .wrap { display: grid; gap: 20px; grid-template-columns: 1fr auto; }
.site-footer p { margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: start; }
.footer-links a { text-decoration: none; font-weight: 600; color: var(--ink); }
.footer-links a:hover { color: var(--chilli); }
.site-footer .fine { grid-column: 1 / -1; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }
