/* 题锁 Tisuo - Web 演示页样式（10 英尺大屏风格，键盘/遥控器焦点可见） */
:root {
  --bg: #0d1220;
  --bg-soft: #141c30;
  --panel: #18223a;
  --line: #2a3654;
  --text: #eef3ff;
  --muted: #9aa9c7;
  --accent: #5b8cff;
  --accent-2: #8b6cff;
  --ok: #35c98b;
  --warn: #ffb020;
  --err: #ff6b7a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #1d2a4d 0%, var(--bg) 60%) fixed;
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, .option:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 3px;
}
.app { max-width: 1240px; margin: 0 auto; padding: 24px 28px 32px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 26px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(91,140,255,.35);
}
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.brand-name span { color: var(--muted); font-weight: 400; font-size: 16px; margin-left: 4px; }
.brand-sub { color: var(--muted); font-size: 13px; }
.top-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.host-badge { font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(255,176,32,.15); }
.status.online .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(53,201,139,.15); }
.status.offline .dot { background: var(--err); box-shadow: 0 0 0 4px rgba(255,107,122,.15); }
.link-btn { color: var(--text); text-decoration: none; border: 1px solid var(--line); padding: 8px 16px; border-radius: 10px; font-size: 14px; }
.link-btn:hover { border-color: var(--accent); }

/* 主卡片区 */
.grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; margin-top: 24px; }
.card { background: linear-gradient(160deg, var(--panel), var(--bg-soft)); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.tag { font-size: 12px; color: var(--accent); background: rgba(91,140,255,.14); border: 1px solid rgba(91,140,255,.35); padding: 4px 12px; border-radius: 999px; }
.timer-card { grid-row: span 2; }
.timer-wrap { text-align: center; padding: 20px 0 26px; }
.timer { font-size: clamp(64px, 9vw, 108px); font-weight: 700; letter-spacing: 4px; line-height: 1.1; font-variant-numeric: tabular-nums; background: linear-gradient(120deg, #fff, #9db8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.timer-label { color: var(--muted); font-size: 14px; margin-top: 6px; }
.progress { height: 6px; background: #0c1322; border-radius: 99px; overflow: hidden; margin: 26px auto 0; max-width: 420px; }
.progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s linear; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.btn { background: #202c48; color: var(--text); border: 1px solid var(--line); border-radius: 11px; padding: 11px 20px; cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); border-color: transparent; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255,107,122,.5); color: #ffb4bd; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 24px 0 0; }

.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv { background: #111a2e; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kv span { display: block; color: var(--muted); font-size: 12px; }
.kv strong { display: block; font-size: 20px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.filters { margin-top: 14px; display: grid; gap: 8px; }
.filter-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.filter-line em { color: var(--text); font-style: normal; text-align: right; }
.policy-note { margin-top: 16px; font-size: 12px; color: var(--muted); background: rgba(91,140,255,.08); border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 0 8px 8px 0; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan { background: #111a2e; border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; transition: border-color .15s, transform .15s; }
.plan:hover { border-color: var(--accent); transform: translateY(-2px); }
.plan strong { display: block; font-size: 15px; }
.plan span { display: block; font-size: 24px; font-weight: 700; margin: 8px 0 4px; color: #a9c1ff; }
.plan small { color: var(--muted); font-size: 12px; }
.benefit-foot { margin-top: 14px; font-size: 13px; color: var(--muted); min-height: 20px; }

.flow { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; flex-wrap: wrap; }
.flow-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.flow-item b { color: var(--accent); font-size: 15px; }
.flow-arrow { color: var(--line); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #6f7d9c; font-size: 12px; margin-top: 22px; }

/* 全屏答题遮罩 */
.overlay { position: fixed; inset: 0; background: rgba(6,10,20,.94); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay[hidden] { display: none; }
.quiz-shell { width: min(1000px, 100%); max-height: 92vh; overflow: auto; background: linear-gradient(160deg, #1a2540, #101728); border: 1px solid var(--line); border-radius: 24px; padding: 28px 34px; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.quiz-badge { font-size: 14px; color: var(--muted); }
.quiz-body { padding: 30px 0 10px; }
.stem { font-size: clamp(22px, 3vw, 34px); line-height: 1.5; font-weight: 600; margin-bottom: 30px; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.option { display: flex; align-items: center; gap: 14px; text-align: left; background: #1d2945; border: 2px solid var(--line); color: var(--text); border-radius: 16px; padding: 18px 22px; font-size: 20px; cursor: pointer; transition: border-color .12s, background .12s, transform .12s; }
.option:hover { border-color: var(--accent); transform: translateY(-2px); }
.option.selected { border-color: var(--accent); background: rgba(91,140,255,.2); }
.option .key { width: 34px; height: 34px; flex: none; border-radius: 9px; background: #2b3a60; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.fill-input { width: 100%; background: #1d2945; border: 2px solid var(--line); color: var(--text); border-radius: 14px; padding: 18px 20px; font-size: 22px; }
.result { text-align: center; padding: 20px 0 10px; }
.result .icon { font-size: 64px; line-height: 1; }
.result h3 { font-size: 30px; margin: 16px 0 8px; }
.result.ok h3 { color: var(--ok); }
.result.bad h3 { color: var(--warn); }
.analysis { text-align: left; background: #111a2e; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-top: 22px; color: #cbd7f2; font-size: 16px; white-space: pre-wrap; }
.quiz-foot { display: flex; gap: 12px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

/* 弹窗 */
.dialog { width: min(640px, 100%); max-height: 90vh; overflow: auto; background: #172139; border: 1px solid var(--line); border-radius: 20px; padding: 28px 30px; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.dialog.narrow { width: min(440px, 100%); }
.dialog.wide { width: min(860px, 100%); }
.dialog h2 { margin: 0 0 6px; font-size: 22px; }
.dialog-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 13px; color: var(--muted); display: block; }
label.block { margin-bottom: 18px; }
input { display: block; width: 100%; margin-top: 7px; background: #0e1729; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog-msg { min-height: 22px; margin-top: 12px; font-size: 13px; color: var(--warn); }
.list-body { max-height: 52vh; overflow: auto; }
.list-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: #111a2e; }
.list-item .li-title { font-size: 15px; margin-bottom: 6px; }
.list-item .li-meta { font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.qr-box { text-align: center; padding: 12px 0 20px; }
.qr-box canvas { background: #fff; padding: 10px; border-radius: 12px; }
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 90; background: #243357; border: 1px solid var(--line); color: var(--text); padding: 12px 22px; border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.4); font-size: 14px; }
.toast[hidden] { display: none; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .timer-card { grid-row: auto; }
  .options { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .app { padding: 18px; }
}
