:root {
  --bg: #16121f;
  --panel: #221b30;
  --panel-2: #2c2440;
  --text: #f1ecf9;
  --muted: #b3a8c9;
  --accent: #ffb84d;
  --accent-ink: #2a1a00;
  --line: #3a3052;
  --bad: #ff6b6b;
  --t1: #8f8a99; --t2: #4d9fff; --t3: #3ecf8e; --t4: #b57bff; --t5: #ffb84d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: center; max-width: 760px; margin: 0 auto; padding: 14px 16px; }
.brand { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.top nav a { margin-left: 16px; color: var(--muted); text-decoration: none; font-size: 14px; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.hero h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1.15; margin: 12px 0 10px; letter-spacing: -0.02em; }
.lede { color: var(--muted); margin: 0 0 6px; }
.disclaimer { font-size: 13px; color: var(--muted); opacity: .8; margin: 0 0 18px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; }
.card h2 { margin: 0 0 12px; font-size: 22px; }
.rules { padding-left: 20px; margin: 0 0 18px; color: var(--muted); }
.rules b { color: var(--text); }
.meta { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 12px; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .6; cursor: wait; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.start-row { justify-content: flex-start; }

.hud { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.hud b { color: var(--text); }
.lives { color: var(--bad); letter-spacing: 3px; font-size: 18px; }
.timer { height: 6px; background: var(--panel-2); border-radius: 99px; margin: 10px 0 18px; overflow: hidden; }
#timer-fill { height: 100%; width: 100%; background: var(--accent); transition: width .1s linear; }
#timer-fill.low { background: var(--bad); }
.prompt { font-size: clamp(22px, 5.5vw, 30px); font-weight: 800; line-height: 1.25; margin: 0 0 16px; }
#answer-form { display: flex; flex-wrap: wrap; gap: 8px; }
#guess {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
#guess:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { flex-basis: 100%; min-height: 1.6em; margin: 4px 0 0; color: var(--bad); font-size: 14px; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.feedback p { margin: 0 0 8px; }
.fb-title { font-size: 22px; font-weight: 800; }
.fb-more { color: var(--muted); font-size: 14px; }
.feedback .btn { margin-top: 8px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 14px; font-weight: 800; color: #120d1a; }
.t1 { background: var(--t1); } .t2 { background: var(--t2); } .t3 { background: var(--t3); }
.t4 { background: var(--t4); } .t5 { background: var(--t5); }

#screen-over { text-align: center; }
.big { font-size: 64px; font-weight: 900; margin: 0; color: var(--accent); line-height: 1; }
.trail { font-size: 22px; letter-spacing: 2px; word-break: break-all; margin: 14px 0 6px; }
#screen-over .row { margin-top: 18px; }

.ad-slot:empty { display: none; }
.ad-slot { margin: 24px 0; min-height: 90px; }

.content { margin-top: 36px; }
.content h2 { font-size: 22px; margin: 32px 0 10px; }
.content h3 { font-size: 17px; margin: 20px 0 4px; }
.content p, .content li { color: #d9d1e8; }
.content ol, .content ul { padding-left: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }

footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .small { font-size: 12px; opacity: .8; }
.page h1 { font-size: 30px; margin: 12px 0; }

/* ---- engine player, actions, comments (2026-11-15 move to GeFeiSites) ---- */
body.bare { background: var(--bg); }
body.bare main, body.bare .game { max-width: none; }
body.bare .game { padding: 12px; }
.player { margin: 0 0 22px; }
.stage { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (min-width: 700px) { .stage { aspect-ratio: 4 / 3; } }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; cursor: pointer;
  background: radial-gradient(120% 90% at 50% 0%, #3a2a5c 0%, var(--panel) 55%, var(--bg) 100%); }
.cover-kicker { margin: 0; color: var(--accent); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.cover-title { margin: 10px 0 6px; font-size: clamp(22px, 5vw, 32px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.cover-sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.big-btn { font-size: 18px; padding: 14px 28px; }
.loader { position: absolute; inset: 0; display: none; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--muted); background: var(--panel); }
[data-gf-state="loading"] .loader { display: flex; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 28px; border-radius: 4px; animation: dc-pulse 1s infinite ease-in-out; }
.dots i:nth-child(1) { background: var(--t1); } .dots i:nth-child(2) { background: var(--t2); animation-delay: .1s; }
.dots i:nth-child(3) { background: var(--t3); animation-delay: .2s; } .dots i:nth-child(4) { background: var(--t4); animation-delay: .3s; }
.dots i:nth-child(5) { background: var(--t5); animation-delay: .4s; }
@keyframes dc-pulse { 0%, 100% { transform: scaleY(.4); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.act { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.act[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.act-msg { color: var(--muted); font-size: 13px; }
.comments { margin-top: 32px; }
.c-form { display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.c-form input, .c-form textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; }
.c-form [data-gf-reply-cancel], .c-form [data-gf-reply-to] { display: none; }
.c-form[data-gf-replying] [data-gf-reply-cancel], .c-form[data-gf-replying] [data-gf-reply-to] { display: inline-block; }
.c-msg { margin: 0; color: var(--muted); font-size: 14px; }
.c-list { margin-top: 14px; }
.c-empty { color: var(--muted); }
.c-list:not([data-gf-empty]) .c-empty { display: none; }
.c-item { border-top: 1px solid var(--line); padding: 12px 0; }
.c-head { margin: 0; font-size: 14px; }
.c-time { color: var(--muted); font-size: 12px; }
.c-owner { display: none; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 0 6px; font-size: 12px; }
[data-gf-owner] > .c-head .c-owner { display: inline; }
.c-text { margin: 4px 0; }
.c-to { color: var(--accent); }
.c-reply { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 13px; }
.c-replies { margin-left: 18px; }
html[data-gf-playing] .stage { border-color: var(--accent); }

/* ---- ads (Adsterra banners, 2026-11-15) ---- */
.ad-box { text-align: center; margin: 18px auto 0; }
.ad-box iframe { max-width: 100%; border: 0; }
.ad-300 { min-height: 270px; }
.ad-728 { max-width: 760px; padding: 0 16px; }
.ad-label { margin: 0 0 4px; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.byline { margin-top: 28px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.table-wrap { overflow-x: auto; }
.compare.wide { min-width: 720px; font-size: 14px; }
