:root {
  --bg-primary: #0a0e1a;
  --bg-surface: #141b2c;
  --bg-card: #1c263c;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --border-subtle: #2d3848;
  --color-p1: #1f6feb;
  --color-p2: #da3633;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header { background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); padding: 0.75rem 1.25rem; }
.header-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.back-link { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.back-link:hover { color: #58a6ff; }
.logo-area { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.icon-button { background: var(--bg-card); border: 1px solid var(--border-subtle); color: #fff; padding: 0.5rem 0.75rem; border-radius: 8px; cursor: pointer; min-width: 44px; min-height: 44px; }
.game-container { max-width: 760px; margin: 1.5rem auto; padding: 0 1rem; flex: 1; display: flex; flex-direction: column; align-items: center; }
.game-header-text { text-align: center; margin-bottom: 1rem; }
.game-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.35rem; color: #fff; }
.game-subtitle { color: var(--text-muted); font-size: 0.95rem; }
.settings-toolbar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.mode-btn, .action-btn { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-subtle); padding: 0.5rem 0.85rem; border-radius: 8px; cursor: pointer; min-height: 44px; }
.mode-btn.active { background: #238636; border-color: #2ea043; color: #fff; font-weight: 600; }
.hud-bar { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 460px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 0.75rem 1.25rem; margin-bottom: 1.5rem; }
.hud-pill { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.blue-dot { background: var(--color-p1); }
.red-dot { background: var(--color-p2); }
.turn-badge { background: var(--bg-card); padding: 0.35rem 0.75rem; border-radius: 20px; font-weight: 700; font-size: 0.85rem; border: 1px solid var(--border-subtle); }
.board-wrapper {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 24px; box-shadow: 0 12px 36px rgba(0,0,0,0.5); margin-bottom: 1.5rem;
}
.dots-grid {
  position: relative;
  width: min(85vw, 320px);
  height: min(85vw, 320px);
}
.dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f0f6fc;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.h-line {
  position: absolute;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s;
}
.v-line {
  position: absolute;
  width: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  cursor: pointer;
  transform: translateX(-50%);
  transition: background 0.15s;
}
.h-line:hover, .v-line:hover { background: rgba(255,255,255,0.3); }
.h-line.claimed-p1, .v-line.claimed-p1 { background: var(--color-p1) !important; cursor: default; }
.h-line.claimed-p2, .v-line.claimed-p2 { background: var(--color-p2) !important; cursor: default; }
.box-fill {
  position: absolute;
  border-radius: 8px;
  opacity: 0.35;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
}
.box-fill.claimed-p1 { background: var(--color-p1); opacity: 0.45; color: #fff; }
.box-fill.claimed-p2 { background: var(--color-p2); opacity: 0.45; color: #fff; }
.content-block { max-width: 760px; width: 100%; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 1.75rem; line-height: 1.7; }
.article-header { border-bottom: 1px solid var(--border-subtle); padding-bottom: 1rem; margin-bottom: 1rem; }
.article-header h2 { font-size: 1.35rem; color: #fff; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; }
.article-section { margin-bottom: 1.25rem; }
.article-section h3 { font-size: 1.1rem; color: #58a6ff; margin-bottom: 0.5rem; }
.article-section p { color: #c9d1d9; margin-bottom: 0.65rem; }
.article-section ul { padding-left: 1.5rem; color: #c9d1d9; margin-bottom: 0.65rem; }
.faq-accordion { display: flex; flex-direction: column; gap: 0.65rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 0.75rem 1rem; }
.faq-question { font-weight: 600; cursor: pointer; color: #fff; }
.faq-answer { margin-top: 0.5rem; color: #8b949e; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.hidden { display: none; }
.modal-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 2rem; border-radius: 16px; text-align: center; max-width: 360px; width: 100%; }
.modal-badge { font-size: 3rem; margin-bottom: 0.5rem; }
.btn-primary { background: #238636; color: #fff; border: none; padding: 0.75rem 1.5rem; font-weight: 600; border-radius: 8px; cursor: pointer; margin-top: 1rem; min-height: 44px; }
.site-footer { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: auto; }
