/* 高光时刻评测 · C 端(移动优先,深色观影环境) */
:root {
  --bg: oklch(0.16 0.012 255);
  --surface: oklch(0.21 0.014 255);
  --surface-2: oklch(0.25 0.016 255);
  --line: oklch(0.31 0.016 255);
  --ink: oklch(0.94 0.008 255);
  --ink-2: oklch(0.72 0.014 255);
  --accent: oklch(0.62 0.17 258);
  --accent-press: oklch(0.55 0.17 258);
  --star: oklch(0.8 0.15 80);
  --ok: oklch(0.75 0.13 160);
  --err: oklch(0.7 0.16 25);
  --radius: 14px;
  --radius-s: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-sticky: 10;
  --z-overlay: 20;
  --z-modal: 50;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.progress-pill {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 12px;
  font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap;
}

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; padding: 24px 16px; font-size: 12px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.err { color: var(--err); font-size: 14px; min-height: 20px; margin-top: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.center-card { max-width: 420px; margin: 6vh auto 0; }
.center-card h1 { font-size: 22px; letter-spacing: -0.015em; text-wrap: balance; margin-bottom: 8px; }
.center-card > p { margin-bottom: 20px; max-width: 60ch; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
input, textarea {
  width: 100%; background: var(--surface-2); color: var(--ink); caret-color: var(--accent);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; font-size: 16px; font-family: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--ink-2); }
input:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}
textarea { resize: vertical; }

.row { display: flex; gap: 10px; align-items: center; }
.space-between { justify-content: space-between; }

/* ---------- 按钮 ---------- */
.primary-btn, .secondary-btn, .ghost-btn {
  border: none; border-radius: var(--radius-s); cursor: pointer;
  font-size: 16px; font-family: inherit;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease), opacity 0.15s var(--ease);
}
.primary-btn { width: 100%; background: var(--accent); color: #fff; padding: 14px; font-weight: 600; margin-top: 4px; }
.primary-btn:hover { background: var(--accent-press); }
.primary-btn:active { transform: scale(0.985); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.primary-btn.loading { opacity: 0.75; cursor: progress; }
.secondary-btn {
  background: var(--surface-2); color: var(--ink); padding: 12px 16px;
  white-space: nowrap; border: 1px solid var(--line);
}
.secondary-btn:hover { background: var(--line); }
.secondary-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ghost-btn { background: transparent; color: var(--ink-2); padding: 8px 10px; font-size: 14px; }
.ghost-btn:hover, .ghost-btn:active { color: var(--ink); }
.primary-btn:focus-visible, .secondary-btn:focus-visible, .ghost-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- 播放器 ---------- */
.player-wrap {
  position: relative; background: #000;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 14px;
}
#player { display: block; width: 100%; max-height: 60vh; background: #000; }
.play-overlay {
  position: absolute; inset: 0; z-index: var(--z-overlay);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  /* 底部留出原生控制条区域,提示不与其重叠 */
  padding-bottom: 56px;
  background: color-mix(in oklch, #000 35%, transparent);
  border: none; cursor: pointer; width: 100%;
  transition: opacity 0.2s var(--ease);
}
.play-overlay .play-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: color-mix(in oklch, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid color-mix(in oklch, #fff 25%, transparent);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s var(--ease);
}
.play-overlay:hover .play-circle { transform: scale(1.06); }
.play-overlay svg { width: 28px; height: 28px; fill: #fff; margin-left: 4px; }
.play-overlay .play-tip { color: #fff; font-size: 14px; opacity: 0.85; }

/* ---------- 打分卡 ---------- */
.rate-card { padding: 18px 20px 20px; }
.video-name { font-size: 13px; color: var(--ink-2); word-break: break-all; margin-bottom: 10px; }

.gate { margin-bottom: 12px; }
.gate-bar {
  height: 4px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; margin-bottom: 6px;
}
.gate-fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s linear, background 0.3s var(--ease);
}
.gate.ready .gate-fill { background: var(--ok); }
.gate-tip { font-size: 13px; color: var(--ink-2); min-height: 20px; }
.gate.ready .gate-tip { color: var(--ok); }

.stars { display: flex; gap: 4px; justify-content: center; margin: 8px 0 2px; }
.stars button {
  background: none; border: none; font-size: 42px; line-height: 1;
  color: var(--surface-2); -webkit-text-stroke: 1.5px var(--line);
  cursor: pointer; padding: 6px 8px; border-radius: 8px;
  transition: transform 0.12s var(--ease), color 0.15s var(--ease);
}
.stars button.on { color: var(--star); -webkit-text-stroke: 0; }
.stars button:active { transform: scale(1.18); }
.stars button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stars button.pop { animation: star-pop 0.25s var(--ease); }
@keyframes star-pop {
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.stars-label {
  text-align: center; font-size: 14px; font-weight: 500;
  color: var(--ink-2); min-height: 22px; margin-bottom: 12px;
}
.stars-label.chosen { color: var(--star); }
#inComment { margin-bottom: 14px; }

/* ---------- 我的记录 ---------- */
.mine-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.mine-item:last-child { border-bottom: none; }
.mine-info { min-width: 0; }
.mine-name { font-size: 14px; font-weight: 500; word-break: break-all; }
.mine-comment {
  font-size: 13px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw;
}
.mine-stars { color: var(--star); font-size: 15px; letter-spacing: 1px; white-space: nowrap; }
.mine-offline { font-size: 12px; color: var(--ink-2); }

.empty-state { text-align: center; padding: 36px 16px; color: var(--ink-2); }
.empty-state .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- 完结页 ---------- */
.done-card { text-align: center; }
.done-card h1 { margin-bottom: 10px; }
.done-emoji { font-size: 52px; display: block; margin-bottom: 12px; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: color-mix(in oklch, #000 62%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal { width: 100%; max-width: 420px; animation: modal-in 0.2s var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal h2 { font-size: 17px; margin-bottom: 12px; word-break: break-all; }
.modal textarea { margin: 12px 0; }
.modal .row > button { flex: 1; }

h2 { font-size: 18px; letter-spacing: -0.01em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
