:root {
  --bg: #11140F;
  --bg2: #0D100C;
  --panel: #191D17;
  --panel2: #151A14;
  --panel3: #20261E;
  --ink: #F4F1E7;
  --sub: #C9CDC1;
  --dim: #9DA395;
  --faint: #6F766A;
  --lime: #E9FF48;
  --limeDim: rgba(233, 255, 72, 0.08);
  --green: #91EF93;
  --amber: #FFB84D;
  --red: #FF715F;
  --line: #485044;
  --line2: #353A31;
  --line3: #2C3129;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}
body.no-scroll { overflow: hidden; }

/* 背景光晕 */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.16; }
.glow--a { width: 460px; height: 460px; left: -140px; top: -160px; background: #7a8f2a; }
.glow--b { width: 420px; height: 420px; right: -160px; top: 30%; background: #2a3a1a; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(17, 20, 15, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line3);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--lime);
  color: var(--bg);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.brand-text p { margin: 2px 0 0; font-size: 12px; color: var(--sub); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 22px;
  border-radius: 100px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--lime); color: var(--bg); }
.btn-primary:hover { background: #f0ff70; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 400; }
.btn-outline:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* 主体 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; }
.hero-count { margin: 2px 2px 20px; font-size: 12px; color: var(--dim); font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* 列表 */
.list { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 620px) { .list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .list { grid-template-columns: repeat(3, 1fr); } }

/* 卡片 */
.card {
  background: var(--panel);
  border: 1px solid var(--line3);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }

.card-poster {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: var(--bg2); aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer;
}
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card-poster:hover .card-img { transform: scale(1.04); }

.play-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.5));
  color: var(--lime);
}
.play-badge svg {
  width: 52px; height: 52px; padding: 16px; border-radius: 50%;
  background: rgba(17, 20, 15, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dur-badge {
  position: absolute; right: 12px; bottom: 12px;
  padding: 4px 9px; border-radius: 8px;
  background: rgba(13, 16, 12, 0.85); border: 1px solid var(--line3);
  color: var(--sub); font-size: 11px; font-family: var(--mono);
  letter-spacing: 0.06em;
}

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.card-desc { margin: 0; font-size: 13px; color: var(--sub); line-height: 1.6; }
.card-meta { margin: 4px 0 10px; font-size: 11.5px; color: var(--dim); display: flex; gap: 8px; font-family: var(--mono); letter-spacing: 0.04em; }
.card-meta .dot { opacity: 0.6; }

.card-actions { display: flex; gap: 10px; margin-top: auto; }
.card-actions .btn { flex: 1; min-height: 40px; font-size: 13.5px; }

/* 播放器弹层 */
.player {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.player-backdrop { position: absolute; inset: 0; background: rgba(6, 8, 5, 0.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.player-panel { position: relative; width: 100%; max-width: 880px; max-height: 100%; display: flex; flex-direction: column; gap: 12px; animation: pop 0.2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }

.player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.player-head h2 { margin: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.04);
  color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }

.player-stage { position: relative; background: var(--bg2); border: 1px solid var(--line3); border-radius: 16px; overflow: hidden; }
.player-stage video { display: block; width: 100%; max-height: 66vh; background: #000; }

/* 居中的播放键 */
.video-playbtn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; border: 0;
  background: rgba(17, 20, 15, 0.66); color: var(--lime);
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.16s ease; z-index: 2;
}
.video-playbtn svg { width: 30px; height: 30px; }
.video-playbtn:hover { background: rgba(17, 20, 15, 0.86); transform: translate(-50%, -50%) scale(1.06); }
.video-playbtn[hidden] { display: none; }

.player-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.player-actions .btn { min-width: 160px; }
.player-hint { margin: 2px 0 0; font-size: 12px; color: var(--dim); text-align: center; }

/* 页脚 */
.foot { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line3); }
.foot p { margin: 0; font-size: 13px; color: var(--dim); text-align: center; }

/* 提示 toast */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px); z-index: 200;
  padding: 10px 18px; border-radius: 100px;
  background: var(--panel3); border: 1px solid var(--line2);
  color: var(--ink); font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
