:root {
  --bg: #0b0b14;
  --bg2: #141424;
  --card: #1b1b30;
  --line: #2a2a44;
  --text: #f1f1fa;
  --muted: #9a9ab8;
  --accent: #8b5cf6;
  --accent2: #3b82f6;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.container {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ===== 顶部导航 ===== */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(11, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .container { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; white-space: nowrap; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center;
}
.logo-mark svg { width: 16px; height: 16px; fill: #fff; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-size: 15px; padding: 18px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); border-color: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}
.search input { background: none; border: 0; outline: none; color: var(--text); width: 170px; font-size: 14px; }
.search svg { width: 15px; height: 15px; fill: var(--muted); flex-shrink: 0; }
.btn {
  border: 0; border-radius: 999px; padding: 8px 18px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--text); }

/* ===== 首页滚动动画海报 ===== */
html { scroll-behavior: smooth; }
.hero { position: relative; height: 230vh; }
.hero-sticky {
  position: sticky; top: var(--hh, 60px); height: calc(100vh - var(--hh, 60px));
  overflow: hidden; display: flex; flex-direction: column; align-items: center;
}
.hero-wall {
  position: absolute; inset: -60px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px;
  opacity: .32; filter: blur(2px) saturate(.9);
  transform: rotate(-4deg) scale(1.12);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 70%);
}
.hero-wall .w { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; }
.hero-glow {
  position: absolute; left: 50%; top: 0; width: min(1000px, 140vw); height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(139, 92, 246, .28), rgba(59, 130, 246, .08) 60%, transparent);
}
.hero-text { position: relative; z-index: 2; text-align: center; margin-top: 6vh; padding: 0 16px; }
.hero-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.hero-text h1 { font-size: clamp(32px, 5.6vw, 60px); font-weight: 800; letter-spacing: 3px; margin: 18px 0 30px; line-height: 1.2; }
.hl { position: relative; display: inline-block; }
.hl svg { position: absolute; left: -4%; width: 108%; bottom: -16px; height: 20px; fill: none; stroke: #a78bfa; stroke-width: 2.5; stroke-linecap: round; }
.hero-cta { padding: 13px 30px; font-size: 16px; border-radius: 12px; box-shadow: 0 8px 30px rgba(139, 92, 246, .45); }
.hero-hint { margin-top: 5vh; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-hint svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); opacity: .5; } }
.hero-stage { position: relative; flex: 1; width: 100%; z-index: 1; min-height: 260px; }
.hcard { position: absolute; left: 50%; top: 50%; width: var(--cw, 180px); will-change: transform; }
.hcard .poster { box-shadow: 0 18px 40px rgba(0, 0, 0, .6); animation: rise .9s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: var(--d); }
.hcard:hover .poster { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(139, 92, 246, .35); }
.hinfo { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(80px); } }
#sections { scroll-margin-top: calc(var(--hh, 60px) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-sticky { position: relative; height: 640px; }
  .hcard .poster, .hero-hint svg { animation: none; }
}

/* ===== 区块 ===== */
.section { margin: 32px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h3 { font-size: 21px; display: flex; align-items: center; gap: 8px; }
.section-head h3::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent), var(--accent2)); }
.more { color: var(--muted); font-size: 14px; }
.more:hover { color: var(--text); }

/* ===== 海报卡片 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
.card { display: block; min-width: 0; }
.poster {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover .poster { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.poster .art { position: absolute; inset: 0; }
.poster-title {
  position: absolute; left: 10px; right: 10px; bottom: 30px;
  font-size: 17px; font-weight: 800; line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ep-badge {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px;
  font-size: 12px; color: #eee; background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.card-title { margin-top: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tags span { font-size: 12px; color: var(--muted); background: var(--bg2); border-radius: 4px; padding: 2px 6px; }

/* 海报背景图案（没有真海报时自动生成） */
.art::before, .art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.art::before { width: 70%; aspect-ratio: 1; top: -15%; right: -20%; }
.art::after { width: 45%; aspect-ratio: 1; top: 30%; left: -15%; background: rgba(0,0,0,.15); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

/* ===== 分类页 ===== */
.page-title { font-size: 26px; margin: 28px 0 18px; }
.filters { background: var(--bg2); border-radius: 14px; padding: 16px; margin-bottom: 24px; }
.filter-row { display: flex; gap: 12px; align-items: flex-start; }
.filter-row + .filter-row { margin-top: 12px; }
.filter-row > b { color: var(--muted); font-size: 14px; font-weight: 400; padding: 6px 0; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: none; border: 0; color: var(--text); font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.chip:hover { background: var(--card); }
.chip.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.empty { color: var(--muted); text-align: center; padding: 60px 0; }

/* ===== 榜单页 ===== */
.rank-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.rank-item { display: flex; gap: 14px; align-items: center; background: var(--bg2); border-radius: 14px; padding: 12px; transition: background .2s; }
.rank-item:hover { background: var(--card); }
.rank-no { width: 34px; text-align: center; font-size: 24px; font-weight: 800; font-style: italic; color: var(--muted); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-no { color: #ffcf3c; }
.rank-item:nth-child(2) .rank-no { color: #d6dbe4; }
.rank-item:nth-child(3) .rank-no { color: #e39a5a; }
.rank-item .poster { width: 72px; flex-shrink: 0; border-radius: 8px; }
.rank-item .poster-title { font-size: 11px; bottom: 6px; left: 6px; right: 6px; }
.rank-info { min-width: 0; flex: 1; }
.rank-info h4 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot { color: var(--accent); font-size: 13px; margin-top: 8px; }

/* ===== 播放页 ===== */
.watch { display: grid; grid-template-columns: auto 1fr; gap: 32px; margin: 24px 0; align-items: start; }
.player {
  position: relative; height: min(78vh, 760px); aspect-ratio: 9 / 16;
  background: #000; border-radius: 14px; overflow: hidden;
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-msg {
  position: absolute; inset: 0; display: none; place-items: center; text-align: center;
  color: var(--muted); padding: 24px; line-height: 1.8; background: #000;
}
.player-msg.show { display: grid; }
.player-ep { position: absolute; top: 12px; left: 12px; font-size: 13px; background: rgba(0,0,0,.5); padding: 4px 10px; border-radius: 99px; pointer-events: none; }
.watch-info h1 { font-size: 28px; margin-bottom: 10px; }
.meta { color: var(--muted); font-size: 14px; margin-top: 10px; }
.desc { color: #cfcfd8; line-height: 1.7; margin: 16px 0 24px; font-size: 15px; }
.ep-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ep-head h3 { font-size: 17px; }
.ep-ranges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ep-grid button {
  background: var(--card); border: 1px solid transparent; color: var(--text);
  border-radius: 8px; padding: 10px 0; font-size: 14px;
}
.ep-grid button:hover { border-color: var(--line); }
.ep-grid button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.watch-nav { display: flex; gap: 10px; margin-top: 18px; }

/* ===== 底部 ===== */
.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.9; }

/* ===== 手机版 ===== */
@media (max-width: 860px) {
  .watch { grid-template-columns: 1fr; gap: 20px; }
  .player { height: auto; width: 100%; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .top .container { gap: 14px; height: auto; flex-wrap: wrap; padding-top: 10px; }
  .nav { order: 3; width: 100%; gap: 22px; }
  .nav a { padding: 10px 0; }
  .search input { width: 90px; }
  .top-right .btn { display: none; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .poster-title { font-size: 13px; bottom: 24px; left: 7px; right: 7px; }
  .card-title { font-size: 13px; }
  .tags span { font-size: 11px; padding: 1px 5px; }
  .card .tags span:nth-child(n+3) { display: none; }
  .rank-list { grid-template-columns: 1fr; }
  .filter-row { flex-direction: column; gap: 6px; }
  .watch-info h1 { font-size: 22px; }
}

/* ===== 会员 ===== */
.tier-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px;
  color: #1b1030; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.t1 { background: linear-gradient(135deg, #c4b5fd, #93c5fd); color: #1b1030; }
.t2 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #2a1a00; }
.t0 { background: var(--card); color: var(--muted); }
.tier-pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.tier-tag { background: linear-gradient(135deg, #fde68a, #f59e0b) !important; color: #2a1a00 !important; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.user-chip:hover { border-color: var(--accent); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); font-weight: 700; font-size: 13px;
}
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.user-name { font-size: 14px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 8px; font-size: 13px; background: rgba(245, 158, 11, .12); color: #fcd34d; }
.ep-grid button.locked { color: var(--muted); position: relative; }
.ep-grid button.locked::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }
.lock-box { display: grid; justify-items: center; gap: 10px; color: var(--text); max-width: 280px; }
.lock-box h3 { font-size: 18px; }
.lock-box p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.lock-box .contact { color: #fcd34d; }
.lock-icon { color: #f59e0b; }

/* ===== 登录 / 账号 ===== */
.auth { max-width: 420px; margin: 48px auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { border: 0; background: none; color: var(--muted); padding: 10px; border-radius: 9px; font-size: 15px; }
.auth-tabs button.on { background: var(--card); color: var(--text); font-weight: 700; }
.auth-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-foot a { color: #c4b5fd; }
.form { display: grid; gap: 14px; }
.form h3 { font-size: 17px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form small { font-size: 12px; }
.form input, .form select, .form textarea {
  background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: 11px 12px; font: inherit; font-size: 15px; outline: none; width: 100%;
}
.form textarea { resize: vertical; min-height: 80px; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.btn-block { justify-content: center; padding: 12px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: default; }
.form-error { color: #fca5a5; font-size: 14px; min-height: 1em; }
.form-ok { color: #86efac; font-size: 14px; min-height: 1em; }
.account-card { display: flex; align-items: center; gap: 18px; margin: 32px 0 18px; padding: 24px; background: var(--bg2); border-radius: 18px; border: 1px solid var(--line); flex-wrap: wrap; }
.account-card > div { flex: 1; min-width: 0; display: grid; gap: 6px; }
.account-card h1 { font-size: 24px; }
.upgrade { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 16px 20px; border-radius: 14px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(139,92,246,.16)); border: 1px solid rgba(245,158,11,.3); }
.upgrade span { color: #fcd34d; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }

/* ===== 广告 ===== */
.ad { position: relative; margin: 24px 0; border-radius: 12px; overflow: hidden; background: var(--bg2); }
.ad img { display: block; width: 100%; height: auto; }
.ad-label { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(0,0,0,.55); color: #ddd; }
.ad-home_top, .ad-category_top, .ad-rank_top { margin-top: 20px; }
.ad-drama_side { margin: 20px 0 0; }
.float-ad {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 70;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(728px, calc(100% - 24px));
}
.float-ad .ad { margin: 0; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.float-close {
  position: absolute; top: -10px; left: -10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; line-height: 1;
}
.preroll { position: absolute; inset: 0; z-index: 5; background: #000; display: grid; place-items: center; }
.preroll img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preroll a { display: contents; }
.preroll .skip {
  position: absolute; right: 12px; bottom: 60px; border: 1px solid rgba(255,255,255,.4); border-radius: 99px;
  background: rgba(0,0,0,.6); color: #fff; padding: 8px 14px; font-size: 13px;
}
.preroll .skip:disabled { opacity: .75; cursor: default; }
.foot { padding-bottom: 120px; }

@media (max-width: 640px) {
  .user-name { display: none; }
  .user-chip { padding-right: 8px; }
  .top-right .btn-ghost { display: none; }
  .top-right a.btn { display: inline-flex; padding: 7px 12px; font-size: 13px; }
  .auth { margin: 24px auto; padding: 20px; }
  .ad { margin: 16px 0; border-radius: 10px; }
}

/* ===== 右侧浮动红包 ===== */
.rp-float {
  position: fixed; z-index: 75; right: calc(14px + env(safe-area-inset-right, 0px)); top: 52%;
  width: 84px;
}
.rp-btn { position: relative; display: block; width: 84px; height: 104px; border: 0; background: none; padding: 0; cursor: pointer; animation: rp-bob 2.4s ease-in-out infinite; }
.rp-body {
  position: absolute; left: 12px; top: 6px; width: 60px; height: 88px; z-index: 2; display: block;
  filter: drop-shadow(0 6px 14px rgba(225, 29, 46, .7)) drop-shadow(0 0 10px rgba(251, 191, 36, .5));
  animation: rp-wobble 1.8s ease-in-out infinite; transform-origin: 50% 90%;
}
.rp-body svg, .rp-body img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 10px; }
.rp-ring {
  position: absolute; left: 50%; top: 46%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
  border: 3px solid rgba(251, 191, 36, .85); z-index: 1; animation: rp-ring 1.8s ease-out infinite;
}
.rp-ring.r2 { animation-delay: .9s; border-color: rgba(255, 90, 95, .85); }
.rp-spark { position: absolute; z-index: 3; color: #fde68a; font-size: 14px; text-shadow: 0 0 8px #fbbf24; animation: rp-twinkle 1.4s ease-in-out infinite; pointer-events: none; }
.rp-spark.s1 { top: 0; right: 4px; }
.rp-spark.s2 { top: 40px; left: 0; font-size: 11px; animation-delay: .5s; }
.rp-spark.s3 { bottom: 14px; right: 0; font-size: 12px; animation-delay: .9s; }
.rp-tag {
  position: absolute; z-index: 4; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #7a1010; padding: 3px 10px; border-radius: 99px;
  background: linear-gradient(135deg, #fff1a8, #fbbf24); box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
  animation: rp-pulse 1.2s ease-in-out infinite;
}
.rp-btn:hover .rp-body { animation-duration: .5s; }
.rp-close {
  position: absolute; top: -8px; right: -4px; z-index: 5; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
@keyframes rp-bob { 50% { transform: translateY(-10px); } }
@keyframes rp-wobble { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg) scale(1.05); } }
@keyframes rp-ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
@keyframes rp-twinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.3) rotate(90deg); } }
@keyframes rp-pulse { 50% { transform: translateX(-50%) scale(1.1); } }

/* 红包雨 */
.rp-rain { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.rp-drop {
  position: absolute; top: -140px; aspect-ratio: 84 / 124; display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
  animation: rp-fall var(--dur) linear var(--delay) forwards;
}
.rp-drop svg { width: 100%; height: 100%; display: block; }
@keyframes rp-fall {
  from { transform: translate(0, 0) rotate(var(--spin)); }
  to { transform: translate(var(--drift), calc(100vh + 200px)) rotate(calc(var(--spin) * -2)); }
}

/* 领取窗口 */
.rp-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 10, .7); animation: rp-fade .25s ease-out; }
.rp-card {
  position: relative; width: min(320px, 100%); text-align: center; padding: 30px 24px 26px; border-radius: 22px;
  background: radial-gradient(circle at 50% 0%, #ff6b6b, #c8102e 55%, #8a0a1c); color: #fff;
  box-shadow: 0 20px 60px rgba(200, 16, 46, .55), inset 0 0 0 2px rgba(253, 230, 138, .5);
  animation: rp-pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.rp-card-icon { width: 70px; height: 103px; margin: 0 auto 12px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .4)); }
.rp-card-icon svg { width: 100%; height: 100%; }
.rp-card h3 { font-size: 26px; color: #fde68a; letter-spacing: 2px; }
.rp-card p { margin: 8px 0 20px; color: #ffe4e6; font-size: 15px; }
.rp-go { background: linear-gradient(135deg, #fff1a8, #f59e0b); color: #7a1010; padding: 12px 34px; font-size: 16px; font-weight: 800; border: 0; }
.rp-x { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .25); color: #fff; font-size: 18px; cursor: pointer; }
@keyframes rp-fade { from { opacity: 0; } }
@keyframes rp-pop { from { transform: scale(.6); opacity: 0; } }

@media (max-width: 640px) {
  .rp-float { top: auto; bottom: calc(120px + env(safe-area-inset-bottom, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); transform: scale(.85); transform-origin: right bottom; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-btn, .rp-body, .rp-ring, .rp-spark, .rp-tag, .rp-card, .rp-modal { animation: none; }
}

/* ===== 进站弹窗（PROMO）===== */
.promo-modal {
  position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; background: rgba(4, 3, 12, .78);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: rp-fade .25s ease-out;
}
.promo-card {
  position: relative; width: fit-content; min-width: min(260px, 100%); max-width: 100%; max-height: 100%; display: grid; gap: 14px; justify-items: center;
  animation: rp-pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
/* 框跟着图片的比例走，直的、横的图都不会有黑边 */
.promo-img { width: fit-content; max-width: 100%; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(139, 92, 246, .45), 0 0 0 2px rgba(253, 230, 138, .55); }
.promo-img img { display: block; width: auto; height: auto; max-width: min(440px, calc(100vw - 32px)); max-height: 62vh; }
.promo-img a { display: block; }
.promo-badge {
  position: absolute; z-index: 2; top: -12px; left: -8px; padding: 6px 14px; border-radius: 8px;
  font: 900 15px/1 "Arial Black", Arial, sans-serif; letter-spacing: 3px; color: #2a1a00;
  background: linear-gradient(135deg, #fff1a8, #f59e0b); box-shadow: 0 6px 18px rgba(245, 158, 11, .55);
  transform: rotate(-6deg); animation: promo-badge 1.6s ease-in-out infinite;
}
.promo-x {
  position: absolute; z-index: 2; top: -12px; right: -10px; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .6); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.promo-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 15px 20px; border: 0; border-radius: 14px;
  font-size: 19px; font-weight: 900; letter-spacing: 2px; color: #4a0e0e; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, #fff3b0, #fbbf24 45%, #f59e0b);
  box-shadow: 0 10px 30px rgba(245, 158, 11, .5), inset 0 -3px 0 rgba(0, 0, 0, .15);
  position: relative; overflow: hidden; animation: promo-btn 1.4s ease-in-out infinite;
}
.promo-btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-20deg);
  animation: promo-shine 2.2s ease-in-out infinite;
}
.promo-hide { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #d4d4e0; cursor: pointer; user-select: none; }
.promo-hide input { width: 17px; height: 17px; accent-color: #fbbf24; }
@keyframes promo-btn { 50% { transform: scale(1.04); box-shadow: 0 14px 40px rgba(245, 158, 11, .75), inset 0 -3px 0 rgba(0, 0, 0, .15); } }
@keyframes promo-shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes promo-badge { 50% { transform: rotate(-6deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .promo-card, .promo-modal, .promo-btn, .promo-btn::after, .promo-badge { animation: none; }
}

/* ===== 语言切换 中 | BM | EN ===== */
.lang-switch { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-switch button {
  border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; cursor: pointer; min-width: 30px;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
@media (max-width: 640px) {
  .lang-switch button { padding: 4px 7px; font-size: 11px; min-width: 26px; }
  .search input { width: 70px; }
}

/* ===== 密码栏的眼睛按钮 ===== */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 46px; }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.pw-eye:hover { color: var(--text); background: var(--card); }
.pw-eye[aria-pressed="true"] { color: var(--accent); }
.pw-eye svg { width: 20px; height: 20px; }

/* ===== DurianDrama logo ===== */
.logo-img { display: block; height: 36px; width: auto; }
.hero-logo { display: block; height: 88px; width: auto; margin: 0 auto; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .45)); }
.logo-icon { width: 32px; height: 32px; border-radius: 8px; display: block; }
@media (max-width: 640px) {
  .logo-img { height: 30px; }
  .hero-logo { height: 60px; }
}

/* ===== 首页：选择剧集语言（大按钮）===== */
.cl-pick { margin-top: 4vh; display: grid; justify-items: center; gap: 12px; }
.cl-label { font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.cl-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cl-btn {
  display: grid; gap: 2px; justify-items: center; min-width: 150px; padding: 14px 22px; border-radius: 16px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 2px solid var(--line); color: var(--text);
  backdrop-filter: blur(6px); transition: transform .15s, border-color .15s, background .15s;
}
.cl-btn b { font-size: 20px; font-weight: 800; }
.cl-btn small { font-size: 12px; color: var(--muted); }
.cl-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.cl-btn.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; box-shadow: 0 8px 26px rgba(0, 0, 0, .35); }
.cl-btn.on small { color: rgba(255, 255, 255, .85); }
.cl-pick + .hero-hint { margin-top: 3vh; }
.cl-chip { display: inline-flex; gap: 6px; align-items: baseline; }
.cl-chip small { font-size: 11px; opacity: .75; }
.cl-empty { padding: 80px 16px; font-size: 16px; }
@media (max-width: 640px) {
  .cl-btns { gap: 8px; }
  .cl-btn { min-width: 0; flex: 1 1 0; padding: 10px 8px; border-radius: 12px; }
  .cl-btn b { font-size: 15px; }
  .cl-btn small { font-size: 10px; }
}

/* ===== 真海报：完整显示，空位用模糊海报填满 ===== */
.art.has-poster::before, .art.has-poster::after { display: none; }
.art .art-bg { object-fit: cover; filter: blur(16px) brightness(.55) saturate(1.2); transform: scale(1.2); z-index: 0; }
.art .art-img { object-fit: contain; z-index: 1; }

/* ===== 海报改成正方形（配合 1:1 的海报，减少高度）===== */
.poster, .hero-wall .w { aspect-ratio: 1 / 1; }
.ep-badge {
  left: 8px; right: auto; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px);
}
.poster-title { bottom: 36px; }
@media (max-width: 640px) {
  .ep-badge { left: 5px; bottom: 5px; padding: 2px 6px; font-size: 10px; }
  .poster-title { bottom: 28px; }
}

/* ===== 选择剧集语言：夸张效果 ===== */
.cl-btns { gap: 16px; padding: 10px 6px; }
.cl-btn { position: relative; isolation: isolate; overflow: visible; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1), box-shadow .25s, border-color .25s; }
/* 没选中：淡淡流动的光边 */
.cl-btn:not(.on)::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; padding: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 200% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55; animation: cl-flow 3s linear infinite;
}
.cl-btn:not(.on):hover { transform: translateY(-5px) scale(1.06) rotate(-1.5deg); border-color: var(--accent); box-shadow: 0 12px 30px rgba(0, 0, 0, .4), 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent); }

/* 选中：放大 + 发光呼吸 + 旋转彩边 + 流光 + ✓ */
.cl-btn.on {
  transform: scale(1.12); z-index: 2;
  animation: cl-glow 1.8s ease-in-out infinite;
}
.cl-btn.on::before {
  content: ""; position: absolute; inset: -4px; border-radius: 20px; z-index: -2;
  background: conic-gradient(from var(--cl-angle, 0deg), var(--accent), var(--accent2), #ffffff, var(--accent2), var(--accent));
  animation: cl-spin 2.4s linear infinite; filter: blur(1px);
}
.cl-btn.on::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 48%, transparent 66%) -150% 0 / 250% 100% no-repeat;
  animation: cl-shine 2.6s ease-in-out infinite;
}
.cl-btn.on b, .cl-btn.on small { position: relative; z-index: 2; }
.cl-btn.on b { font-size: 23px; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.cl-btn.on > b::before {
  content: "✓"; position: absolute; left: -38px; top: -22px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 900;
  background: #fff; color: var(--accent); box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  animation: cl-pop 1.2s ease-in-out infinite;
}
@property --cl-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes cl-spin { to { --cl-angle: 360deg; } }
@keyframes cl-flow { to { background-position: -200% 0; } }
@keyframes cl-shine { 0%, 35% { background-position: -150% 0; } 75%, 100% { background-position: 150% 0; } }
@keyframes cl-glow {
  0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent); }
  50% { box-shadow: 0 14px 40px rgba(0, 0, 0, .4), 0 0 46px color-mix(in srgb, var(--accent2) 85%, transparent), 0 0 90px color-mix(in srgb, var(--accent) 40%, transparent); }
}
@keyframes cl-pop { 50% { transform: scale(1.18) rotate(-8deg); } }
@media (max-width: 640px) {
  .cl-btns { gap: 10px; }
  .cl-btn.on { transform: scale(1.06); }
  .cl-btn.on b { font-size: 17px; }
  .cl-btn.on > b::before { left: -18px; top: -16px; width: 20px; height: 20px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-btn, .cl-btn::before, .cl-btn::after, .cl-btn > b::before { animation: none !important; }
}

/* 选中的语言按钮：拿掉一直旋转的彩色光边 */
.cl-btn.on::before { content: none; animation: none; }

/* ===== 播放器中间的大播放按钮（暂停时出现）===== */
.big-play {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 6px rgba(255, 255, 255, .12);
  transition: transform .2s cubic-bezier(.2, 1.6, .4, 1), opacity .2s;
}
.big-play svg { width: 40px; height: 40px; fill: #fff; margin-left: 5px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.big-play::before, .big-play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent2);
  animation: big-play-ring 1.8s ease-out infinite; pointer-events: none;
}
.big-play::after { animation-delay: .9s; border-color: var(--accent); }
.big-play:hover { transform: scale(1.1); }
.big-play:active { transform: scale(.95); }
.big-play[hidden] { display: none; }
@keyframes big-play-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
/* 把浏览器自带的中间播放按钮藏起来，用上面这个 */
.player video::-webkit-media-controls-overlay-play-button { display: none; }
.player video::-webkit-media-controls-start-playback-button { display: none; }
@media (max-width: 640px) {
  .big-play { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
  .big-play svg { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .big-play::before, .big-play::after { animation: none; display: none; } }

/* ===== 广告轮播（同一个位置 2 张以上）===== */
.ad-carousel { overflow: hidden; }
.ad-track { display: flex; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.ad-slide { flex: 0 0 100%; min-width: 0; }
.ad-slide img { display: block; width: 100%; height: auto; }
.ad-dots { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; }
.ad-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .3s, background .3s; }
.ad-dots button.on { width: 18px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .ad-track { transition: none; } }

/* 播放页：连载中 / 已完结 */
.air-pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(34, 197, 94, .15); color: #86efac; }
.air-pill.done { background: rgba(148, 163, 184, .18); color: #cbd5e1; }

/* ===== 首页动画：交给显卡处理，比较顺 ===== */
.hcard { will-change: transform, opacity; backface-visibility: hidden; }
.hero-wall { will-change: transform; }
.hero-text { will-change: transform; }
.art .art-cover { object-fit: cover; z-index: 1; }

/* 首页「已完结」区块：还没有剧时的提示 */
.done-empty { color: var(--muted); font-size: 14px; padding: 18px 16px; border: 1px dashed rgba(255,255,255,.12); border-radius: 12px; text-align: center; }

/* 手机：首页大图区块不再「卡住」滚动。海报一样会自动移动，只是不跟着滚动变形 */
@media (max-width: 640px) {
  .hero { height: auto; }
  .hero-sticky { position: relative; top: 0; height: auto; padding-bottom: 8px; }
  .hero-stage { flex: none; height: 270px; min-height: 0; }
  .hero-hint { display: none; }
}

/* 弹窗广告 2 张以上：自动轮播。框的比例跟第一张图一样（--r = 宽/高） */
.promo-img { position: relative; }
.promo-multi { width: min(440px, calc(100vw - 32px), calc(62vh * var(--r, .8))); }
.promo-multi .ad-slide img { width: 100%; max-width: none; max-height: none; aspect-ratio: var(--r, .8); object-fit: cover; }
.promo-multi .ad-dots { bottom: 10px; }

/* 广告轮播可以用手指 / 鼠标左右拉 */
.ad-carousel { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.ad-carousel img { -webkit-user-drag: none; user-select: none; }
.ad-carousel.dragging { cursor: grabbing; }
.ad-carousel.dragging .ad-track { transition: none; }
