/* 辩论赛计时器 DebateTimer 官网 — 暗色记分牌风 */
:root {
  --bg: #0b1017;
  --bg2: #0e1520;
  --surface: #141d29;
  --surface2: #182234;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef6;
  --muted: #93a3b8;
  --pro: #1976d2;         /* 正方蓝（品牌色） */
  --con: #e53935;         /* 反方红（暗底提亮） */
  --ink: #1a237e;         /* 指针藏青 */
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(25, 118, 210, 0.13), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(229, 57, 53, 0.09), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
section { scroll-margin-top: 76px; }
a { color: #6db3f2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 导航 ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(11, 16, 23, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: 0.92rem; }
.nav-links > a:not(.btn) { color: var(--muted); }
.nav-links > a:not(.btn):hover { color: var(--text); text-decoration: none; }
.lang-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 4px 12px; font-size: 0.82rem; cursor: pointer;
  font-family: inherit; font-weight: 600; transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #1e88e5, var(--pro));
  color: #fff;
  box-shadow: 0 6px 22px rgba(25, 118, 210, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 26px rgba(25, 118, 210, 0.45); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.22); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero { padding: 128px 24px 72px; }
.hero-inner {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-block; font-size: 0.85rem; color: #8fb8e8;
  border: 1px solid rgba(109, 179, 242, 0.35); background: rgba(25, 118, 210, 0.12);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.15; letter-spacing: 0.02em; }
.hero-title .pro { color: #64a9ea; }
.hero-title .con { color: #f07570; }
.hero-tagline { margin-top: 16px; font-size: 1.08rem; color: var(--muted); max-width: 34em; }
.hero-cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.85rem; color: var(--muted); }

/* ========================================================================
   记分牌（演示）—— 严格复刻应用设计，取值逐项对齐源码：
   · 大屏页 dark 主题（src/timer/display.css）：--dt-bg #0f1419、跟随横幅
     rgba(102,187,106,.16)/#81c784、.dt-stage-name 700
   · 钟面卡（src/components/timer-box.css dark）：卡 rgba(26,35,50,.92)、
     徽章 #90caf9/#0f1419、数字 #f1f5f9 w800 tabular-nums、
     warn=仅闪烁 1.5s、locked=#e53935 闪烁 1s（30 秒提醒不变色）
   · 控制端地铁线（src/timer/timer-control.css dark）：路线 #90caf9、
     珠芯 #1a2332、已过 #5b6673、7px 色带、互换胶囊 2.3×1.55rem、
     当前站实心盘（#0f1419 字）+ 呼吸图标 2.5s
   ======================================================================== */
.board {
  background: #0f1419;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.board-bar { display: flex; justify-content: flex-start; min-height: 1.5rem; }
.dt-banner-follow {
  padding: 0.15rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(102, 187, 106, 0.16);
  color: #81c784;
}
.dt-stage-name {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  text-align: center;
  color: #f1f5f9;
}
.dt-clocks {
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.3rem);
  justify-content: center;
  align-items: stretch;
}
.dt-clocks > :only-child { flex: 0 1 21rem; }

/* 钟面卡（TimerBox display dark 复刻） */
.board .tb-box {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: clamp(0.7rem, 1.6vw, 1.1rem) 0.8rem;
  border-radius: 16px;
  background: rgba(26, 35, 50, 0.92);
  border: 2px solid transparent;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
/* 自由辩论：持方卡片高亮（border + 4px 光环 + 上浮） */
.board .tb-box.tb-active {
  border-color: #90caf9;
  box-shadow: 0 0 0 4px rgba(144, 202, 249, 0.25), 0 4px 14px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}
.board .tb-head {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin: 0 0 0.25rem;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 600;
  color: #f1f5f9;
}
.board .tb-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.75em;
  padding: 0.1em 0.45em;
  border-radius: 999px;
  font-size: 0.8em;
  background: #90caf9;
  color: #0f1419;
  letter-spacing: 0.05em;
}
.board .tb-clock {
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #f1f5f9;
  font-size: clamp(2.6rem, 7vw, 3.6rem);
  font-weight: 800;
}
@keyframes tb-blink { 50% { opacity: 0.15; } }
.board .tb-clock--warn { animation: tb-blink 1.5s step-start 0s infinite; }
.board .tb-clock--locked { color: #e53935 !important; animation: tb-blink 1s step-start 0s infinite; }

/* 地铁线（TimerControlPage .stage-timeline dark 复刻） */
.board .stage-timeline {
  --st-route: #90caf9;
  --st-core: #1a2332;
  --st-pass-ring: #5b6673;
  --st-pass-fg: #5b6673;
  --st-fg: #c6d2e0;
  --st-dot-size: 1.6rem;
  --st-capsule-w: 2.3rem;
  --st-capsule-h: 1.55rem;
  --st-band: 7px;
  --st-dot-pad-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 0.4rem 0.15rem 0.5rem;
  scrollbar-width: thin;
}
.board .st-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 0;
  min-width: 4.25rem;
  padding: var(--st-dot-pad-top) 0.3rem 0.2rem;
  color: var(--st-fg);
  font-size: 0.78rem;
}
.board .st-step::after {
  content: '';
  position: absolute;
  top: calc(var(--st-dot-pad-top) + var(--st-dot-size) / 2 - var(--st-band) / 2);
  left: 50%;
  width: 100%;
  height: var(--st-band);
  background: var(--st-route);
  z-index: 0;
}
.board .st-step:first-child::after { left: 0; width: 150%; border-radius: 4px 0 0 4px; }
.board .st-step:last-child::after { width: 50%; border-radius: 0 4px 4px 0; }
.board .st-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--st-dot-size);
  height: var(--st-dot-size);
  border-radius: 50%;
  border: 2px solid var(--st-route);
  background: var(--st-core);
  box-shadow: 0 0 0 3px var(--st-core);
  color: var(--st-route);
  font-size: 0.68rem;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.board .st-step--passed .st-dot { border-color: var(--st-pass-ring); color: var(--st-pass-ring); }
.board .st-step--interchange .st-dot {
  width: var(--st-capsule-w);
  height: var(--st-capsule-h);
  margin-top: calc((var(--st-dot-size) - var(--st-capsule-h)) / 2);
  border-radius: 999px;
  border-width: 3px;
  font-size: 0.75rem;
}
.board .st-step--current .st-dot { background: var(--st-route); border-color: var(--st-route); color: #0f1419; }
.board .st-marker {
  position: absolute;
  top: 0.02rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--st-route);
  animation: st-breathe 2.5s ease-in-out infinite;
  pointer-events: none;
}
.board .st-marker svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes st-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.board .st-name {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 4.6rem;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.25;
  font-size: 0.72rem;
  color: var(--st-fg);
  transition: color 0.2s ease;
}
.board .st-step--interchange .st-name { font-weight: 600; }
.board .st-step--current .st-name {
  color: var(--st-route);
  font-weight: 700;
  max-width: 6rem;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.board .st-step--passed .st-name { color: var(--st-pass-fg); font-weight: 400; }

/* ===== 通用 section ===== */
.section { max-width: 1120px; margin: 0 auto; padding: 72px 24px 12px; }
.section-title { font-size: clamp(1.6rem, 4vw, 2.2rem); text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 12px auto 40px; max-width: 40em; }

/* 功能卡片 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(109, 179, 242, 0.4); background: var(--surface2); }
.card-icon { font-size: 1.7rem; margin-bottom: 10px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.88rem; color: var(--muted); }

/* 快速上手 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px 20px;
}
.step-no {
  position: absolute; top: -14px; left: 20px;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #1e88e5, var(--pro));
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(25, 118, 210, 0.45);
}
.step h3 { font-size: 1.02rem; margin: 8px 0 8px; }
.step p { font-size: 0.88rem; color: var(--muted); }
.guide-cta { text-align: center; margin-top: 36px; }

/* 自部署 */
.codebox {
  max-width: 640px; margin: 0 auto;
  background: #0a0e14; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
}
.codebar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--line);
}
.codebar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.codebar span:nth-child(1) { background: #ff5f57; }
.codebar span:nth-child(2) { background: #febc2e; }
.codebar span:nth-child(3) { background: #28c840; }
.codebar em { margin-left: auto; font-style: normal; font-size: 0.75rem; color: var(--muted); }
.codebox pre { padding: 18px 20px; overflow-x: auto; }
.codebox code { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; font-size: 0.9rem; color: #9fd0a0; white-space: pre; }
.sh-link { text-align: center; margin-top: 18px; font-size: 0.92rem; }

/* ===== Footer ===== */
.footer {
  margin-top: 80px; padding: 44px 24px 52px; text-align: center;
  border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  color: var(--muted); font-size: 0.88rem;
}
.footer-logo { width: 30px; height: 30px; margin-bottom: 12px; opacity: 0.9; }
.footer-meta { margin-top: 8px; font-size: 0.8rem; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .nav-links > a:not(.btn):not(:last-child) { display: none; }
}
@media (max-width: 560px) {
  .grid, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 104px; }
  .board .st-name { display: none; }
  .board .st-step--current .st-name { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .board .st-marker,
  .board .tb-clock--warn,
  .board .tb-clock--locked { animation: none; }
}
