/* =========================================
   VARIABLES & RESET
========================================= */
:root {
  --bg: #09090f;
  --bg2: #0d0d16;
  --card: #111119;
  --card-hover: #18181f;
  --header: rgba(9,9,15,0.97);
  --border: #1c1c28;
  --border2: #242436;
  --text: #e8e8f2;
  --text-muted: #72728c;
  --text-dim: #36364e;
  --accent: #e53e3e;
  --accent-hover: #fc4f4f;
  --ai: #7c3aed;
  --ai2: #4f46e5;
  --ai-soft: rgba(124,58,237,0.12);
  --gold: #f59e0b;
  --green: #10b981;
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.7);
  --transition: 0.2s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,'PingFang SC','Noto Sans SC','Microsoft YaHei',sans-serif;
  line-height:1.6;
  min-height:100vh;
  overflow-x:hidden;
}
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; }
button { font-family:inherit; border:none; cursor:pointer; }

::-webkit-scrollbar { width:4px; height:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border2); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:#3a3a52; }

/* =========================================
   TOP PROGRESS BAR
========================================= */
#topbar {
  position:fixed; top:0; left:0; height:2px; width:0%;
  background:linear-gradient(to right, var(--accent), #f97316);
  z-index:9999; transition:width 0.3s ease; border-radius:0 2px 2px 0;
}

/* =========================================
   HEADER
========================================= */
.header {
  position:sticky; top:0; z-index:100;
  background:var(--header);
  backdrop-filter:blur(20px) saturate(1.8);
  -webkit-backdrop-filter:blur(20px) saturate(1.8);
  border-bottom:1px solid var(--border);
  height:62px;
}
.header-inner {
  max-width:1400px; margin:0 auto;
  height:100%; display:flex; align-items:center; gap:24px;
  padding:0 24px;
}
.logo {
  display:flex; align-items:center; gap:9px;
  font-size:18px; font-weight:800; flex-shrink:0;
  letter-spacing:-0.3px;
}
.logo-mark {
  width:34px; height:34px;
  background:linear-gradient(135deg,#c0392b 0%,#e74c3c 60%,#e02d2d 100%);
  border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 12px rgba(224,45,45,0.45),0 0 0 1px rgba(255,255,255,0.06);
  flex-shrink:0;
}
.logo-mark svg { width:16px; height:16px; }
.logo-en { color:var(--text); font-weight:900; letter-spacing:-0.5px; }
.logo-zh { color:var(--accent); font-weight:700; margin-left:2px; opacity:0.9; }

.nav { display:flex; align-items:center; gap:2px; flex:1; overflow-x:auto; }
.nav::-webkit-scrollbar { display:none; }
.nav-link {
  padding:6px 13px; border-radius:5px;
  font-size:13.5px; font-weight:500; white-space:nowrap;
  color:var(--text-muted); transition:all var(--transition);
}
.nav-link:hover { color:var(--text); background:rgba(255,255,255,0.06); }
.nav-link.active { color:var(--text); background:rgba(255,255,255,0.08); }
.nav-link.ai-link {
  color:#a78bfa;
  background:linear-gradient(135deg,rgba(124,58,237,0.14),rgba(79,70,229,0.08));
  border:1px solid rgba(124,58,237,0.22);
}
.nav-link.ai-link:hover {
  background:linear-gradient(135deg,rgba(124,58,237,0.24),rgba(79,70,229,0.16));
  border-color:rgba(124,58,237,0.45);
}
.header-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.search-wrap { position:relative; }
.search-input {
  background:rgba(255,255,255,0.06);
  border:1px solid var(--border2);
  border-radius:22px;
  padding:7px 14px 7px 36px;
  color:var(--text); font-size:13px; width:200px;
  outline:none; transition:all 0.25s;
}
.search-input::placeholder { color:var(--text-muted); }
.search-input:focus {
  border-color:rgba(124,58,237,0.5);
  box-shadow:0 0 0 3px rgba(124,58,237,0.1);
  background:rgba(255,255,255,0.08);
  width:260px;
}
.search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); pointer-events:none; }
.search-icon svg { width:14px; height:14px; stroke:var(--text-muted); fill:none; stroke-width:2; }
.search-dropdown {
  position:absolute; top:calc(100% + 8px); left:0;
  width:320px; background:var(--card-hover);
  border:1px solid var(--border2); border-radius:var(--radius);
  box-shadow:0 16px 48px rgba(0,0,0,0.6);
  display:none; z-index:200; overflow:hidden;
}
.search-dropdown.open { display:block; }
.search-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; cursor:pointer; transition:background 0.12s;
}
.search-item:hover { background:rgba(255,255,255,0.05); }
.search-item-thumb {
  width:36px; height:54px; border-radius:4px;
  object-fit:cover; background:var(--border2); flex-shrink:0;
}
.search-item-title { font-size:13px; line-height:1.35; font-weight:500; }
.search-item-meta { font-size:11px; color:var(--text-muted); margin-top:2px; }
.ai-chip {
  font-size:10px; padding:2px 6px; border-radius:3px;
  background:rgba(124,58,237,0.2); color:#a78bfa;
  font-weight:600; flex-shrink:0; margin-left:auto;
}

/* =========================================
   HERO
========================================= */
.hero {
  position:relative; height:440px; overflow:hidden;
  background:linear-gradient(135deg,#0c0c1e 0%,#13131f 100%);
}
.hero-slide {
  position:absolute; inset:0;
  opacity:0; transition:opacity 0.7s ease;
}
.hero-slide.active { opacity:1; }
.hero-bg {
  /* 背景不再用拉伸海报，改用渐变色调 */
  position:absolute; inset:0;
  background-size:cover; background-position:center;
  filter:blur(80px) brightness(0.18) saturate(1.4);
  transform:scale(1.1);
}
.hero-grad {
  position:absolute; inset:0;
  background:linear-gradient(
    to right,
    rgba(10,10,20,0.98) 0%,
    rgba(10,10,20,0.82) 50%,
    rgba(10,10,20,0.25) 75%,
    rgba(10,10,20,0.05) 100%
  );
}
.hero-grad::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:160px;
  background:linear-gradient(to top, var(--bg) 0%, transparent 100%);
}
.hero-body {
  position:absolute; inset:0;
  display:flex; flex-direction:row; align-items:center;
  padding:60px max(24px,5vw) 40px; gap:40px; z-index:1;
}
.hero-content {
  flex:1; min-width:0;
  display:flex; flex-direction:column; justify-content:center;
}
.hero-poster-wrap {
  flex-shrink:0; width:210px; position:relative;
  filter:drop-shadow(0 12px 40px rgba(0,0,0,0.85));
}
.hero-poster {
  width:100%; max-height:320px; object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.08);
  display:block;
  aspect-ratio:2/3;
}
.hero-badges { display:flex; align-items:center; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.hero-type {
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:700; letter-spacing:1px;
  text-transform:uppercase;
  padding:4px 11px; border-radius:4px;
  color:var(--accent);
  background:rgba(229,62,62,0.12); border:1px solid rgba(229,62,62,0.28);
}
.hero-type.ai, .hero-type.ai-comic {
  color:#c4b5fd;
  background:rgba(124,58,237,0.14); border:1px solid rgba(124,58,237,0.3);
}
.hero-heat {
  font-size:11px; font-weight:700; color:#fb923c;
  background:rgba(251,146,60,0.12); border:1px solid rgba(251,146,60,0.25);
  padding:4px 10px; border-radius:4px;
}
.hero-title {
  font-size:clamp(22px,3.6vw,44px);
  font-weight:800; line-height:1.18; margin-bottom:14px;
  text-shadow:0 2px 20px rgba(0,0,0,0.6);
}
.hero-meta {
  display:flex; align-items:center; gap:12px;
  font-size:13px; color:rgba(255,255,255,0.7); margin-bottom:14px;
}
.hero-meta span { display:flex; align-items:center; gap:4px; }
.hero-score { color:var(--gold); font-weight:700; font-size:14px; }
.hero-desc {
  font-size:13.5px; color:rgba(255,255,255,0.6); line-height:1.8;
  margin-bottom:28px;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
  max-width:480px;
}
.hero-btns { display:flex; gap:10px; align-items:center; }
.btn-play {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 26px;
  background:var(--accent); color:white;
  border-radius:6px; font-weight:700; font-size:14px;
  transition:all var(--transition);
  box-shadow:0 4px 20px rgba(229,62,62,0.4);
}
.btn-play:hover { background:var(--accent-hover); transform:translateY(-2px); box-shadow:0 8px 28px rgba(229,62,62,0.5); }
.btn-play svg { width:14px; height:14px; fill:white; }
.btn-info {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 20px;
  background:rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.2);
  color:white; border-radius:6px;
  font-weight:600; font-size:14px; cursor:pointer; transition:all var(--transition);
  backdrop-filter:blur(8px);
}
.btn-info:hover { background:rgba(255,255,255,0.18); }
.hero-dots {
  position:absolute; bottom:24px; left:50%; transform:translateX(-50%);
  display:flex; gap:6px; z-index:2;
  background:rgba(0,0,0,0.3); padding:7px 12px; border-radius:20px;
  backdrop-filter:blur(8px);
}
.dot {
  width:6px; height:6px; border-radius:3px;
  background:rgba(255,255,255,0.3); cursor:pointer; transition:all 0.35s;
}
.dot.on { width:22px; background:var(--accent); }

/* =========================================
   LAYOUT & PAGE
========================================= */
.page-wrap { max-width:1400px; margin:0 auto; padding:0 24px 64px; }

/* =========================================
   SECTION HEADERS
========================================= */
.section { margin-top:48px; }
.sec-head {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:18px; padding-bottom:14px;
  border-bottom:1px solid var(--border);
}
.sec-title {
  font-size:17px; font-weight:700; letter-spacing:-0.2px;
  display:flex; align-items:center; gap:9px;
}
.sec-title::before {
  content:''; width:3px; height:17px;
  background:var(--accent); border-radius:2px; flex-shrink:0;
}
.sec-title.ai::before { background:linear-gradient(to bottom,var(--ai),var(--ai2)); }
.sec-more {
  font-size:12.5px; color:var(--text-muted);
  display:flex; align-items:center; gap:3px; transition:color var(--transition);
  padding:4px 10px; border-radius:5px; border:1px solid transparent;
}
.sec-more svg { width:13px; height:13px; stroke:currentColor; fill:none; stroke-width:2.5; }
.sec-more:hover { color:var(--text); border-color:var(--border2); }

/* =========================================
   RANKING TABS
========================================= */
.rank-tabs {
  display:flex; gap:0; margin-bottom:20px;
  overflow-x:auto; border-bottom:1px solid var(--border);
}
.rank-tabs::-webkit-scrollbar { display:none; }
.rank-tab {
  padding:9px 18px; font-size:13px; font-weight:500;
  border:none; border-bottom:2px solid transparent;
  background:transparent; color:var(--text-muted);
  cursor:pointer; transition:color 0.18s, border-color 0.18s; outline:none;
  white-space:nowrap; flex-shrink:0;
  -webkit-appearance:none; appearance:none;
  margin-bottom:-1px;
}
.rank-tab:hover { color:var(--text); }
.rank-tab.on { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }
.rank-tab.ai-on { color:#a78bfa; border-bottom-color:var(--ai); font-weight:600; }

/* =========================================
   GRID LAYOUT
========================================= */
.row {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:14px;
}
.grid {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:14px;
}
.grid .card { width:auto; }

/* =========================================
   CARD
========================================= */
.card {
  width:auto; cursor:pointer;
  transition:transform 0.22s ease, box-shadow 0.22s ease;
  will-change:transform;
}
.card:hover { transform:translateY(-5px); }
.card.lg, .card.sm { width:auto; }

.card-img {
  position:relative; width:100%;
  aspect-ratio:2/3; border-radius:var(--radius);
  overflow:hidden; background:var(--card);
  box-shadow:var(--shadow-card);
}
.card:hover .card-img { box-shadow:var(--shadow-hover); }
.card-img img {
  width:100%; height:100%; object-fit:cover;
  transition:transform 0.35s ease;
}
.card:hover .card-img img { transform:scale(1.04); }

.card-play-mask {
  position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
  display:flex; align-items:center; justify-content:center;
  opacity:0; transition:opacity 0.22s;
}
.card:hover .card-play-mask { opacity:1; }
.play-btn-circle {
  width:44px; height:44px; border-radius:50%;
  background:rgba(255,255,255,0.95);
  display:flex; align-items:center; justify-content:center;
  transform:scale(0.82) translateY(6px);
  transition:transform 0.22s;
  box-shadow:0 4px 16px rgba(0,0,0,0.4);
}
.card:hover .play-btn-circle { transform:scale(1) translateY(0); }
.play-btn-circle svg { width:14px; height:14px; fill:#111; margin-left:2px; }

.card-badge {
  position:absolute; top:7px; right:7px;
  font-size:10px; font-weight:700; padding:2px 7px;
  border-radius:4px; letter-spacing:0.3px;
}
.badge-ai { background:var(--ai); color:white; }
.badge-hot { background:var(--accent); color:white; }
.badge-new { background:var(--green); color:white; }

.card-score {
  position:absolute; bottom:7px; right:8px;
  font-size:12px; font-weight:800; color:#fbbf24;
  text-shadow:0 1px 6px rgba(0,0,0,0.9);
}

.card-info { padding:8px 1px 0; }
.card-title {
  font-size:13px; font-weight:600; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2;
  -webkit-box-orient:vertical; overflow:hidden;
  margin-bottom:4px; color:var(--text);
  transition:color var(--transition);
}
.card:hover .card-title { color:#fff; }
.card-meta {
  font-size:11px; color:var(--text-muted);
  display:flex; gap:0; flex-wrap:wrap; align-items:center;
}
.card-meta span { display:inline-flex; align-items:center; }
.card-meta span::after { content:'·'; margin:0 5px; color:var(--text-dim); }
.card-meta span:last-child::after { display:none; }

/* =========================================
   SKELETON LOADING
========================================= */
@keyframes shimmer {
  0% { background-position:-400px 0; }
  100% { background-position:400px 0; }
}
.skel {
  background:linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
  background-size:800px 100%;
  animation:shimmer 1.6s ease infinite;
  border-radius:var(--radius);
}
.skel-card { cursor:default; }
.skel-card .card-img { position:relative; aspect-ratio:2/3; }
.skel-card .card-img .skel { position:absolute; inset:0; border-radius:var(--radius); }
.skel-title { height:13px; margin-top:10px; margin-bottom:6px; border-radius:4px; width:90%; }
.skel-meta { height:11px; border-radius:4px; width:65%; }

/* =========================================
   AI BLOCK
========================================= */
.ai-block {
  margin-top:48px;
  border:1px solid rgba(124,58,237,0.18);
  border-radius:var(--radius-lg);
  background:linear-gradient(135deg,rgba(124,58,237,0.08) 0%,rgba(79,70,229,0.04) 100%);
  position:relative; overflow:hidden; padding:24px 28px;
}
.ai-block::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(to right, var(--ai), var(--ai2), transparent);
}
.ai-block-head {
  display:flex; align-items:flex-start;
  justify-content:space-between; gap:16px; margin-bottom:20px;
}
.ai-block-title { font-size:19px; font-weight:800; margin-bottom:4px; }
.ai-block-title span { color:#a78bfa; }
.ai-block-sub { font-size:13px; color:var(--text-muted); }
.ai-filters { display:flex; gap:7px; flex-wrap:wrap; align-items:flex-start; }
.ai-filter {
  padding:5px 14px; border-radius:5px; font-size:12.5px;
  border:1px solid rgba(124,58,237,0.25); color:var(--text-muted);
  background:transparent; cursor:pointer; transition:all var(--transition);
}
.ai-filter:hover { border-color:rgba(124,58,237,0.5); color:#a78bfa; }
.ai-filter.on { background:var(--ai); border-color:var(--ai); color:white; }

/* =========================================
   FOOTER
========================================= */
.footer {
  background:var(--bg2); border-top:1px solid var(--border);
  padding:44px 24px 28px;
  margin-top:40px;
}
.footer-wrap { max-width:1400px; margin:0 auto; }
.footer-grid {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px; margin-bottom:32px;
}
.footer-brand .logo { margin-bottom:14px; }
.footer-brand p { font-size:13px; color:var(--text-muted); line-height:1.8; max-width:280px; }
.footer-tags { display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
.footer-tag {
  font-size:11px; color:var(--text-dim);
  padding:4px 10px; border-radius:4px; border:1px solid var(--border);
}
.footer-col h4 { font-size:12.5px; font-weight:700; margin-bottom:14px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.8px; }
.footer-col a {
  display:block; font-size:13px; color:var(--text-muted);
  margin-bottom:10px; transition:color var(--transition);
}
.footer-col a:hover { color:var(--text); }
.footer-bottom {
  border-top:1px solid var(--border); padding-top:20px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:var(--text-dim);
}

/* =========================================
   LIST PAGE
========================================= */
.page-head { padding:28px 0 20px; }
.page-h1 { font-size:24px; font-weight:800; margin-bottom:6px; }
.page-sub { font-size:13px; color:var(--text-muted); }
.filter-row {
  display:flex; flex-wrap:wrap; gap:8px;
  padding:14px 18px;
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); margin-bottom:24px; align-items:center;
}
.f-label { font-size:12px; color:var(--text-dim); flex-shrink:0; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }
.f-divider { width:1px; height:18px; background:var(--border2); margin:0 4px; }
.f-tag {
  padding:5px 13px; border-radius:5px; font-size:12.5px;
  border:1px solid var(--border2); color:var(--text-muted);
  cursor:pointer; background:transparent; transition:all var(--transition);
}
.f-tag:hover { border-color:var(--text-dim); color:var(--text); }
.f-tag.on { background:var(--accent); border-color:var(--accent); color:white; }

.pager { display:flex; justify-content:center; gap:6px; margin-top:40px; }
.pg {
  min-width:36px; height:36px; border-radius:6px;
  border:1px solid var(--border2); background:var(--card);
  color:var(--text-muted); font-size:13px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:all var(--transition); padding:0 10px;
}
.pg:hover { border-color:var(--text-muted); color:var(--text); }
.pg.on { background:var(--accent); border-color:var(--accent); color:white; font-weight:600; }

/* =========================================
   DETAIL PAGE
========================================= */
.player-box {
  background:#000; border-radius:var(--radius-lg);
  overflow:hidden; aspect-ratio:16/9; position:relative;
}
.player-box iframe, .player-box video { width:100%; height:100%; border:none; }
.player-holder {
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:12px; color:var(--text-muted); font-size:13px;
}
.big-play-btn {
  width:68px; height:68px; border-radius:50%;
  background:rgba(255,255,255,0.08);
  border:2px solid rgba(255,255,255,0.15);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all 0.2s;
}
.big-play-btn:hover { background:var(--accent); border-color:var(--accent); transform:scale(1.08); box-shadow:0 0 30px rgba(229,62,62,0.4); }
.big-play-btn svg { width:26px; height:26px; fill:white; margin-left:3px; }
.eps { display:flex; flex-wrap:wrap; gap:6px; margin-top:14px; }
.ep {
  padding:6px 14px; border-radius:5px;
  background:var(--card); border:1px solid var(--border2);
  font-size:12.5px; color:var(--text-muted); cursor:pointer; transition:all var(--transition);
}
.ep:hover { border-color:var(--text-muted); color:var(--text); }
.ep.on { background:var(--accent); border-color:var(--accent); color:white; font-weight:600; }
.detail-grid { display:grid; grid-template-columns:1fr 300px; gap:32px; margin-top:28px; }
.detail-title { font-size:24px; font-weight:800; margin:18px 0 10px; }
.dtag {
  padding:4px 11px; border-radius:4px; font-size:12px;
  background:rgba(255,255,255,0.05); border:1px solid var(--border); color:var(--text-muted);
}
.dtag.ai { background:rgba(124,58,237,0.12); border-color:rgba(124,58,237,0.3); color:#a78bfa; }
.score-tag {
  display:inline-flex; align-items:center; gap:4px;
  background:rgba(245,158,11,0.12); border:1px solid rgba(245,158,11,0.3);
  color:var(--gold); padding:4px 11px; border-radius:4px;
  font-weight:700; font-size:13px;
}
.info-row { display:flex; flex-wrap:wrap; gap:18px; margin:14px 0; }
.info-item { font-size:13px; color:var(--text-muted); }
.info-item b { color:var(--text-dim); font-weight:400; margin-right:4px; }
.desc-text { font-size:13.5px; color:var(--text-muted); line-height:1.85; margin-top:14px; }

/* =========================================
   AI PAGE
========================================= */
.ai-hero-section {
  background:linear-gradient(180deg, #0b0718 0%, var(--bg2) 100%);
  padding:64px 24px; text-align:center;
  position:relative; overflow:hidden;
}
.ai-hero-glow {
  position:absolute; top:-80px; left:50%; transform:translateX(-50%);
  width:700px; height:350px; border-radius:50%;
  background:radial-gradient(ellipse, rgba(124,58,237,0.18) 0%, transparent 65%);
  pointer-events:none;
}
.ai-hero-eyebrow {
  display:inline-block; font-size:11px; font-weight:700;
  letter-spacing:1.5px; text-transform:uppercase;
  color:#a78bfa; background:rgba(124,58,237,0.12);
  border:1px solid rgba(124,58,237,0.22); padding:5px 14px; border-radius:4px; margin-bottom:22px;
}
.ai-hero-h1 {
  font-size:clamp(30px,6vw,54px); font-weight:900; line-height:1.1; margin-bottom:16px;
  background:linear-gradient(135deg, #fff 0%, #c4b5fd 55%, #818cf8 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.ai-hero-sub { font-size:15px; color:var(--text-muted); margin-bottom:32px; line-height:1.7; }
.ai-type-row { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.ai-type-btn {
  padding:10px 22px; border:1px solid rgba(124,58,237,0.25);
  border-radius:6px; background:transparent; color:var(--text-muted);
  font-size:13.5px; cursor:pointer; transition:all 0.2s;
}
.ai-type-btn:hover { border-color:rgba(124,58,237,0.5); color:#a78bfa; }
.ai-type-btn.on { background:var(--ai); border-color:var(--ai); color:white; }
.ai-type-count { display:block; font-size:10px; color:inherit; opacity:0.75; margin-top:3px; }
.ai-features-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin:32px 0; }
.ai-feat {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:20px;
  transition:border-color 0.2s, transform 0.2s;
}
.ai-feat:hover { border-color:rgba(124,58,237,0.3); transform:translateY(-3px); }
.ai-feat-icon {
  width:38px; height:38px; border-radius:9px;
  background:var(--ai-soft); display:flex; align-items:center; justify-content:center; margin-bottom:13px;
}
.ai-feat-icon svg { width:18px; height:18px; stroke:#a78bfa; fill:none; stroke-width:1.5; }
.ai-feat-title { font-size:14px; font-weight:700; margin-bottom:6px; }
.ai-feat-desc { font-size:12.5px; color:var(--text-muted); line-height:1.65; }

/* =========================================
   LOADING & EMPTY
========================================= */
.spinner {
  width:22px; height:22px;
  border:2px solid var(--border2);
  border-top-color:var(--ai); border-radius:50%;
  animation:spin 0.8s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.loading { display:flex; align-items:center; justify-content:center; padding:48px; gap:10px; color:var(--text-muted); font-size:13px; }
.empty { text-align:center; padding:64px 32px; }
.empty-icon { font-size:40px; margin-bottom:12px; opacity:0.4; }
.empty p { font-size:13px; color:var(--text-muted); margin-top:6px; }

/* =========================================
   BACK TO TOP
========================================= */
#backTop {
  position:fixed; bottom:32px; right:28px;
  width:40px; height:40px; border-radius:10px;
  background:var(--card); border:1px solid var(--border2);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all 0.2s; z-index:90;
  opacity:0; transform:translateY(12px); pointer-events:none;
  box-shadow:0 4px 20px rgba(0,0,0,0.4);
}
#backTop.show { opacity:1; transform:translateY(0); pointer-events:auto; }
#backTop:hover { background:var(--accent); border-color:var(--accent); }
#backTop svg { width:16px; height:16px; stroke:var(--text-muted); fill:none; stroke-width:2.5; }
#backTop:hover svg { stroke:white; }

/* =========================================
   SCROLL REVEAL
========================================= */
.reveal {
  opacity:0; transform:translateY(22px);
  transition:opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity:1; transform:translateY(0); }

/* =========================================
   STATUS / MISC
========================================= */
.status-bar { margin-top:28px; display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.stat-box { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; }
.stat-num { font-size:26px; font-weight:800; line-height:1; margin-bottom:5px; }
.stat-num.r { color:var(--accent); }
.stat-num.p { color:#a78bfa; }
.stat-num.g { color:var(--gold); }
.stat-num.e { color:var(--green); }
.stat-tag { font-size:11.5px; color:var(--text-muted); }
.stat-hint { font-size:10.5px; color:var(--text-dim); margin-top:3px; }

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width:1280px) and (min-width:769px) {
  .row, .grid { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:1024px) {
  .footer-grid { grid-template-columns:1fr 1fr; }
  .detail-grid { grid-template-columns:1fr; }
  .status-bar { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px) {
  .header-inner { gap:12px; }
  .search-input { width:130px; }
  .search-input:focus { width:170px; }
  .hero { height:320px; }
  .hero-body { width:100%; gap:0; padding:0 16px; }
  .hero-poster-wrap { display:none; }
  .hero-desc { display:none; }
  .row, .grid { grid-template-columns:repeat(3,1fr); gap:10px; }
  .footer-grid { grid-template-columns:1fr; }
  .page-wrap { padding:0 14px 48px; }
  .ai-block { padding:18px 16px; }
  #backTop { bottom:20px; right:16px; }
}
@media (max-width:480px) {
  .row, .grid { grid-template-columns:repeat(2,1fr); gap:10px; }
  .hero { height:300px; }
}

/* =========================================
   MOBILE UI COMPONENTS
========================================= */

/* Hamburger button — hidden on desktop */
.mob-menu-btn {
  display: none;
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
  stroke: var(--text-muted);
}
.mob-menu-btn:active { background: rgba(255,255,255,0.12); }
.mob-menu-btn svg {
  width: 18px; height: 18px;
  stroke: var(--text-muted); fill: none; stroke-width: 2;
}

/* Mobile nav drawer */
.mob-nav-drawer {
  position: fixed; top: 62px; left: 0; right: 0;
  background: rgba(9,9,15,0.98);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
}
.mob-nav-drawer.open { max-height: 500px; }

.mob-nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 20px; font-size: 15px; font-weight: 500;
  color: var(--text-muted); text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-item:last-child { border-bottom: none; }
.mob-nav-item:active { background: rgba(255,255,255,0.06); }
.mob-nav-item.active { color: var(--text); }
.mob-nav-item.ai-link { color: #a78bfa; }
.mob-nav-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* Bottom navigation bar */
.mob-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(9,9,15,0.97);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mob-bottom-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 0 6px;
}
.mob-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 16px; min-width: 56px;
  color: var(--text-muted); font-size: 10.5px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: color 0.15s; border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.mob-tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
.mob-tab.active { color: var(--accent); }
.mob-tab.ai-active { color: #a78bfa; }
.mob-tab:active { opacity: 0.65; }

/* Full-screen search overlay */
.mob-search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.mob-search-overlay.open { transform: translateY(0); }

.mob-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mob-search-back {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mob-search-back svg { width: 20px; height: 20px; stroke: var(--text-muted); fill: none; stroke-width: 2; }
.mob-full-search { width: 100% !important; border-radius: 8px !important; }
.mob-full-search:focus { width: 100% !important; }

.mob-search-results { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mob-search-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 13px; }
.mob-search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s; -webkit-tap-highlight-color: transparent;
}
.mob-search-item:active { background: rgba(255,255,255,0.04); }
.mob-search-item img {
  width: 46px; height: 65px; border-radius: 5px;
  object-fit: cover; background: var(--card); flex-shrink: 0;
}
.mob-search-item-info { flex: 1; min-width: 0; }
.mob-search-item-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.mob-search-item-meta { font-size: 12px; color: var(--text-muted); }

/* =========================================
   RESPONSIVE OVERRIDES (Mobile v2)
========================================= */

/* Tablet: 4 columns */
@media (max-width:1280px) and (min-width:769px) {
  .row, .grid { grid-template-columns: repeat(4,1fr); }
}

@media (max-width:1024px) {
  .footer-grid { grid-template-columns:1fr 1fr; }
  .detail-grid { grid-template-columns:1fr; }
  .status-bar { grid-template-columns:repeat(2,1fr); }
}

/* ── Mobile (≤768px) ── */
@media (max-width:768px) {
  /* Show mobile UI */
  .mob-menu-btn { display: flex; }
  .mob-bottom-nav { display: block; }
  .nav { display: none; }

  /* Body padding for bottom nav */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  /* Header */
  .header { height: 56px; }
  .mob-nav-drawer { top: 56px; }
  .header-inner { padding: 0 12px; gap: 8px; height: 56px; }
  .logo { gap: 7px; font-size: 15px; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-mark svg { width: 12px; height: 12px; }

  /* Search: compact on mobile (full search via overlay) */
  .search-input { width: 120px; font-size: 14px; padding: 6px 10px 6px 32px; border-radius: 18px; }
  .search-input:focus { width: 150px; }
  .search-dropdown { width: min(88vw, 300px); right: 0; left: auto; }

  /* Hero: compact, bottom-aligned content */
  .hero { height: 260px; }
  .hero-bg {
    filter: brightness(0.55) saturate(1.15);
    transform: scale(1.05);
    background-position: center top;
  }
  .hero-grad {
    background: linear-gradient(
      to top,
      rgba(9,9,15,0.97) 0%,
      rgba(9,9,15,0.75) 40%,
      rgba(9,9,15,0.15) 65%,
      rgba(9,9,15,0.0) 100%
    );
  }
  .hero-body {
    width: 100%; padding: 16px 14px 40px;
    justify-content: flex-end;
  }
  .hero-badges { margin-bottom: 8px; gap: 6px; }
  .hero-type { font-size: 10px; padding: 3px 8px; }
  .hero-heat { font-size: 10px; padding: 3px 7px; }
  .hero-title { font-size: clamp(15px, 4.2vw, 20px); margin-bottom: 8px; }
  .hero-desc { display: none; }
  .hero-meta { font-size: 11.5px; gap: 8px; margin-bottom: 10px; }
  .hero-btns { gap: 8px; }
  .btn-play { padding: 9px 16px; font-size: 13px; gap: 6px; }
  .btn-play svg { width: 12px; height: 12px; }
  .btn-info { padding: 9px 12px; font-size: 13px; }
  .hero-dots { bottom: 8px; padding: 5px 10px; gap: 5px; }
  .dot { width: 5px; height: 5px; }
  .dot.on { width: 14px; }

  /* Cards: touch-first — always show gradient overlay */
  .card-play-mask {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
  }
  .play-btn-circle {
    transform: scale(0.85) translateY(0);
    background: rgba(229,62,62,0.88);
    box-shadow: 0 2px 12px rgba(229,62,62,0.4);
  }
  .play-btn-circle svg { fill: white; }
  .card:active { transform: scale(0.95); transition: transform 0.1s; }
  .card-title { font-size: 12.5px; }
  .card-meta { font-size: 10.5px; }

  /* Grid */
  .row, .grid { grid-template-columns: repeat(3,1fr); gap: 10px; }

  /* Sections */
  .section { margin-top: 24px; }
  .sec-head { margin-bottom: 13px; padding-bottom: 11px; }
  .sec-title { font-size: 15px; }
  .sec-title::before { height: 14px; }
  .page-wrap { padding: 0 12px 24px; }

  /* AI Block */
  .ai-block { padding: 14px 12px; margin-top: 24px; }
  .ai-block-head { flex-direction: column; gap: 10px; }
  .ai-block-title { font-size: 16px; }
  .ai-block-sub { font-size: 12px; }
  .ai-filters { gap: 6px; }
  .ai-filter { padding: 5px 10px; font-size: 12px; }

  /* Ranking tabs */
  .rank-tab { padding: 8px 13px; font-size: 12px; }

  /* Detail page episode list */
  .ep { padding: 7px 12px; font-size: 12px; min-width: 48px; text-align: center; }
  .eps { gap: 6px; }

  /* Player: full-width */
  .player-box { border-radius: var(--radius); }

  /* Sidebar sidebar becomes stacked and compact */
  .rel-thumb { width: 80px; height: 45px; }
  .rel-title { font-size: 12.5px; }
  .sidebar-title { font-size: 14px; }

  /* Footer */
  .footer { padding: 20px 14px 16px; margin-top: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
  .footer-brand p { font-size: 12px; max-width: 100%; }
  .footer-col h4 { font-size: 11px; margin-bottom: 10px; }
  .footer-col a { font-size: 12px; margin-bottom: 8px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; font-size: 11px; }

  /* Back to top — above bottom nav */
  #backTop { bottom: 72px; right: 14px; width: 36px; height: 36px; border-radius: 8px; }

  /* List page filters */
  .filter-row { padding: 10px 12px; gap: 6px; }
  .f-tag { padding: 5px 10px; font-size: 12px; }

  /* Pager */
  .pg { min-width: 32px; height: 32px; font-size: 12px; }
}

/* ── Very small phones (≤390px) ── */
@media (max-width:390px) {
  .row, .grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .hero { height: 230px; }
  .hero-title { font-size: 14px; }
  .btn-info { display: none; }
  .card-title { font-size: 12px; }
  .mob-tab { min-width: 48px; font-size: 10px; padding: 4px 10px; }
}

/* Fix: skeleton more visible, card image placeholder */
.skel {
  background: linear-gradient(90deg, #1a1a28 25%, #22223a 50%, #1a1a28 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease infinite;
}
.card-img {
  background: #18182a;
}
