:root {
  --bg-primary: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #21262d;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --accent-red: #f85149;
  --accent-black: #30363d;
  --accent-highlight: #58a6ff;
  --border-subtle: #30363d;
  --board-dark: #3a271d;
  --board-light: #e8d0aa;
  --piece-red: #d32f2f;
  --piece-black: #212121;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.back-link:hover { color: var(--accent-highlight); }
.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: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-container {
  max-width: 800px;
  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: 1.25rem; }
.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;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}
.mode-btn, .action-btn, .diff-select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 44px;
}
.mode-btn.active {
  background: #238636;
  border-color: #2ea043;
  color: #fff;
  font-weight: 600;
}
.checkers-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.hud-pill { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.disc { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.disc.red-disc { background: var(--piece-red); box-shadow: 0 0 6px rgba(211,47,47,0.6); }
.disc.black-disc { background: #555; border: 1px solid #aaa; }
.turn-indicator {
  background: var(--bg-card);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border-subtle);
}
.board-wrapper {
  background: #2a1b12;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}
.checkers-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(84vw, 460px);
  height: min(84vw, 460px);
  border: 2px solid #1a0f09;
}
.square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}
.square.light { background: var(--board-light); }
.square.dark { background: var(--board-dark); cursor: pointer; }
.square.selected { background: #2f6b3e !important; }
.square.legal-move::after {
  content: '';
  width: 16px;
  height: 16px;
  background: rgba(46, 160, 67, 0.75);
  border-radius: 50%;
  position: absolute;
}
.square.legal-jump::after {
  content: '';
  width: 22px;
  height: 22px;
  background: rgba(248, 81, 73, 0.85);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 8px rgba(248, 81, 73, 0.9);
}
.checker-piece {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  user-select: none;
  transition: transform 0.15s ease;
  box-shadow: inset 0 3px 6px rgba(255,255,255,0.3), 0 4px 8px rgba(0,0,0,0.6);
}
.checker-piece.red { background: linear-gradient(145deg, #ef5350, #b71c1c); color: #ffd700; }
.checker-piece.black { background: linear-gradient(145deg, #424242, #111111); color: #ffd700; border: 1px solid #666; }
.checker-piece.king::before { content: '👑'; font-size: 1rem; }
.content-block {
  max-width: 760px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 1rem;
  line-height: 1.7;
}
.article-header { margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 1rem; }
.article-header h2 { font-size: 1.4rem; color: #fff; margin-bottom: 0.25rem; }
.article-meta { color: var(--text-muted); font-size: 0.85rem; }
.article-section { margin-bottom: 1.5rem; }
.article-section h3 { font-size: 1.15rem; color: #58a6ff; margin-bottom: 0.5rem; }
.article-section p { color: #c9d1d9; margin-bottom: 0.75rem; }
.article-section ul { padding-left: 1.5rem; color: #c9d1d9; margin-bottom: 0.75rem; }
.article-section li { margin-bottom: 0.4rem; }
.faq-accordion { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.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; font-size: 0.95rem; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.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: 400px;
  width: 100%;
}
.modal-badge { font-size: 3rem; margin-bottom: 0.5rem; }
.modal-title { font-size: 1.5rem; margin-bottom: 0.5rem; color: #fff; }
.modal-desc { color: var(--text-muted); margin-bottom: 1.5rem; }
.btn-primary {
  background: #238636;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  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;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}