:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.stats-pill {
  background: #fef3c7;
  color: #b45309;
  border: 2px solid #f59e0b;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
}

.container {
  max-width: 880px;
  margin: 28px auto;
  padding: 0 18px 48px;
}

.hero-box {
  background: linear-gradient(135deg, #4f46e5, #0284c7);
  color: #ffffff;
  padding: 28px 24px;
  border-radius: 22px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.22);
}

.hero-box h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero-box p {
  margin: 0;
  font-size: 16px;
  opacity: 0.95;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.chapter-card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.chapter-icon {
  font-size: 42px;
  margin-bottom: 8px;
}

.chapter-card h3 {
  margin: 4px 0 8px;
  font-size: 20px;
}

.chapter-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.chapter-progress {
  display: inline-block;
  background: #f1f5f9;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
}
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.game-row:hover {
  background: #f8fafc;
  border-color: var(--primary);
}

.game-row.done {
  background: #f0fdf4;
  border-color: #86efac;
}

.game-title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 3px;
}

.game-desc {
  font-size: 13px;
  color: var(--muted);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn-ghost:hover {
  background: #e2e8f0;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.quiz-hint {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin: 8px 0;
}

.cards-pool {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.note-card {
  width: 58px;
  height: 66px;
  border-radius: 14px;
  border: 3px solid #334155;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  user-select: none;
  transition: transform 0.12s ease;
}

.note-card:hover {
  transform: translateY(-2px);
}

.answer-grid {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.answer-btn {
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--border);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.answer-btn:hover {
  transform: translateY(-2px);
}

.reward-badge {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  border: 2px solid #f59e0b;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
}

