/* WikiWord — shared styles for MP watch page + SP game page.
   Retro palette locked in 2026-04-16. */

:root {
  --bg: #1A1A1A;
  --bg-panel: #111;
  --redact: #2A2A2A;
  --text: #E6E6E6;
  --text-dim: #A0A0A0;
  --muted: #666499;
  --accent: #FF6600;
  --accent-dim: #E06620;
  --body-font: 'Roboto Mono', ui-monospace, monospace;
  --head-font: 'Orbitron', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dim); }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent-dim);
  margin-bottom: 32px;
}
header.site .brand {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 5px;
  color: var(--accent);
}
header.site nav {
  display: flex;
  gap: 12px;
}
header.site nav a {
  padding: 8px 16px;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
header.site nav a.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
header.site .status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}
header.site .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
}
header.site .dot.live {
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,102,0,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(255,102,0,0); }
}

/* ── Title block ─────────────────────────────────────────── */
.title-block { margin-bottom: 24px; }
.title-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.title-text {
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: 1.5px;
  line-height: 1.1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.title-text .word { display: inline-block; }
.title-text .word.revealed { color: var(--accent); }
.title-text .word.title-blackout {
  background: var(--redact);
  color: transparent;
  border-radius: 6px;
  width: 9ch;
  padding: 4px 10px;
}

/* ── Article body ────────────────────────────────────────── */
.article {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
}
.article p { margin: 0 0 16px 0; }

.word {
  display: inline-block;
  vertical-align: baseline;
  transition: color 400ms ease;
}
.word.redacted {
  background: var(--redact);
  color: transparent;
  border-radius: 3px;
  padding: 0 5px;
  margin: 0 1px;
  line-height: 1.3;
}
.word.revealed { color: var(--text); }
.word.stop { color: var(--text); opacity: 0.8; }
.word.glow { animation: glow-in 700ms ease-out; }
@keyframes glow-in {
  0% {
    background: rgba(255, 102, 0, 0.55);
    color: #fff;
    text-shadow: 0 0 10px rgba(255,102,0,0.8);
    border-radius: 3px;
    padding: 0 5px;
  }
  100% {
    background: transparent;
    color: var(--text);
    text-shadow: none;
    padding: 0;
  }
}

/* ── Footer stats ─────────────────────────────────────────── */
footer.stats {
  margin-top: auto;
  padding-top: 20px;
  border-top: 2px solid var(--accent-dim);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}
footer.stats .right { color: var(--accent-dim); }

/* ── Idle / waiting card ─────────────────────────────────── */
.idle-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 40px 20px;
}
.idle-card .huge {
  font-family: var(--head-font);
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.idle-card .sub {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* ── SP guess input + history ─────────────────────────────── */
.guess-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #333;
}
.guess-input {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.guess-input input {
  flex: 1;
  font-family: var(--body-font);
  font-size: 18px;
  padding: 12px 16px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  outline: none;
}
.guess-input input:focus { border-color: var(--accent); }
.guess-input button {
  font-family: var(--head-font);
  font-size: 14px;
  padding: 12px 24px;
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
}
.guess-input button:hover { background: var(--accent-dim); }
.guess-input button:disabled { background: #444; color: #888; cursor: not-allowed; }

.guess-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  min-height: 26px;
}
.guess-history .chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #333;
  letter-spacing: 1px;
}
.guess-history .chip.hit {
  border-color: var(--accent);
  color: var(--accent);
}
.guess-history .chip.miss {
  color: #666;
}
.guess-history .chip.target {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 700;
}

/* ── Win card ─────────────────────────────────────────────── */
.win-card {
  padding: 32px 24px;
  margin: 32px 0;
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  border-radius: 12px;
  text-align: center;
}
.win-card .hdr {
  font-family: var(--head-font);
  font-size: 28px;
  color: var(--accent);
  letter-spacing: 4px;
  margin-bottom: 14px;
}
.win-card .stat {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 20px;
}
.win-card .next-btn {
  font-family: var(--head-font);
  font-size: 16px;
  padding: 14px 32px;
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: 999px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .wrap { padding: 20px 16px; }
  header.site { flex-wrap: wrap; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; }
  header.site .brand { font-size: 24px; letter-spacing: 3px; }
  header.site nav a { font-size: 12px; padding: 6px 12px; }
  .title-text { font-size: 32px; }
  .article { font-size: 17px; }
  .guess-input input { font-size: 16px; }
}
