/* ============================================================
   STUDIO 24 — Glass White / Indigo
   浅色玻璃拟态：纯白底 + 靛蓝高光 + 大留白 + 柔和阴影
   ============================================================ */
:root {
  --bg: #f6f7fb;
  --bg-soft: #eef0f7;
  --paper: #ffffff;
  --glass: rgba(255, 255, 255, .72);
  --line: #e4e7f0;
  --line-soft: #eef0f6;
  --ink: #14161f;
  --ink-2: #454a5c;
  --muted: #8a8fa3;
  --brand: #4f6ef2;
  --brand-2: #7b8cff;
  --brand-soft: #eef1ff;
  --accent: #ff5d8f;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 2px 8px rgba(20, 30, 70, .05);
  --shadow: 0 14px 40px rgba(30, 45, 100, .10);
  --shadow-lg: 0 28px 70px rgba(30, 45, 100, .16);
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(60% 45% at 85% -5%, rgba(79, 110, 242, .10), transparent 60%),
    radial-gradient(50% 40% at 5% 0%, rgba(255, 93, 143, .07), transparent 60%);
  background-attachment: fixed;
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 26px; }

/* ---------- 顶栏 ---------- */
header {
  position: sticky; top: 0; z-index: 80;
  background: var(--glass);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
.hd { display: flex; align-items: center; gap: 22px; min-height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 850; letter-spacing: .8px; white-space: nowrap; }
.logo b { color: var(--brand); }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(79, 110, 242, .35);
}
.logo-mark::after {
  content: ""; width: 0; height: 0; margin-left: 3px;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-radius: 2px;
}
nav.nav { display: flex; align-items: center; gap: 2px; flex: 1; margin-left: 12px; overflow-x: auto; scrollbar-width: none; }
nav.nav::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: .22s var(--ease);
}
.nav-link:hover { color: var(--brand); background: var(--brand-soft); }
.nav-link.active { color: #fff; background: var(--brand); font-weight: 750; box-shadow: 0 6px 16px rgba(79, 110, 242, .28); }

/* ---------- 搜索（页面内）---------- */
.search { display: flex; margin-left: auto; }
.page-search { display: flex; max-width: 620px; margin: 30px auto 10px; }
.page-search input {
  flex: 1; width: 100%; padding: 14px 18px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-right: 0; border-radius: 14px 0 0 14px; outline: none;
  font-size: 15px; box-shadow: var(--shadow-sm); transition: .2s;
}
.page-search input::placeholder { color: var(--muted); }
.page-search input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(79, 110, 242, .1); }
.page-search button {
  padding: 0 26px; color: #fff; background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border: 0; border-radius: 0 14px 14px 0; cursor: pointer;
  font-weight: 800; font-size: 15px; transition: .2s;
}
.page-search button:hover { filter: brightness(1.07); }

/* ---------- 首页沉浸式头图（全宽舞台）---------- */
.cine {
  position: relative; width: 100%; min-height: 460px;
  display: flex; align-items: center; overflow: hidden;
  margin-bottom: 8px;
}
.cine-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 30%;
  transform: scale(1.04); transition: background-image .6s ease;
}
.cine-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(10, 12, 24, .92) 0%, rgba(10, 12, 24, .78) 42%, rgba(10, 12, 24, .35) 72%, rgba(10, 12, 24, .55) 100%),
    linear-gradient(180deg, rgba(10, 12, 24, .55) 0%, transparent 30%, rgba(10, 12, 24, .85) 100%);
}
.cine-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1240px;
  margin: 0 auto; padding: 60px 26px 66px;
}
.cine-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; margin-bottom: 18px;
  color: #dfe5ff; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  background: rgba(123, 140, 255, .18); border: 1px solid rgba(123, 140, 255, .38);
  border-radius: 99px; backdrop-filter: blur(6px);
}
.cine-tag::before { content: "●"; color: #7b8cff; font-size: 9px; }
.cine-title {
  max-width: 780px; margin: 0 0 12px;
  color: #fff; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12;
  letter-spacing: -1.4px; font-weight: 900;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .4);
}
.cine-sub {
  max-width: 620px; margin: 0 0 26px;
  color: #b7bdd6; font-size: 15.5px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.cine-search { display: flex; max-width: 560px; }
.cine-search input {
  flex: 1; width: 100%; padding: 16px 18px; font-size: 15px; color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-right: 0; border-radius: 14px 0 0 14px; outline: none;
  backdrop-filter: blur(12px); transition: .2s;
}
.cine-search input::placeholder { color: #a8afc8; }
.cine-search input:focus { background: rgba(255, 255, 255, .18); border-color: rgba(123, 140, 255, .7); }
.cine-search button {
  padding: 0 28px; font-size: 15px; font-weight: 800; color: #fff; cursor: pointer;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border: 0; border-radius: 0 14px 14px 0; transition: .2s;
}
.cine-search button:hover { filter: brightness(1.1); }
.cine-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; }
.cine-hot::before { content: "热门"; color: #8b93b0; font-size: 12.5px; margin-right: 2px; }
.cine-chip {
  padding: 6px 13px; font-size: 12.5px; color: #d6dbf0;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 99px;
  backdrop-filter: blur(8px); transition: .2s;
}
.cine-chip:hover { color: #fff; background: rgba(123, 140, 255, .28); border-color: rgba(123, 140, 255, .5); }
.cine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 28px; }
.cine-play {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 30px; color: #fff; font-size: 15px; font-weight: 800;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border-radius: 13px; box-shadow: 0 16px 34px rgba(79, 110, 242, .42);
  transition: .25s;
}
.cine-play:hover { transform: translateY(-2px); box-shadow: 0 22px 44px rgba(79, 110, 242, .55); }
.cine-meta { color: #9aa1bd; font-size: 13.5px; }
.cine-meta b { color: #fff; font-weight: 850; }

@media (max-width: 768px) {
  .cine { min-height: 480px; }
  .cine-bg { background-position: center 22%; }
  .cine-inner { padding: 46px 16px 52px; }
  .cine-veil { background: linear-gradient(180deg, rgba(10,12,24,.5) 0%, rgba(10,12,24,.72) 45%, rgba(10,12,24,.94) 100%); }
}

/* ---------- 区块标题 ---------- */
.sec { display: flex; align-items: center; justify-content: space-between; margin: 40px 0 16px; }
.sec h2 { display: flex; align-items: center; gap: 11px; margin: 0; font-size: 20px; font-weight: 850; letter-spacing: -.4px; color: var(--ink); }
.sec h2::before { content: ""; width: 5px; height: 19px; border-radius: 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.sec a.more {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand); font-size: 12.5px; font-weight: 750;
  border: 1px solid var(--line); background: #fff;
  padding: 6px 14px; border-radius: 99px; box-shadow: var(--shadow-sm);
  transition: .2s;
}
.sec a.more:hover { border-color: var(--brand-2); background: var(--brand-soft); }

/* ---------- 卡片 / 网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 26px 20px; align-items: start; }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 166px;
  gap: 18px; padding: 4px 4px 16px; overflow-x: auto;
  scrollbar-color: #c9cee0 transparent;
}
.card { display: block; min-width: 0; }
.thumb {
  position: relative; width: 100%; aspect-ratio: 2/3; overflow: hidden;
  border-radius: 14px; background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(20, 30, 70, .06); pointer-events: none;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s var(--ease); }
.card:hover .thumb { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover .thumb img { transform: scale(1.05); }
.badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  max-width: calc(100% - 16px); padding: 4px 9px; overflow: hidden;
  color: #fff; background: rgba(20, 22, 31, .72);
  backdrop-filter: blur(4px);
  border-radius: 7px; font-size: 10.5px; font-weight: 800;
  text-overflow: ellipsis; white-space: nowrap;
}
.badge.hot { background: linear-gradient(140deg, var(--brand-2), var(--brand)); }
.dur {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 3px 8px; color: #fff;
  background: rgba(20, 22, 31, .72); backdrop-filter: blur(4px);
  border-radius: 7px; font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.title { margin-top: 10px; overflow: hidden; font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); transition: color .2s; }
.card:hover .title { color: var(--brand); }
.meta { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 胶囊导航 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip {
  padding: 8px 15px; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 99px; font-size: 13px;
  box-shadow: var(--shadow-sm); transition: .2s; cursor: pointer;
}
.chip:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.chip.active { color: #fff; background: linear-gradient(140deg, var(--brand-2), var(--brand)); border-color: transparent; font-weight: 750; box-shadow: 0 6px 16px rgba(79, 110, 242, .26); }

/* ---------- 列表页筛选行 ---------- */
.frow { display: flex; align-items: flex-start; gap: 16px; padding: 14px 18px; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.flabel { width: 58px; flex-shrink: 0; padding-top: 7px; color: var(--brand); 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: 14px; margin: 34px 0 56px; }
.pager button {
  padding: 10px 22px; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow-sm); transition: .2s;
}
.pager button:hover:not(:disabled) { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.pager button:disabled { opacity: .4; cursor: default; }
.pager span { color: var(--muted); font-size: 13px; }

/* ---------- 详情页 ---------- */
.detail-wrap { position: relative; }
.backdrop {
  position: absolute; top: -20px; left: 50%; width: 100vw; max-width: 1500px; height: 340px;
  transform: translateX(-50%); background-size: cover; background-position: center 18%;
  filter: blur(80px) saturate(1.1); opacity: .14; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
}
.detail {
  position: relative; display: flex; gap: 34px; margin: 26px 0 42px; padding: 38px 42px;
  overflow: hidden; border: 1px solid var(--line); border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow);
}
.poster { width: 220px; flex-shrink: 0; aspect-ratio: 2/3; overflow: hidden; border-radius: 14px; background: var(--bg-soft); box-shadow: var(--shadow); }
.poster img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.dinfo { min-width: 0; }
.dinfo h1 { margin: 4px 0 14px; font-size: 34px; line-height: 1.12; letter-spacing: -1.2px; font-weight: 900; color: var(--ink); }
.dinfo .sub { margin: 6px 0; color: var(--ink-2); font-size: 13px; }
.pills { margin: 12px 0 16px; }
.pill {
  display: inline-block; padding: 5px 12px; margin: 0 6px 6px 0;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid #dde3ff; border-radius: 99px; font-size: 11.5px; font-weight: 750;
}
.desc { max-width: 760px; margin-top: 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.play-btn {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 22px;
  padding: 13px 30px; color: #fff;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border-radius: 13px; font-size: 14px; font-weight: 850;
  box-shadow: 0 14px 30px rgba(79, 110, 242, .30); transition: .25s;
}
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(79, 110, 242, .40); }

/* ---------- 选集 ---------- */
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 14px 0 46px; }
.ep {
  padding: 11px 6px; overflow: hidden; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 11px; text-align: center;
  text-overflow: ellipsis; white-space: nowrap; box-shadow: var(--shadow-sm); transition: .2s;
}
.ep:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.ep.on { color: #fff; background: linear-gradient(140deg, var(--brand-2), var(--brand)); border-color: transparent; font-weight: 800; }

/* ---------- 播放器 ---------- */
.player-box { margin: 20px 0; overflow: hidden; aspect-ratio: 16/9; background: #0b0e18; border-radius: 18px; box-shadow: var(--shadow-lg); }
.player-box video, .player-box iframe { width: 100%; height: 100%; border: 0; background: #0b0e18; }
.ch-switch { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.ch-btn {
  padding: 10px 18px; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-size: 13px; box-shadow: var(--shadow-sm); transition: .2s;
}
.ch-btn:hover { color: var(--brand); border-color: var(--brand-2); background: var(--brand-soft); }
.ch-btn.active { color: #fff; background: linear-gradient(140deg, var(--brand-2), var(--brand)); border-color: transparent; font-weight: 800; }
.tip { margin: 12px 0 34px; color: var(--muted); font-size: 12px; }

/* ---------- 榜单 ---------- */
.rank-list { display: flex; flex-direction: column; padding: 10px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.rank-row { display: flex; align-items: center; gap: 18px; padding: 13px 6px; border-bottom: 1px solid var(--line-soft); transition: .2s; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: var(--brand-soft); border-radius: 10px; }
.rn { width: 34px; flex-shrink: 0; color: var(--muted); font-size: 17px; font-variant-numeric: tabular-nums; text-align: center; font-weight: 800; }
.rn.top1 { color: var(--brand); }.rn.top2 { color: var(--brand-2); }.rn.top3 { color: var(--accent); }
.rank-thumb { width: 54px; height: 76px; flex-shrink: 0; object-fit: cover; object-position: center top; border-radius: 9px; background: var(--bg-soft); }
.rank-info { min-width: 0; }
.rank-title { overflow: hidden; font-size: 14.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rank-row:hover .rank-title { color: var(--brand); }
.rank-sub { color: var(--muted); font-size: 12px; }

/* ---------- 状态 ---------- */
.loading, .empty { padding: 60px 0; color: var(--muted); text-align: center; font-size: 13.5px; }
.skeleton { background: linear-gradient(100deg, var(--bg-soft) 30%, #f7f8fc 50%, var(--bg-soft) 70%); background-size: 200% 100%; animation: sk 1.3s linear infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
#btt {
  position: fixed; right: 24px; bottom: 28px; z-index: 99;
  width: 44px; height: 44px; color: #fff;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  border: 0; border-radius: 50%; cursor: pointer; font-size: 18px;
  opacity: 0; pointer-events: none; transition: opacity .28s, transform .28s;
  box-shadow: 0 12px 28px rgba(79, 110, 242, .35);
}
#btt.show { opacity: 1; pointer-events: auto; }
#btt:hover { transform: translateY(-3px); }

footer { margin-top: 60px; padding: 26px 16px 46px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; font-size: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .hd { flex-wrap: wrap; gap: 8px 14px; padding: 10px 0; }
  nav.nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .detail { flex-direction: column; padding: 26px; gap: 24px; }
  .poster { width: 156px; }
  .dinfo h1 { font-size: 27px; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px 11px; }
  .row-scroll { grid-auto-columns: 124px; gap: 12px; }
  .frow { gap: 10px; padding: 11px 12px; }
  .flabel { width: 34px; }
  .chip { padding: 7px 11px; font-size: 12px; }
}
