/* ═══════════════════════════════════
   Flags & Capitals Game — game.css
   ═══════════════════════════════════ */

#fg-wrapper * { box-sizing: border-box; }

#fg-wrapper {
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 480px;
  margin: 40px auto;
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 40px rgba(16,85,187,.12);
  user-select: none;
}

#fg-wrapper h1 {
  font-size: 24px;
  text-align: center;
  color: #1055bb;
  margin: 0 0 20px;
  letter-spacing: -.3px;
}

/* ── Setup ── */
#fg-setup {
  background: #f0f5ff;
  border: 1px solid #c7d9ff;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#fg-setup label {
  font-size: 11px;
  font-weight: 700;
  color: #1055bb;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
  display: block;
}

#fg-setup input,
#fg-setup select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid #c7d9ff;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #0a2d6e;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

#fg-setup input:focus,
#fg-setup select:focus {
  border-color: #1055bb;
  box-shadow: 0 0 0 3px rgba(16,85,187,.1);
}

#fg-setup input.fg-error,
#fg-setup select.fg-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

.fg-setup-row {
  display: flex;
  gap: 10px;
}
.fg-setup-row > div { flex: 1; }

/* ── Status bar ── */
#fg-status-bar {
  display: flex;
  justify-content: space-around;
  background: #f0f5ff;
  border-radius: 14px;
  padding: 12px 8px;
  margin-bottom: 16px;
}

.fg-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fg-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6b9ade;
}

.fg-stat span:last-child {
  font-size: 20px;
  font-weight: 800;
  color: #1055bb;
}

#fg-timer.urgent { color: #dc2626; animation: fg-pulse .7s infinite; }
@keyframes fg-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Question area ── */
#fg-question-area {
  text-align: center;
  margin-bottom: 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#fg-question-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #6b9ade;
}

#fg-question-display {
  font-size: 120px;
  line-height: 1;
  transition: transform .2s;
}

#fg-question-display.text-mode {
  font-size: 22px;
  font-weight: 800;
  color: #0a2d6e;
  line-height: 1.3;
  background: #f0f5ff;
  border-radius: 14px;
  padding: 16px 20px;
  width: 100%;
}

#fg-question-display.shake {
  animation: fg-shake .35s ease;
}

@keyframes fg-shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-8px)}
  40%{transform:translateX(8px)}
  60%{transform:translateX(-5px)}
  80%{transform:translateX(5px)}
}

/* ── Answer buttons ── */
#fg-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

#fg-answers button {
  background: #f0f5ff;
  color: #0a2d6e;
  border: 2px solid #c7d9ff;
  font-weight: 600;
  padding: 13px 8px;
  border-radius: 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
  font-family: inherit;
  line-height: 1.3;
  text-align: center;
}

#fg-answers button:hover:not(:disabled) {
  background: #dce8ff;
  border-color: #1055bb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16,85,187,.12);
}

#fg-answers button:disabled { opacity: .6; cursor: default; }

#fg-answers button.correct {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #14532d !important;
  animation: fg-pop .25s ease;
}

#fg-answers button.wrong {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #7f1d1d !important;
}

@keyframes fg-pop {
  0%{transform:scale(1)} 50%{transform:scale(1.06)} 100%{transform:scale(1)}
}

/* ── Feedback ── */
#fg-feedback {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  min-height: 22px;
  margin-bottom: 10px;
  color: #1055bb;
}

/* ── Progress bar ── */
#fg-progress-wrap {
  height: 6px;
  background: #e0eaff;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}

#fg-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1055bb, #3b82f6);
  border-radius: 10px;
  width: 0%;
  transition: width .4s ease;
}

/* ── Start button ── */
#fg-start-button {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #1055bb, #3b82f6);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(16,85,187,.28);
  font-family: inherit;
}

#fg-start-button:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
#fg-start-button:disabled { opacity: .5; cursor: default; transform: none; }

/* ── Divider ── */
.fg-divider { border: none; border-top: 1px solid #e0eaff; margin: 22px 0; }

/* ── Leaderboard ── */
#fg-high-scores h3 {
  text-align: center;
  color: #1055bb;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

#fg-score-filter,
#fg-mode-filter {
  display: flex;
  background: #f0f5ff;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 8px;
}

#fg-score-filter button,
#fg-mode-filter button {
  flex: 1;
  padding: 7px 4px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #1055bb;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: background .2s, color .2s;
  font-family: inherit;
}

#fg-score-filter button.active,
#fg-mode-filter button.active {
  background: #1055bb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,85,187,.2);
}

#fg-score-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #c7d9ff #f0f5ff;
  padding-right: 6px;
}

#fg-score-list::-webkit-scrollbar {
  display: none;
}

#fg-score-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  margin-bottom: 5px;
  border-radius: 10px;
  background: #f0f5ff;
  border: 1px solid #e0eaff;
}

#fg-score-list li:first-child  { border-color: #fbbf24; background: #fffbeb; }
#fg-score-list li:nth-child(2) { border-color: #9ca3af; background: #f9fafb; }
#fg-score-list li:nth-child(3) { border-color: #cd7c2f; background: #fff7ed; }
#fg-score-list li.fg-loading   { justify-content: center; color: #aaa; background: transparent; border: none; }

.fg-score-left  { display: flex; align-items: center; gap: 8px; }
.fg-score-right { display: flex; align-items: center; gap: 6px; }
.fg-rank        { font-size: 14px; font-weight: 700; color: #6b7280; min-width: 24px; }
#fg-score-list li:first-child  .fg-rank { color: #d97706; }
#fg-score-list li:nth-child(2) .fg-rank { color: #6b7280; }
#fg-score-list li:nth-child(3) .fg-rank { color: #cd7c2f; }
.fg-score-name    { font-weight: 600; color: #0a2d6e; font-size: 14px; }
.fg-score-country { font-size: 11px; color: #9ca3af; }
.fg-mode-badge  { font-size: 11px; color: #6b9ade; font-weight: 600; }
.fg-acc-badge   { font-size: 11px; color: #6b7280; }
.fg-pts-badge   {
  background: linear-gradient(135deg, #1055bb, #3b82f6);
  color: #fff; border-radius: 20px;
  padding: 3px 10px; font-size: 13px; font-weight: 700;
}

/* ── Win overlay ── */
#fg-win-overlay {
  text-align: center;
  padding: 18px 16px;
  background: linear-gradient(135deg, #f0f5ff, #dce8ff);
  border-radius: 16px;
  border: 2px solid #a8c4f8;
  margin-bottom: 14px;
  display: none;
}
#fg-win-overlay h2 { color: #1055bb; font-size: 22px; margin: 0 0 6px; }
#fg-win-overlay p  { color: #0a2d6e; margin: 4px 0; font-size: 15px; }

/* ── Confetti ── */
#fg-confetti {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #fg-wrapper { padding: 18px 12px; }
  .fg-setup-row { flex-direction: column; }
  #fg-answers button { font-size: 13px; padding: 11px 6px; }
  #fg-question-display { font-size: 90px; }
}
#fg-score-list::-webkit-scrollbar { display: none; }

/* ── GeneratePress spacing fix ── */
.inside-article,
.entry-content,
.page-content {
  padding: 0 !important;
  margin: 0 !important;
}
.site-main,
#primary {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
