@charset "utf-8";

:root {
  --bg: #eef4ff;
  --card: #ffffff;
  --ink: #1f2d3d;
  --muted: #5b6b7c;
  --blue: #4f7cff;
  --blue-2: #6f8bff;
  --mint: #2fd4a6;
  --mint-2: #18b98a;
  --pink: #ff7aa2;
  --yellow: #ffcf5c;
  --radius: 24px;
  --shadow: 0 12px 30px rgba(31, 45, 61, 0.10);
  --shadow-hover: 0 20px 44px rgba(31, 45, 61, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: "Nunito", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dfe9ff 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, #ffe3ee 0%, transparent 55%),
    linear-gradient(180deg, var(--bg), #f7faff);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  transition: background 0.4s ease;
}

/* ---------- Header / Container ---------- */
.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

h1.title, .container > h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}

.container > h2 {
  text-align: center;
  color: var(--muted);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 800;
  margin-bottom: 26px;
}

/* ---------- Back button ---------- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 18px;
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(79, 124, 255, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.back-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.back-btn:active { transform: scale(0.97); }
.back-btn svg { width: 20px; height: 20px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 16px 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card:active { transform: scale(0.99); }

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  border: 3px solid transparent;
  transition: border-color 0.2s ease;
}

/* Colored themes */
.card.mouse-theme {
  border-color: #dfe7ff;
  background: linear-gradient(160deg, #ffffff 0%, #eef3ff 100%);
}
.card.mouse-theme::after { border-color: #c7d6ff; }
.card.elephant-theme {
  border-color: #d7f7ee;
  background: linear-gradient(160deg, #ffffff 0%, #e8fbf5 100%);
}
.card.elephant-theme::after { border-color: #bff0e2; }

.card .emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 6px;
  line-height: 1;
}

.game-card { text-align: center; }
.game-title {
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--blue);
}
.elephant-theme .game-title { color: var(--mint-2); }
.game-info {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.btn, .game-btn, .next-btn {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  min-height: 52px;
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.30);
  font-family: inherit;
}
.btn:hover, .game-btn:hover, .next-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px rgba(79, 124, 255, 0.38);
}
.btn:active, .game-btn:active, .next-btn:active { transform: scale(0.97); }

.elephant-theme .game-btn { background: linear-gradient(135deg, var(--mint), var(--mint-2)); box-shadow: 0 8px 18px rgba(47, 212, 166, 0.32); }

.next-btn { background: linear-gradient(135deg, var(--mint), var(--mint-2)); box-shadow: 0 8px 18px rgba(47, 212, 166, 0.30); }
.next-btn:disabled { background: #cfd8e3; color: #fff; box-shadow: none; cursor: not-allowed; }

/* ---------- Fullscreen ---------- */
.fullscreen-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  background: #fff;
  border: 3px solid var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.25);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  color: var(--blue);
}
.fullscreen-btn:hover { transform: scale(1.06); }
.fullscreen-btn:active { transform: scale(0.9); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Game helpers ---------- */
.score { font-size: 1.15rem; color: var(--muted); font-weight: 700; margin-top: 8px; }
.feedback { margin: 16px 0; font-size: 1.3rem; font-weight: 900; min-height: 34px; }
.play-area { text-align: center; margin-top: 24px; }
.controls { margin-top: 24px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.objects { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 22px 0; }
.obj {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(160deg, #fff, #e3edff);
  border: 3px solid #c7d6ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer; user-select: none;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.obj:active { transform: scale(0.88); }
.obj.counted { background: linear-gradient(160deg, #c8f5e3, #9fecc9); border-color: var(--mint-2); }

.alphabet-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.letter-choice {
  width: 72px; height: 72px; border-radius: 18px;
  background: #fff; border: 3px solid #c7d6ff;
  font-size: 1.9rem; font-weight: 900; color: var(--blue);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  user-select: none;
}
.letter-choice:hover { transform: translateY(-3px); background: #eef3ff; }
.letter-choice:active { transform: scale(0.92); }
.letter-choice.correct { background: #d6f7e6; border-color: var(--mint-2); color: var(--mint-2); }
.letter-choice.wrong { background: #ffe0e8; border-color: var(--pink); color: #e23c6b; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .container { padding: 10px; }
  .card { padding: 22px; margin: 12px 0; }
  .card .emoji { font-size: 2.4rem; }
  .fullscreen-btn { width: 48px; height: 48px; top: 12px; right: 12px; }
  .btn, .game-btn, .next-btn { padding: 13px 22px; min-height: 48px; font-size: 1.05rem; }
  .obj { width: 50px; height: 50px; font-size: 1.4rem; }
  .letter-choice { width: 62px; height: 62px; font-size: 1.6rem; }
}
