:root {
  --bg: #0b0d12;
  --bg-2: #11141c;
  --surface: #161a25;
  --surface-2: #1d2230;
  --border: #262c3b;
  --text: #f1f3f7;
  --muted: #8b93a7;
  --muted-2: #5e6478;
  --accent: #ff5d6c;        /* coral */
  --accent-2: #ffb86b;      /* gold */
  --jade: #4ade80;
  --link: #ffd1a8;
  --shadow: 0 18px 40px -18px rgba(0,0,0,.7);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1280px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: #d8dce6; }
.muted { color: var(--muted); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); padding: 8px 12px; border-radius: 8px; color: #000; z-index: 999; }

/* Header */
.site-header { background: rgba(11,13,18,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 4px 14px -2px rgba(255,93,108,.5); }
.brand-name { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.02em; color: var(--text); }
a.brand:hover { text-decoration: none; }
.primary-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.primary-nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 500; }
.primary-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.primary-nav a.is-active { background: var(--surface-2); color: var(--accent-2); }
.search { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 4px 4px 14px; }
.search input { background: transparent; border: 0; outline: 0; color: var(--text); width: 220px; padding: 6px 0; font-size: 0.9rem; }
.search input::placeholder { color: var(--muted-2); }
.search button { width: 32px; height: 32px; border-radius: 999px; border: 0; background: var(--accent); color: #1a0008; font-weight: 700; cursor: pointer; }

/* Breadcrumbs */
.breadcrumbs { padding: 16px 0 4px; color: var(--muted); font-size: 0.85rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-2); }
.breadcrumbs .sep { margin: 0 8px; color: var(--muted-2); }

/* Layout */
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 40px; padding: 28px 24px 64px; }
.layout-main { min-width: 0; }
.layout-sidebar { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 980px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .search input { width: 140px; }
}

/* Hero */
.hero { position: relative; border-radius: 24px; overflow: hidden; padding: 64px 48px; margin: 12px 0 36px; background: radial-gradient(1200px 500px at 80% -10%, rgba(255,184,107,.18), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(255,93,108,.22), transparent 60%), linear-gradient(180deg, #11141c, #0b0d12); border: 1px solid var(--border); }
.hero h1 { max-width: 22ch; }
.hero p.lede { font-size: 1.15rem; max-width: 60ch; color: #cbd0dc; }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn-primary { background: var(--accent); color: #210006; }
.btn-primary:hover { background: #ff7686; color: #210006; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); color: var(--text); text-decoration: none; }

/* Country tabs strip */
.country-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 30px; }
.country-tabs a { padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 0.9rem; font-weight: 500; }
.country-tabs a:hover { border-color: var(--accent); text-decoration: none; }
.country-tabs a.is-active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1d0006; border-color: transparent; }

/* Section */
.section { margin: 38px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section-head h2 { margin: 0; }
.section-head a.more { color: var(--muted); font-size: 0.9rem; }
.section-head a.more:hover { color: var(--accent-2); }

/* Drama Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; }
.poster-card { display: flex; flex-direction: column; gap: 10px; }
.poster-card a { color: var(--text); }
.poster-card a:hover { color: var(--accent-2); text-decoration: none; }
.poster-frame { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: transform .18s ease; }
.poster-card:hover .poster-frame { transform: translateY(-3px); }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; }
.rank-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); color: var(--accent-2); font-family: var(--serif); font-weight: 900; font-size: 1.7rem; padding: 4px 10px; border-radius: 8px; }
.rating-pill { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.75); color: var(--accent-2); font-weight: 700; padding: 4px 8px; border-radius: 999px; font-size: 0.78rem; }
.poster-meta { font-size: 0.83rem; color: var(--muted); }
.poster-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }

/* Top10 ranked row */
.top10 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.top10 .poster-frame { aspect-ratio: 2 / 3; }

/* Title detail */
.title-hero { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 30px 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.title-hero .poster-frame { box-shadow: var(--shadow); }
.title-hero h1 { margin-top: 4px; }
.title-meta { color: var(--muted); margin: 4px 0 16px; font-size: 0.95rem; }
.title-meta span + span::before { content: " · "; color: var(--muted-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { padding: 5px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; color: var(--text); }
.chip a { color: inherit; }
.rating-block { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.rating-num { font-family: var(--serif); font-size: 2.6rem; color: var(--accent-2); font-weight: 900; line-height: 1; }
.rating-stars { color: var(--accent-2); font-size: 1.05rem; letter-spacing: 2px; }
.platforms-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.platform-pill { padding: 8px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 500; font-size: 0.88rem; }
.platform-pill:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 720px) { .title-hero { grid-template-columns: 140px 1fr; gap: 18px; } }

/* Article body */
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.2em; color: var(--accent-2); }
.prose p { color: #dde1ec; }
.prose ul { padding-left: 22px; }
.prose ul li { margin-bottom: 6px; color: #dde1ec; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 16px; margin: 18px 0; color: #cbd0dc; font-style: italic; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.sidebar-card h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-2); font-family: var(--sans); font-weight: 700; margin-bottom: 12px; }
.rec-list, .mini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mini-list li { display: flex; gap: 10px; align-items: baseline; font-size: 0.92rem; }
.mini-list .rank { font-family: var(--serif); color: var(--accent); font-weight: 900; min-width: 18px; }
.rec-list a { color: var(--text); font-size: 0.92rem; line-height: 1.4; display: block; }
.rec-list a:hover { color: var(--accent-2); text-decoration: none; }

/* List rows for ranked editorial */
.ranked-list { display: flex; flex-direction: column; gap: 22px; }
.ranked-row { display: grid; grid-template-columns: 56px 110px 1fr; gap: 20px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); align-items: start; }
.ranked-row .rank-num { font-family: var(--serif); font-size: 2.2rem; font-weight: 900; color: var(--accent); line-height: 1; }
.ranked-row .poster-frame { aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; }
.ranked-row h3 { margin: 0 0 4px; font-size: 1.2rem; }
.ranked-row h3 a { color: var(--text); }
.ranked-row h3 a:hover { color: var(--accent-2); text-decoration: none; }
.ranked-row .meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
.ranked-row p { font-size: 0.94rem; color: #c8cdd9; margin: 0; }
@media (max-width: 720px) { .ranked-row { grid-template-columns: 40px 80px 1fr; gap: 12px; padding: 12px; } }

/* Footer */
.site-footer { background: #07090d; border-top: 1px solid var(--border); padding: 56px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.site-footer h4 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-2); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer ul a { color: var(--muted); font-size: 0.92rem; }
.site-footer ul a:hover { color: var(--accent-2); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: 0.82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Country grid for index pages */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: block; color: var(--text); }
.tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); transition: transform .15s ease, border-color .15s ease; }
.tile h3 { margin: 0 0 6px; font-size: 1.15rem; }
.tile p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Misc */
.lede { font-size: 1.1rem; color: #cbd0dc; max-width: 70ch; }
.kbd { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
