:root {
  --bg: #0e0e12; --panel: #16161c; --card: #1c1c24; --line: #282832;
  --text: #f2f2f6; --muted: #9a9aa8; --brand: #e8392a; --brand2: #ff7a3d; --gold: #ffd23f;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: radial-gradient(1200px 500px at 50% -10%, rgba(232,57,42,.08), transparent 60%), var(--bg); color: var(--text); font: 14px/1.6 "Noto Sans SC", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(232,57,42,.45); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header */
header { position: sticky; top: 0; z-index: 50; background: rgba(14,14,18,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(232,57,42,.25), 0 8px 30px rgba(0,0,0,.35); }
.hd { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-size: 21px; font-weight: 900; letter-spacing: 1px; color: #fff; white-space: nowrap; }
.logo b { background: linear-gradient(135deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
nav.nav::-webkit-scrollbar { display: none; }
.nav-link { padding: 6px 13px; border-radius: 8px; color: var(--muted); white-space: nowrap; transition: all .2s; }
.nav-link:hover { color: #fff; background: var(--card); }
.nav-link.active { color: #fff; background: linear-gradient(135deg, var(--brand), #c9261b); box-shadow: 0 2px 12px rgba(232,57,42,.45); }
.search { display: flex; gap: 0; margin-left: auto; }
.search input { width: 300px; max-width: 44vw; background: var(--card); border: 1px solid var(--line); border-right: 0; color: #fff; border-radius: 10px 0 0 10px; padding: 9px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,57,42,.18); }
.search button { background: linear-gradient(135deg, var(--brand), var(--brand2)); border: 0; color: #fff; border-radius: 0 10px 10px 0; padding: 0 16px; cursor: pointer; font-weight: 700; transition: filter .2s; }
.search button:hover { filter: brightness(1.12); }

/* hero（首页） */
.hero { position: relative; overflow: hidden; border-radius: 18px; margin: 20px 0 6px; padding: 44px 28px; background: radial-gradient(600px 260px at 15% 0%, rgba(232,57,42,.28), transparent 60%), radial-gradient(500px 240px at 90% 100%, rgba(255,122,61,.16), transparent 60%), linear-gradient(160deg, #1d1214, #141419 70%); border: 1px solid rgba(232,57,42,.22); text-align: center; }
.hero h1 { margin: 0 0 6px; font-size: 30px; font-weight: 900; letter-spacing: 2px; }
.hero h1 span { background: linear-gradient(135deg, var(--brand), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 0 18px; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.hero .search { justify-content: center; margin: 0 auto; max-width: 560px; }
.hero .search input { width: 100%; max-width: none; padding: 12px 16px; font-size: 15px; }
.hero .search button { padding: 0 26px; font-size: 15px; }
.hero-stats { display: flex; gap: 26px; justify-content: center; margin-top: 18px; color: var(--muted); font-size: 12px; }
.hero-stats b { color: var(--gold); font-size: 16px; margin-right: 4px; }
@media (max-width: 640px) { .hero { padding: 30px 16px; } .hero h1 { font-size: 22px; } }

/* sections & grids */
.sec { margin: 26px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.sec h2 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; }
.sec h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), var(--brand2)); box-shadow: 0 0 10px rgba(232,57,42,.6); }
.sec a.more { color: var(--muted); font-size: 13px; transition: color .2s; }
.sec a.more:hover { color: var(--brand2); }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } .search input { width: 170px; } }
.card { display: block; min-width: 0; transition: transform .25s ease; }
.card:hover { transform: translateY(-4px); }
/* 统一封面框：固定 3:4，图片绝对定位盖满裁切，自身尺寸永不影响布局 */
.thumb { position: relative; width: 100%; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid rgba(255,255,255,.06); transition: border-color .25s, box-shadow .25s; }
.card:hover .thumb { border-color: rgba(232,57,42,.55); box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 0 1px rgba(232,57,42,.35); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.06); }
@supports not (aspect-ratio: 3/4) {
  .thumb { height: 0; padding-top: 133.33%; }
}
.badge { position: absolute; left: 6px; bottom: 6px; background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.55)); border: 1px solid rgba(255,255,255,.12); font-size: 11px; padding: 2px 8px; border-radius: 6px; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title { margin-top: 7px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.card:hover .title { color: var(--brand2); }
.meta { color: var(--muted); font-size: 12px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
@media (max-width: 640px) { .row-scroll { grid-auto-columns: 122px; } }

/* sub filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 13px; transition: all .2s; }
.chip:hover { color: #fff; border-color: var(--brand); transform: translateY(-1px); }
.chip.active { color: #fff; background: linear-gradient(135deg, var(--brand), #c9261b); border-color: transparent; box-shadow: 0 2px 10px rgba(232,57,42,.4); }

/* pager */
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 24px 0 40px; }
.pager button { background: var(--card); color: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 20px; cursor: pointer; transition: all .2s; }
.pager button:hover:not(:disabled) { border-color: var(--brand); box-shadow: 0 2px 12px rgba(232,57,42,.3); }
.pager button:disabled { opacity: .35; cursor: default; }

/* detail */
.detail-wrap { position: relative; }
.backdrop { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: 100vw; max-width: 1400px; height: 300px; background-size: cover; background-position: center 20%; filter: blur(40px) brightness(.5) saturate(1.2); opacity: .5; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.detail { position: relative; display: flex; gap: 22px; margin: 20px 0; padding: 18px; background: rgba(22,22,28,.72); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; backdrop-filter: blur(6px); }
.poster { width: 200px; flex-shrink: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: var(--card); box-shadow: 0 12px 34px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.08); }
.poster img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.dinfo h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: 1px; }
.dinfo .sub { color: var(--muted); font-size: 13px; margin: 3px 0; }
.desc { color: #cfcfd8; font-size: 13px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.play-btn { display: inline-block; margin-top: 16px; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; padding: 11px 40px; border-radius: 12px; font-size: 16px; font-weight: 800; letter-spacing: 2px; box-shadow: 0 6px 24px rgba(232,57,42,.45); transition: transform .2s, box-shadow .2s; }
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,57,42,.6); }
@media (max-width: 640px) { .detail { flex-direction: column; } .poster { width: 140px; } }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: 12px 0 40px; }
.ep { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: all .2s; }
.ep:hover { border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.ep.on { border-color: var(--brand); background: linear-gradient(135deg, rgba(232,57,42,.25), rgba(255,122,61,.15)); color: #fff; box-shadow: 0 0 0 1px var(--brand); }

/* player */
.player-box { margin: 16px 0; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 50px rgba(0,0,0,.55); }
.player-box video, .player-box iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.ch-switch { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.ch-btn { background: var(--card); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px 20px; cursor: pointer; display: inline-block; transition: all .2s; font-weight: 700; }
.ch-btn:hover { color: #fff; border-color: var(--brand); }
.ch-btn.active { background: linear-gradient(135deg, var(--brand), #c9261b); border-color: transparent; color: #fff; box-shadow: 0 2px 14px rgba(232,57,42,.45); }
a.ch-btn:hover { border-color: var(--brand); color: #fff; }
.tip { color: var(--muted); font-size: 12px; margin: 8px 0 30px; }

.loading { text-align: center; color: var(--muted); padding: 44px 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* filter rows 带标签 */
.frow { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; }
.flabel { flex-shrink: 0; width: 38px; color: var(--muted); font-size: 13px; padding-top: 7px; }
.chips.grow { flex: 1; min-width: 0; margin: 0; }

/* rank榜单 */
.rank-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 8px; }
.rank-row { display: flex; align-items: center; gap: 14px; background: linear-gradient(180deg, var(--panel), #131318); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 10px 8px; transition: all .2s; }
.rank-row:hover { border-color: rgba(232,57,42,.5); transform: translateX(4px); }
.rn { width: 44px; flex-shrink: 0; text-align: center; font-size: 22px; font-weight: 900; color: var(--muted); font-style: italic; }
.rn.top1 { color: var(--gold); text-shadow: 0 0 14px rgba(255,210,63,.5); }
.rn.top2 { color: #c9d1d9; }
.rn.top3 { color: #e89b5a; }
.rank-thumb { width: 56px; height: 74px; object-fit: cover; object-position: center top; border-radius: 8px; flex-shrink: 0; background: var(--card); }
.rank-info { min-width: 0; }
.rank-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { border-top: 1px solid var(--line); margin-top: 34px; padding: 20px 0 38px; color: var(--muted); font-size: 12px; text-align: center; }
footer::before { content: "懒人影视"; display: block; font-size: 15px; font-weight: 800; letter-spacing: 4px; color: #fff; margin-bottom: 6px; opacity: .85; }

/* ===== 第二轮美化 ===== */
/* 全局滚动条 */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e2e3a; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* hero 光球 + 热搜 */
.hero-orb { position: absolute; border-radius: 50%; filter: blur(55px); opacity: .5; pointer-events: none; animation: drift 9s ease-in-out infinite alternate; }
.hero-orb.o1 { width: 230px; height: 230px; left: -60px; top: -70px; background: rgba(232,57,42,.55); }
.hero-orb.o2 { width: 190px; height: 190px; right: -50px; bottom: -70px; background: rgba(255,122,61,.5); animation-delay: -4s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(34px,22px) scale(1.15); } }
.hero > * { position: relative; z-index: 1; }
.hotkeys { margin-top: 16px; font-size: 12px; color: var(--muted); }
.hotkeys a { display: inline-block; color: #ffd9d2; border: 1px solid rgba(255,255,255,.16); padding: 3px 13px; border-radius: 999px; margin: 3px 4px; font-size: 12px; transition: all .2s; }
.hotkeys a:hover { border-color: var(--brand2); color: #fff; background: rgba(232,57,42,.28); transform: translateY(-1px); }

/* 卡片：播放浮层 + 评分角标 + 入场动画 */
.play-ol { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.6)); transition: opacity .25s; }
.card:hover .play-ol { opacity: 1; }
.play-ol i { width: 48px; height: 48px; border-radius: 50%; background: rgba(232,57,42,.94); color: #fff; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; box-shadow: 0 4px 20px rgba(232,57,42,.65); transform: scale(.65); transition: transform .25s; }
.card:hover .play-ol i { transform: scale(1); }
.score { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.72); color: var(--gold); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 7px; border: 1px solid rgba(255,210,63,.45); }
.anim { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.grid > .anim:nth-child(2) { animation-delay: .04s; }
.grid > .anim:nth-child(3) { animation-delay: .08s; }
.grid > .anim:nth-child(4) { animation-delay: .12s; }
.grid > .anim:nth-child(5) { animation-delay: .16s; }
.grid > .anim:nth-child(6) { animation-delay: .2s; }
.grid > .anim:nth-child(7) { animation-delay: .24s; }
.grid > .anim:nth-child(8) { animation-delay: .28s; }
.grid > .anim:nth-child(9) { animation-delay: .32s; }
.grid > .anim:nth-child(10) { animation-delay: .36s; }
.grid > .anim:nth-child(11) { animation-delay: .4s; }
.grid > .anim:nth-child(n+12) { animation-delay: .44s; }

/* 横滑行右侧渐隐 */
.row-scroll { -webkit-mask-image: linear-gradient(90deg, #000 96%, transparent); mask-image: linear-gradient(90deg, #000 96%, transparent); }

/* 详情标签丸 */
.pills { margin: 8px 0 2px; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 12px; margin: 0 6px 6px 0; color: #dcdce4; }
.pill.gold { color: var(--gold); border-color: rgba(255,210,63,.45); font-weight: 800; }

/* 回顶部 */
#btt { position: fixed; right: 18px; bottom: 26px; z-index: 99; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(135deg, var(--brand), #c9261b); color: #fff; font-size: 16px; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: all .3s; box-shadow: 0 6px 20px rgba(232,57,42,.5); }
#btt.show { opacity: 1; pointer-events: auto; transform: none; }
#btt:hover { filter: brightness(1.15); }
