/* ---------- Design tokens ---------- */
:root {
  --bg-1: #1a0b2e;
  --bg-2: #3b0764;
  --accent: #7c3aed;
  --accent-bright: #a855f7;
  --pink: #f472b6;
  --gold: #fbbf24;
  --red: #ff4d5e;
  --blue: #3fa9ff;
  --ink: #f7f3ff;
  --ink-dim: rgba(247, 243, 255, 0.72);
  --panel-bg: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.12);
  --radius-lg: 28px;
  --radius-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(circle at 50% 0%, var(--bg-2), var(--bg-1) 65%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---------- Ad slots ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 728px;
  min-height: 60px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
}
.ad-slot--top { margin-top: 16px; }
.ad-slot--content { max-width: 336px; min-height: 100px; }
.ad-slot--bottom { min-height: 90px; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding-top: 12px;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.1rem, 9vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(135deg, var(--pink), var(--accent-bright) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  margin: 12px auto 0;
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 3vw, 1.1rem);
}

/* ---------- Click zone ---------- */
.click-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0 4px;
}

.main-button {
  --size: clamp(190px, 55vw, 300px);
  --btn-bright: var(--accent-bright);
  --btn-mid: var(--accent);
  --btn-dark: #5b21b6;
  --btn-glow: 124, 58, 237;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--btn-bright), var(--btn-mid) 60%, var(--btn-dark) 100%);
  box-shadow:
    0 0 0 8px rgba(var(--btn-glow), 0.15),
    0 20px 45px -12px rgba(var(--btn-glow), 0.65),
    inset 0 -6px 12px rgba(0, 0, 0, 0.25),
    inset 0 6px 12px rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  letter-spacing: 0.02em;
  touch-action: manipulation;
  user-select: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 220ms ease;
}

.main-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.main-button:active {
  transform: scale(0.94);
  box-shadow:
    0 0 0 8px rgba(var(--btn-glow), 0.15),
    0 10px 25px -10px rgba(var(--btn-glow), 0.6),
    inset 0 -3px 8px rgba(0, 0, 0, 0.3),
    inset 0 3px 8px rgba(255, 255, 255, 0.15);
}

.main-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 6px;
}

.main-button__label {
  pointer-events: none;
}

@keyframes btn-pop {
  0% { transform: scale(0.9); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.btn-pulse {
  animation: btn-pop 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes btn-shake-kf {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-6px) rotate(-3deg); }
  40% { transform: translateX(6px) rotate(3deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(4px) rotate(2deg); }
}
.btn-shake { animation: btn-shake-kf 420ms ease; }

.btn-shrink { transform: scale(0.6); }
.btn-grow { transform: scale(1.18); }

@keyframes btn-vanish-kf {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; transform: scale(0.7); }
}
.btn-vanish { animation: btn-vanish-kf 1s ease; }

.float-value {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold);
  pointer-events: none;
  animation: float-up 900ms ease-out forwards;
}
@keyframes float-up {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -320%) scale(1.3); }
}

.balloon {
  position: absolute;
  width: 44px;
  height: 52px;
  border-radius: 50% 50% 42% 42% / 58% 58% 46% 46%;
  background:
    radial-gradient(ellipse 38% 24% at 32% 24%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.2) 65%, transparent 100%),
    var(--balloon-color, #ef4444);
  box-shadow:
    inset -7px -9px 13px rgba(0, 0, 0, 0.25),
    inset 3px 4px 8px rgba(255, 255, 255, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.75);
  z-index: 5;
}
.balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 9px;
  height: 9px;
  background: var(--balloon-color, #ef4444);
  filter: brightness(0.78);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: translateX(-50%);
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 10px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 30'%3E%3Cpath d='M5 0 Q8 5 5 10 Q2 15 5 20 Q8 25 5 30' stroke='rgba(0,0,0,0.3)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transform: translateX(-50%);
}
.balloon.is-rising {
  animation: balloon-rise var(--rise-duration, 2600ms) cubic-bezier(0.25, 0.7, 0.4, 1) forwards;
}
@keyframes balloon-rise {
  0% { transform: translate(-50%, 0) scale(0.75); opacity: 0; }
  12% { opacity: 1; }
  55% {
    transform: translate(calc(-50% + var(--drift, 0px) * 0.6), calc(var(--rise-distance, -300px) * 0.55))
      scale(1);
  }
  100% {
    transform: translate(calc(-50% + var(--drift, 0px)), var(--rise-distance, -300px)) scale(1.05);
    opacity: 1;
  }
}

.balloon-pop-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--particle-color, #fff);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: balloon-pop-kf 480ms ease-out forwards;
}
@keyframes balloon-pop-kf {
  0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
  100% {
    transform: translate(-50%, -50%) translate(var(--tx, 0), var(--ty, 0)) scale(0.3);
    opacity: 0;
  }
}

.rocket {
  position: absolute;
  width: 28px;
  height: 56px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0) rotate(var(--start-tilt, 0deg)) scale(0.6);
  z-index: 6;
}
.rocket svg {
  width: 100%;
  height: 100%;
  display: block;
}
.rocket__flame {
  transform-box: fill-box;
  transform-origin: 50% 0%;
  animation: flame-flicker-kf 140ms ease-in-out infinite alternate;
}
@keyframes flame-flicker-kf {
  0% { transform: scaleY(1) scaleX(1); }
  100% { transform: scaleY(1.25) scaleX(0.88); }
}
.rocket.is-launching {
  animation: rocket-launch-kf var(--flight-duration, 1100ms) cubic-bezier(0.55, 0, 0.85, 0.35) forwards;
}
@keyframes rocket-launch-kf {
  0% { opacity: 0; transform: translate(-50%, 0) rotate(var(--start-tilt, 0deg)) scale(0.6); }
  10% { opacity: 1; transform: translate(-50%, -6%) rotate(var(--start-tilt, 0deg)) scale(0.75); }
  25% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift, 0px) * 0.12), calc(var(--rise-distance, -1000px) * 0.12))
      rotate(var(--end-tilt, 0deg)) scale(0.85);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift, 0px)), var(--rise-distance, -1000px))
      rotate(var(--end-tilt, 0deg)) scale(0.3);
  }
}

.rocket-exhaust {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fde68a, #fb923c 60%, transparent 75%);
  transform: translate(-50%, -50%);
  animation: exhaust-fade-kf 520ms ease-out forwards;
}
@keyframes exhaust-fade-kf {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.6); }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--ex-dx, 0px)), calc(-50% + var(--ex-dy, 24px))) scale(1.8);
  }
}

.ufo {
  position: absolute;
  left: 50%;
  width: 110px;
  height: 55px;
  pointer-events: none;
  opacity: 0;
  z-index: 8;
  transform: translate(calc(-50% - 260px), 0) rotate(-6deg);
}
.ufo svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}
.ufo.is-active {
  animation: ufo-flight-kf 2300ms ease-in-out forwards;
}
@keyframes ufo-flight-kf {
  0% { opacity: 0; transform: translate(calc(-50% - 260px), 0) rotate(-6deg); }
  18% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); }
  78% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate(calc(-50% + 280px), -24px) rotate(8deg); }
}

.ufo-beam {
  position: absolute;
  width: 90px;
  transform-origin: top center;
  transform: translate(-50%, 0) scaleY(0.6);
  background: linear-gradient(to bottom, rgba(165, 243, 252, 0.55), rgba(165, 243, 252, 0.08) 70%, transparent 100%);
  clip-path: polygon(38% 0%, 62% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
  opacity: 0;
  z-index: 7;
}
.ufo-beam.is-active {
  animation: ufo-beam-kf 2300ms ease-in-out forwards;
}
@keyframes ufo-beam-kf {
  0%, 15% { opacity: 0; transform: translate(-50%, 0) scaleY(0.6); }
  25% { opacity: 0.55; transform: translate(-50%, 0) scaleY(1); }
  70% { opacity: 0.55; transform: translate(-50%, 0) scaleY(1); }
  80%, 100% { opacity: 0; transform: translate(-50%, 0) scaleY(0.6); }
}

.ufo-abductee {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 35% 30%, var(--accent-bright), var(--accent) 60%, #5b21b6 100%);
  box-shadow:
    0 0 0 8px rgba(124, 58, 237, 0.15),
    0 20px 45px -12px rgba(124, 58, 237, 0.65),
    inset 0 -6px 12px rgba(0, 0, 0, 0.25),
    inset 0 6px 12px rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  z-index: 9;
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
}
.ufo-abductee.is-active {
  animation: ufo-abductee-kf 2300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes ufo-abductee-kf {
  0%, 18% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  45% {
    opacity: 1;
    transform: translate(-50%, calc(-50% + var(--lift, -140px))) scale(0.18) rotate(14deg);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, calc(-50% + var(--lift, -140px))) scale(0.16) rotate(-10deg);
  }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-4deg); }
  92% { opacity: 1; transform: translate(-50%, -50%) scale(0.98) rotate(2deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.duck {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}
.duck.is-crossing-ltr {
  animation: duck-cross-ltr-kf var(--duck-duration, 3800ms) ease-in-out forwards;
}
@keyframes duck-cross-ltr-kf {
  /* The duck emoji faces left by default, so the left-to-right (rightward)
     crossing is the one that needs the horizontal flip. */
  0% { opacity: 0; transform: translate(0, 0) scaleX(-1) rotate(-3deg); }
  8% { opacity: 1; }
  25% { transform: translate(calc(var(--cross-distance, 0px) * 0.25), -16px) scaleX(-1) rotate(4deg); }
  50% { transform: translate(calc(var(--cross-distance, 0px) * 0.5), 0) scaleX(-1) rotate(-3deg); }
  75% { transform: translate(calc(var(--cross-distance, 0px) * 0.75), -16px) scaleX(-1) rotate(4deg); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--cross-distance, 0px), 0) scaleX(-1) rotate(-3deg); }
}

.duck.is-crossing-rtl {
  animation: duck-cross-rtl-kf var(--duck-duration, 3800ms) ease-in-out forwards;
}
@keyframes duck-cross-rtl-kf {
  0% { opacity: 0; transform: translate(0, 0) rotate(-3deg); }
  8% { opacity: 1; }
  25% { transform: translate(calc(var(--cross-distance, 0px) * 0.25), -16px) rotate(4deg); }
  50% { transform: translate(calc(var(--cross-distance, 0px) * 0.5), 0) rotate(-3deg); }
  75% { transform: translate(calc(var(--cross-distance, 0px) * 0.75), -16px) rotate(4deg); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--cross-distance, 0px), 0) rotate(-3deg); }
}

.fire-particle {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  z-index: 6;
  animation-name: fire-rise-kf;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
@keyframes fire-rise-kf {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(0deg); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(-6deg); }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--fire-drift, 0px)), calc(-50% + var(--fire-rise, -120px))) scale(0.9)
      rotate(8deg);
  }
}

.donut-rain-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1000;
}
.donut-rain-particle {
  position: absolute;
  top: -60px;
  opacity: 0;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  animation-name: donut-fall-kf;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes donut-fall-kf {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  3% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate(var(--donut-drift, 0px), calc(100vh + 120px)) rotate(var(--donut-spin, 360deg));
  }
}

.click-counter {
  margin: 0;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  font-weight: 700;
}
.counter-pop {
  animation: counter-pop-kf 200ms ease;
}
@keyframes counter-pop-kf {
  0% { transform: scale(1.15); color: var(--gold); }
  100% { transform: scale(1); color: var(--ink); }
}

.event-message {
  min-height: 1.4em;
  margin: 0;
  font-weight: 800;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  text-align: center;
  color: var(--pink);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.event-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Panels ---------- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  backdrop-filter: blur(6px);
}
.panel--dark {
  background: rgba(0, 0, 0, 0.25);
}
.panel--explainer {
  text-align: center;
  color: var(--ink-dim);
  line-height: 1.6;
}
.panel__heading {
  margin: 0 0 18px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Achievements ---------- */
.achievements-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  opacity: 0.45;
  text-align: center;
}
.achievement-badge.is-unlocked {
  opacity: 1;
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.18), rgba(124, 58, 237, 0.18));
  border-color: rgba(251, 191, 36, 0.45);
}
.achievement-badge__icon { font-size: 1.4rem; }
.achievement-badge__title {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}
.achievement-badge__threshold {
  font-size: 0.6rem;
  color: var(--ink-dim);
}

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}
.stat-card__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold);
}
.stat-card__label {
  font-size: 0.72rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Global stats ---------- */
.global-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.global-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.global-stat__value {
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.global-stat__label {
  font-size: 0.75rem;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Button war ---------- */
.team-your-team {
  text-align: center;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink-dim);
}
.team-bar {
  display: flex;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}
.team-bar__fill {
  height: 100%;
  transition: width 400ms ease;
}
.team-bar__fill--red { background: linear-gradient(90deg, #ff4d5e, #ff7a86); }
.team-bar__fill--blue { background: linear-gradient(90deg, #3fa9ff, #7cc6ff); }

.team-totals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.team-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
}
.team-total--red { background: rgba(255, 77, 94, 0.12); }
.team-total--blue { background: rgba(63, 169, 255, 0.12); }
.team-total__label { font-size: 0.8rem; font-weight: 700; }
.team-total__value { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Leaderboard ---------- */
.leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard__row {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}
.leaderboard__rank {
  font-weight: 800;
  color: var(--gold);
}
.leaderboard__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard__clicks {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.leaderboard__row--you {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.22), rgba(124, 58, 237, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: rgba(247, 243, 255, 0.4);
  font-size: 0.8rem;
  padding-top: 8px;
}

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.reset-button,
.donate-button {
  margin-top: 0;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(247, 243, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.reset-button {
  color: rgba(247, 243, 255, 0.35);
}
.reset-button:hover,
.reset-button:focus-visible {
  color: var(--red);
  border-color: rgba(255, 77, 94, 0.5);
  background: rgba(255, 77, 94, 0.08);
}
.reset-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.donate-button {
  color: rgba(251, 191, 36, 0.7);
  border-color: rgba(251, 191, 36, 0.3);
}
.donate-button:hover,
.donate-button:focus-visible {
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.1);
}
.donate-button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Achievement toast ---------- */
.achievement-toast-container {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 360px);
}
.achievement-toast {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: #1a0b2e;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-16px) scale(0.9);
  transition: opacity 220ms ease, transform 220ms ease;
}
.achievement-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.achievement-toast__eyebrow {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.achievement-toast__title {
  font-size: 0.95rem;
  font-weight: 800;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .page {
    padding: 0 24px 56px;
    gap: 64px;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
