:root {
  --bg: #f4f3ee;
  --paper: #fffefa;
  --ink: #101a2d;
  --muted: #718097;
  --line: #dfe2dc;
  --blue: #183dca;
  --lime: #d7f36b;
  --orange: #ff714b;
  --shadow: 0 18px 45px rgba(16, 26, 45, .09);
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

header { position: sticky; top: 0; z-index: 50; background: rgba(244,243,238,.9); border-bottom: 1px solid rgba(16,26,45,.1); backdrop-filter: blur(18px); }
.hd { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 900; letter-spacing: -1px; white-space: nowrap; }
.logo::before { content: ""; width: 13px; height: 13px; border-radius: 50%; background: var(--orange); box-shadow: 7px 0 0 var(--blue); }
.logo b { color: var(--blue); }
nav.nav { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
nav.nav::-webkit-scrollbar { display: none; }
.nav-link { padding: 7px 12px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; transition: .2s ease; }
.nav-link:hover { color: var(--ink); background: #e8e9e3; }
.nav-link.active { color: var(--paper); background: var(--blue); box-shadow: 0 7px 16px rgba(24,61,202,.17); }
.search { display: flex; margin-left: auto; }
.search input { width: 225px; max-width: 28vw; padding: 10px 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-right: 0; border-radius: 7px 0 0 7px; outline: none; }
.search input:focus { border-color: var(--blue); }
.search button { padding: 0 16px; color: var(--paper); background: var(--blue); border: 0; border-radius: 0 7px 7px 0; cursor: pointer; font-weight: 750; }
.search button:hover { background: #0e2eaa; }

/* 首页首屏：大标题、策展式入口和轻量色块 */
.hero { position: relative; min-height: 430px; margin: 28px 0 26px; padding: 64px 68px; overflow: hidden; border-radius: 18px; color: var(--paper); background: var(--ink); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: 7%; top: -160px; border-radius: 50%; background: var(--blue); opacity: .95; }
.hero::after { content: "WATCH\A MORE"; white-space: pre; position: absolute; right: 8%; bottom: 38px; color: rgba(255,255,255,.12); font-size: 78px; line-height: .82; font-weight: 900; letter-spacing: -7px; transform: rotate(-8deg); }
.hero-copy, .hero-search, .hotkeys { position: relative; z-index: 2; }
.hero-copy { max-width: 620px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: 2.2px; }
.eyebrow i { display: block; width: 30px; height: 3px; background: var(--lime); }
.hero h1 { max-width: 650px; margin: 16px 0 11px; font-size: clamp(42px, 6.5vw, 76px); line-height: .98; letter-spacing: -4px; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero p { margin: 0 0 32px; color: #b5c0d2; font-size: 16px; }
.hero-search { max-width: 560px; }
.hero-search input { width: 100%; max-width: none; padding: 15px 17px; border-color: transparent; font-size: 15px; }
.hero-search button { padding: 0 25px; background: var(--orange); font-size: 15px; }
.hero-search button:hover { background: #e65a38; }
.hotkeys { margin-top: 15px; color: #9eacc0; font-size: 12px; }
.hotkeys span { margin-right: 8px; color: var(--lime); font-weight: 700; }
.hotkeys a { margin-right: 14px; }
.hotkeys a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hero-links { position: absolute; z-index: 3; right: 42px; bottom: 28px; display: flex; gap: 22px; }
.hero-links a { display: flex; flex-direction: column; color: #c6d0df; }
.hero-links strong { color: var(--lime); font-size: 17px; }
.hero-links span { font-size: 11px; }

.sec { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; }
.sec h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.5px; }
.sec h2::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.sec a.more { display: inline-block; color: #fff; background: var(--blue); font-size: 12px; font-weight: 750; padding: 5px 14px; border-radius: 999px; }
.sec a.more:hover { text-decoration: none; filter: brightness(1.12); }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 16px; align-items: start; }
.card { display: block; min-width: 0; }
.thumb { position: relative; width: 100%; aspect-ratio: 3/4; overflow: hidden; border-radius: 10px; background: #dfe3e8; box-shadow: 0 8px 20px rgba(16,26,45,.1); }
.thumb::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.18); border-radius: inherit; pointer-events: none; }
.thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.045); }
.badge { position: absolute; right: 7px; bottom: 7px; z-index: 1; max-width: calc(100% - 14px); padding: 3px 7px; overflow: hidden; color: var(--ink); background: var(--lime); border-radius: 4px; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.title { margin-top: 8px; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card:hover .title { color: var(--blue); }
.meta { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 16px; padding: 3px 3px 15px; overflow-x: auto; scrollbar-color: #b4bac4 transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.chip { padding: 6px 11px; color: var(--muted); border: 1px solid transparent; border-radius: 99px; font-size: 13px; }
.chip:hover { color: var(--ink); background: #e7e9e3; }
.chip.active { color: var(--ink); background: var(--lime); border-color: #c3e354; font-weight: 800; }
.frow { display: flex; align-items: flex-start; gap: 16px; padding: 13px 16px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,254,250,.65); }
.flabel { width: 42px; flex-shrink: 0; padding-top: 6px; color: var(--ink); font-size: 12px; font-weight: 800; }
.chips.grow { flex: 1; min-width: 0; margin: 0; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 30px 0 50px; }
.pager button { padding: 9px 20px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 700; }
.pager button:hover:not(:disabled) { color: var(--blue); border-color: var(--blue); }
.pager button:disabled { opacity: .4; cursor: default; }

.detail-wrap { position: relative; }
.backdrop { position: absolute; top: -15px; left: 50%; width: 100vw; max-width: 1400px; height: 330px; transform: translateX(-50%); background-size: cover; background-position: center 20%; filter: blur(60px) saturate(.6); opacity: .12; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); pointer-events: none; }
.detail { position: relative; display: flex; gap: 34px; margin: 28px 0 40px; padding: 38px 42px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,254,250,.72); box-shadow: var(--shadow); }
.poster { width: 220px; flex-shrink: 0; aspect-ratio: 3/4; overflow: hidden; border-radius: 10px; background: #dfe3e8; box-shadow: 0 14px 26px rgba(16,26,45,.17); }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.dinfo { min-width: 0; }
.dinfo h1 { margin: 3px 0 12px; font-size: 34px; line-height: 1.1; letter-spacing: -1.5px; }
.alias { color: var(--muted); font-size: 12px; letter-spacing: 1px; margin: -8px 0 8px; text-transform: capitalize; }
.dinfo .sub { margin: 5px 0; color: var(--muted); font-size: 13px; }
.pills { margin: 8px 0 14px; }
.pill { display: inline-block; padding: 4px 9px; margin: 0 5px 5px 0; color: var(--blue); background: #e9ecff; border-radius: 4px; font-size: 11px; font-weight: 750; }
.pill.gold { color: #855700; background: #fff0c5; }
.desc { max-width: 720px; margin-top: 14px; color: #4e5e73; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.play-btn { display: inline-block; margin-top: 20px; padding: 12px 27px; color: var(--ink); background: var(--lime); border-radius: 7px; font-size: 14px; font-weight: 850; box-shadow: 0 8px 18px rgba(169,194,61,.23); }
.play-btn:hover { background: #c6e655; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 9px; margin: 13px 0 42px; }
.ep { padding: 10px 5px; overflow: hidden; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.ep:hover { color: var(--blue); border-color: var(--blue); }
.ep.on { color: var(--ink); background: var(--lime); border-color: var(--lime); font-weight: 800; }

.player-box { margin: 18px 0; overflow: hidden; aspect-ratio: 16/9; background: #050914; border-radius: 12px; box-shadow: var(--shadow); }
.player-box video, .player-box iframe { display: block; width: 100%; height: 100%; border: 0; background: #050914; }
.ch-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ch-btn { padding: 9px 17px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 13px; }
.ch-btn:hover { color: var(--blue); border-color: var(--blue); }
.ch-btn.active { color: var(--ink); background: var(--lime); border-color: var(--lime); font-weight: 800; }
.tip { margin: 10px 0 30px; color: var(--muted); font-size: 12px; }
.rank-list { display: flex; flex-direction: column; padding: 8px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,254,250,.7); }
.rank-row { display: flex; align-items: center; gap: 17px; padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 5px; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: #f0f1ec; }
.rn { width: 30px; flex-shrink: 0; color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; text-align: center; }
.rn.top1 { color: var(--orange); font-weight: 900; }.rn.top2 { color: var(--blue); font-weight: 900; }.rn.top3 { color: #899c28; font-weight: 900; }
.rank-thumb { width: 52px; height: 70px; flex-shrink: 0; object-fit: cover; object-position: center top; border-radius: 5px; background: #dfe3e8; }
.rank-info { min-width: 0; }.rank-title { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.rank-row:hover .rank-title { color: var(--blue); }
.loading, .empty { padding: 52px 0; color: var(--muted); text-align: center; font-size: 13px; }
#btt { position: fixed; right: 22px; bottom: 25px; z-index: 99; width: 42px; height: 42px; color: var(--paper); background: var(--blue); border: 0; border-radius: 50%; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; }
#btt.show { opacity: 1; pointer-events: auto; }
footer { margin-top: 55px; padding: 24px 16px 42px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; font-size: 12px; }

@media (max-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hd { flex-wrap: wrap; gap: 7px 14px; padding-top: 10px; padding-bottom: 10px; }
  nav.nav { order: 3; flex-basis: 100%; }
  .hd > .search { margin-left: auto; }.hd > .search input { width: 160px; }
  .hero { min-height: 500px; padding: 42px 26px 30px; }.hero::before { right: -28%; top: 40%; }.hero::after { right: -4%; bottom: 95px; font-size: 58px; }
  .hero-links { right: 26px; bottom: 24px; left: 26px; justify-content: space-between; gap: 8px; }
  .detail { flex-direction: column; padding: 24px; }.poster { width: 155px; }.dinfo h1 { font-size: 28px; }
}
@media (max-width: 460px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px 9px; }.row-scroll { grid-auto-columns: 122px; gap: 11px; }
  .hero { min-height: 475px; padding: 34px 20px 25px; }.hero h1 { font-size: 43px; letter-spacing: -2px; }.hero p { font-size: 13px; }.hero-search input { font-size: 13px; }.hotkeys a { margin-right: 7px; }
  .hero-links { right: 20px; left: 20px; }.hero-links strong { font-size: 14px; }.hero-links span { font-size: 10px; }
  .frow { gap: 9px; padding: 10px 11px; }.flabel { width: 32px; }.chip { padding: 5px 8px; font-size: 12px; }
  .rank-list { padding: 6px 10px; }.rank-row { gap: 9px; }.rank-thumb { width: 45px; height: 60px; }
}
