/* ═══════════════════════════════════════
   Multiplication Game — game.css v1.1
   ═══════════════════════════════════════ */

/* ── Reset scoped to wrapper ── */
#mg-wrapper * { box-sizing: border-box; }

/* ── Wrapper ── */
#mg-wrapper {
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 460px;
  margin: 40px auto;
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 40px rgba(106,27,154,.13);
  user-select: none;
}

/* ── Header ── */
#mg-wrapper h1 {
  font-size: 24px;
  text-align: center;
  color: #6a1b9a;
  margin: 0 0 22px;
  letter-spacing: -.3px;
}

/* ── Setup card (shown before game) ── */
#mg-setup {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#mg-setup label {
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 2px;
  display: block;
}

#mg-setup input,
#mg-setup select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid #ddd6fe;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #3b0764;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}

#mg-setup input:focus,
#mg-setup select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

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

.mg-setup-row {
  display: flex;
  gap: 10px;
}

.mg-setup-row > div { flex: 1; }

/* ── Game status bar ── */
#mg-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #faf5ff;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  min-height: 48px;
}

#mg-lives {
  font-size: 20px;
  letter-spacing: 3px;
}

#mg-score-board {
  font-size: 18px;
  font-weight: 800;
  color: #6a1b9a;
}

#mg-timer {
  font-size: 18px;
  font-weight: 800;
  color: #d32f2f;
  min-width: 52px;
  text-align: right;
  transition: color .3s;
}

#mg-timer.urgent {
  animation: mg-pulse .7s infinite;
}

@keyframes mg-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ── Streak ── */
#mg-streak {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #ea580c;
  min-height: 20px;
  margin-bottom: 8px;
}

/* ── Question ── */
#mg-question {
  font-size: 36px;
  font-weight: 800;
  color: #3b0764;
  text-align: center;
  min-height: 50px;
  margin: 0 0 18px;
  line-height: 1.1;
}

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

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

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

#mg-answers button {
  background: #faf5ff;
  color: #4a148c;
  border: 2px solid #e9d5ff;
  font-weight: 700;
  padding: 16px 0;
  border-radius: 14px;
  font-size: 20px;
  cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
  font-family: inherit;
}

#mg-answers button:hover:not(:disabled) {
  background: #ede9fe;
  border-color: #a78bfa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106,27,154,.12);
}

#mg-answers button:active:not(:disabled) {
  transform: translateY(0);
}

#mg-answers button:disabled { opacity: .55; cursor: default; }

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

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

@keyframes mg-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Start / Play again button ── */
#mg-start-button {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #6a1b9a);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: opacity .25s, transform .15s;
  box-shadow: 0 4px 16px rgba(106,27,154,.25);
  font-family: inherit;
}

#mg-start-button:hover:not(:disabled) {
  opacity: .92;
  transform: translateY(-1px);
}

#mg-start-button:disabled {
  opacity: .55;
  cursor: default;
  transform: none;
}

/* ── Motivation ── */
#mg-motivation {
  text-align: center;
  color: #6a1b9a;
  font-weight: 600;
  min-height: 22px;
  font-size: 14px;
  margin-top: 10px;
}

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

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

#mg-score-filter {
  display: flex;
  background: #faf5ff;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 12px;
}

#mg-score-filter button {
  flex: 1;
  padding: 7px 0;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #7c3aed;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background .2s, color .2s;
  font-family: inherit;
}

#mg-score-filter button.active {
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.2);
}

#mg-score-list {
  list-style: none;
  padding: 0;
  padding-right: 6px;
  font-size: 14px;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e9d5ff #faf5ff;
  -ms-overflow-style: auto;
  margin: 0;
}

#mg-score-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 5px;
  border-radius: 10px;
  background: #faf5ff;
  border: 1px solid #f0e6ff;
}

#mg-score-list li:first-child { border-color: #fbbf24; background: #fffbeb; }
#mg-score-list li:nth-child(2) { border-color: #9ca3af; background: #f9fafb; }
#mg-score-list li:nth-child(3) { border-color: #cd7c2f; background: #fff7ed; }

#mg-score-list li.mg-loading {
  justify-content: center;
  color: #888;
  background: transparent;
  border: none;
}

.mg-score-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mg-rank {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  min-width: 20px;
}

#mg-score-list li:first-child  .mg-rank { color: #d97706; }
#mg-score-list li:nth-child(2) .mg-rank { color: #6b7280; }
#mg-score-list li:nth-child(3) .mg-rank { color: #cd7c2f; }

.mg-score-name { font-weight: 600; color: #3b0764; }
.mg-score-country { font-size: 12px; color: #9ca3af; }

.mg-score-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mg-diff {
  font-size: 11px;
  color: #a78bfa;
  font-weight: 600;
  text-transform: capitalize;
}

.mg-badge {
  background: linear-gradient(135deg, #7c3aed, #6a1b9a);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 700;
}

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

/* ── Responsive ── */
@media (max-width: 480px) {
  #mg-wrapper { padding: 20px 14px; }
  #mg-answers button { font-size: 18px; padding: 14px 0; }
  .mg-setup-row { flex-direction: column; }
}

#mg-score-list::-webkit-scrollbar,
#memg-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;
}
