@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --blue: #3B82F6;
  --light-blue: #60A5FA;
  --sky: #BAE6FD;
  --pink: #EC4899;
  --light-pink: #F9A8D4;
  --yellow: #F59E0B;
  --light-yellow: #FDE68A;
  --green: #10B981;
  --light-green: #6EE7B7;
  --purple: #8B5CF6;
  --orange: #F97316;
  --red: #EF4444;
  --white: #FFFFFF;
  --dark: #1E1B4B;
  --radius: 24px;
  --radius-lg: 40px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.25);
  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #fce7f3 50%, #fef3c7 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--dark);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--sky);
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 10px;
}

/* ===== FLOATING BACKGROUND ELEMENTS ===== */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  animation: floatShape 8s ease-in-out infinite;
}

.bg-shape:nth-child(1) {
  width: 300px;
  height: 300px;
  background: var(--blue);
  top: -50px;
  left: -80px;
  animation-delay: 0s;
}

.bg-shape:nth-child(2) {
  width: 200px;
  height: 200px;
  background: var(--pink);
  top: 20%;
  right: -60px;
  animation-delay: 2s;
}

.bg-shape:nth-child(3) {
  width: 250px;
  height: 250px;
  background: var(--yellow);
  bottom: 10%;
  left: 10%;
  animation-delay: 4s;
}

.bg-shape:nth-child(4) {
  width: 180px;
  height: 180px;
  background: var(--green);
  bottom: -40px;
  right: 20%;
  animation-delay: 1s;
}

.bg-shape:nth-child(5) {
  width: 150px;
  height: 150px;
  background: var(--purple);
  top: 50%;
  left: 40%;
  animation-delay: 3s;
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  33% {
    transform: translateY(-30px) rotate(10deg);
  }

  66% {
    transform: translateY(15px) rotate(-5deg);
  }
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--blue) 50%, var(--purple) 100%);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--white);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

.brand-text {
  display: block;
}

@media (max-width: 400px) {
  .brand-text {
    display: none;
  }
}

.navbar-brand .logo-icon {
  font-size: 2rem;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
  border: 2px solid transparent;
}

.nav-link:hover {
  background: var(--white);
  color: var(--blue);
  transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--white);
  border-radius: 10px;
  transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--blue);
    flex-direction: column;
    justify-content: center;
    padding: 60px 20px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
  }

  .navbar-links.active {
    right: 0;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    padding: 15px;
  }
}

/* Music Toggle */
.music-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 2000;
  background: var(--yellow);
  border: none;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

.music-toggle:hover {
  transform: scale(1.15) rotate(10deg);
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4)
  }

  50% {
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.8)
  }
}

/* ===== HERO BANNER ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #1e40af 0%, #3b82f6 40%, #60a5fa 70%, #bae6fd 100%);
  padding: 60px 20px 120px;
}

/* Clouds */
.hero-clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

.cloud-1 {
  width: 160px;
  height: 60px;
  top: 15%;
  left: -180px;
  animation: cloudMove 18s linear infinite;
}

.cloud-1::before {
  width: 80px;
  height: 80px;
  top: -40px;
  left: 20px;
}

.cloud-1::after {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 70px;
}

.cloud-2 {
  width: 200px;
  height: 70px;
  top: 30%;
  left: -220px;
  animation: cloudMove 24s linear infinite 6s;
}

.cloud-2::before {
  width: 100px;
  height: 100px;
  top: -50px;
  left: 30px;
}

.cloud-2::after {
  width: 80px;
  height: 80px;
  top: -40px;
  left: 90px;
}

.cloud-3 {
  width: 140px;
  height: 50px;
  top: 8%;
  left: -160px;
  animation: cloudMove 20s linear infinite 12s;
}

.cloud-3::before {
  width: 70px;
  height: 70px;
  top: -35px;
  left: 15px;
}

.cloud-3::after {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 60px;
}

@keyframes cloudMove {
  from {
    left: -220px;
  }

  to {
    left: 110%;
  }
}

/* Balloons */
.hero-balloons {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.balloon {
  position: absolute;
  bottom: 0;
  font-size: 2.5rem;
  animation: balloonFloat 4s ease-in-out infinite;
}

.balloon:nth-child(1) {
  left: 5%;
  animation-delay: 0s;
}

.balloon:nth-child(2) {
  left: 15%;
  animation-delay: 0.5s;
  font-size: 3rem;
}

.balloon:nth-child(3) {
  right: 8%;
  animation-delay: 1s;
}

.balloon:nth-child(4) {
  right: 20%;
  animation-delay: 1.5s;
  font-size: 2rem;
}

.balloon:nth-child(5) {
  left: 40%;
  animation-delay: 0.8s;
  font-size: 3.5rem;
}

@keyframes balloonFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg)
  }

  50% {
    transform: translateY(-20px) rotate(5deg)
  }
}

/* Stars */
.hero-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.star {
  position: absolute;
  color: var(--yellow);
  font-size: 1.2rem;
  animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.3;
    transform: scale(0.6)
  }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--white);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2), 6px 6px 0 rgba(0, 0, 0, 0.1);
  line-height: 1.1;
  margin-bottom: 16px;
  animation: heroTitleAnim 1s ease-out;
}

@keyframes heroTitleAnim {
  from {
    opacity: 0;
    transform: translateY(-40px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  margin-bottom: 40px;
  animation: heroTitleAnim 1s ease-out 0.2s both;
}

/* Wave divider */
.wave-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
}

.wave-divider svg {
  display: block;
}

/* ===== AGE BUTTONS ===== */
.age-buttons {
  position: relative;
  z-index: 3;
  margin-top: -60px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 0 20px 40px;
}

.age-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: clamp(260px, 40vw, 340px);
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.age-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.age-btn:hover::before {
  opacity: 1;
}

.age-btn:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.age-btn:active {
  transform: translateY(-2px) scale(0.98);
}

.age-btn-tiny {
  background: linear-gradient(135deg, var(--pink) 0%, #f472b6 50%, var(--orange) 100%);
  color: var(--white);
}

.age-btn-big {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  color: var(--white);
}

.age-btn-icon {
  font-size: 3.5rem;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {

  0%,
  100% {
    transform: rotate(-5deg)
  }

  50% {
    transform: rotate(5deg)
  }
}

.age-btn-title {
  font-size: 1.8rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

.age-btn-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.9;
}

/* ===== SECTION STYLES ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 50px 20px;
}

.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.8rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 40px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== GAMES GRID ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 3px solid transparent;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

@media (max-width: 480px) {
  .section {
    padding: 30px 15px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .game-container {
    padding: 20px 10px 40px;
  }

  .game-card {
    padding: 20px 12px;
  }

  .game-card-icon {
    font-size: 3rem;
  }

  .age-btn {
    width: 100%;
    padding: 20px;
  }
}

.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: var(--shadow-hover);
}

.game-card:hover::after {
  opacity: 1;
}

.game-card-1 {
  border-color: var(--pink);
  background: linear-gradient(135deg, #fff0f6, #fff);
}

.game-card-2 {
  border-color: var(--green);
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.game-card-3 {
  border-color: var(--yellow);
  background: linear-gradient(135deg, #fffbeb, #fff);
}

.game-card-4 {
  border-color: var(--blue);
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.game-card-5 {
  border-color: var(--purple);
  background: linear-gradient(135deg, #faf5ff, #fff);
}

.game-card-icon {
  font-size: 4rem;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.15));
}

.game-card-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.game-card-desc {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 600;
}

.game-card-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  letter-spacing: 0.5px;
}

/* ===== AGE PAGE HEADER ===== */
.page-header {
  position: relative;
  z-index: 1;
  padding: 60px 20px 100px;
  text-align: center;
  overflow: hidden;
}

.page-header-tiny {
  background: linear-gradient(135deg, #f9a8d4, #fb923c, #fde68a);
}

.page-header-big {
  background: linear-gradient(135deg, #60a5fa, #818cf8, #a78bfa);
}

.page-header-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--white);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
}

.page-header-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
  text-decoration: none;
}

.back-btn:hover {
  background: var(--white);
  color: var(--blue);
}

/* ===== IN-GAME STYLES ===== */
.game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 20px 60px;
  position: relative;
  z-index: 1;
}

.game-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.game-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.score-badge {
  background: var(--white);
  border-radius: 50px;
  padding: 8px 24px;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
}

.btn-success {
  background: linear-gradient(135deg, var(--green), #059669);
  color: var(--white);
}

.btn-warning {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--white);
}

.btn-danger {
  background: linear-gradient(135deg, var(--pink), var(--red));
  color: var(--white);
}

.btn-lg {
  font-size: 1.3rem;
  padding: 18px 44px;
}

/* ===== GAME CANVAS AREA ===== */
.game-canvas-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 700px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--dark) 0%, #312e81 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 50px 20px 30px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-desc {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--yellow);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col ul li a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.modal-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.modal-text {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 24px;
}

.modal-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 22px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 300px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 5px solid var(--green);
}

.toast.error {
  border-left: 5px solid var(--red);
}

.toast.info {
  border-left: 5px solid var(--blue);
}

/* ===== SPINNER ===== */
.spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 6px solid var(--sky);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .navbar-links {
    justify-content: center;
  }

  .age-buttons {
    margin-top: -40px;
  }

  .age-btn {
    width: 100%;
    max-width: 340px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .game-card {
    padding: 20px 14px;
  }

  .game-card-icon {
    font-size: 3rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .game-canvas-wrap {
    padding: 16px;
  }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  animation: fadeIn 0.6s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.pop-in {
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-10px)
  }

  75% {
    transform: translateX(10px)
  }
}

.celebrate {
  animation: celebrate 0.6s ease;
}

@keyframes celebrate {
  0% {
    transform: scale(1)
  }

  30% {
    transform: scale(1.3) rotate(-5deg)
  }

  60% {
    transform: scale(0.9) rotate(5deg)
  }

  100% {
    transform: scale(1)
  }
}

/* ===== GAME-SPECIFIC BALLOON POP ===== */
.balloon-game-area {
  width: 100%;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 100%);
  border-radius: var(--radius);
  cursor: crosshair;
}

.game-balloon {
  position: absolute;
  font-size: 3.5rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
  animation: riseUp linear forwards;
}

.game-balloon:hover {
  transform: scale(1.1);
}

@keyframes riseUp {
  from {
    bottom: -80px;
    opacity: 1
  }

  to {
    bottom: 110%;
    opacity: 0.5
  }
}

/* ===== MEMORY CARD GAME ===== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  border-radius: 16px;
  cursor: pointer;
  perspective: 600px;
  position: relative;
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: bold;
}

.memory-card-front {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  font-size: 1.5rem;
}

.memory-card-back {
  background: var(--white);
  transform: rotateY(180deg);
  border: 3px solid var(--light-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.memory-card.matched .memory-card-back {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border-color: var(--green);
}

/* ===== MATH QUIZ ===== */
.math-question {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(3rem, 10vw, 5rem);
  text-align: center;
  margin: 20px 0;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.math-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 400px;
  margin: 0 auto;
}

.math-option {
  padding: 18px;
  border-radius: var(--radius);
  border: 3px solid var(--light-blue);
  background: var(--white);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--dark);
}

.math-option:hover {
  border-color: var(--blue);
  transform: scale(1.05);
  background: var(--sky);
}

.math-option.correct {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  border-color: var(--green);
  color: var(--dark);
}

.math-option.wrong {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  border-color: var(--red);
  color: var(--dark);
}

/* ===== PUZZLE SLIDE ===== */
.puzzle-grid {
  display: grid;
  gap: 4px;
  background: var(--dark);
  border-radius: 16px;
  padding: 4px;
  box-shadow: var(--shadow);
}

.puzzle-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  color: var(--white);
  text-shadow: 1px 2px 0 rgba(0, 0, 0, 0.3);
  user-select: none;
}

.puzzle-tile:hover:not(.empty) {
  filter: brightness(1.15);
  transform: scale(0.97);
}

.puzzle-tile.empty {
  background: rgba(255, 255, 255, 0.05) !important;
  cursor: default;
}

/* ===== CAR RACING ===== */
.racing-road {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #374151;
  margin: 0 auto;
}

.lane-line {
  position: absolute;
  width: 8px;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(to bottom, #fbbf24 0, #fbbf24 30px, transparent 30px, transparent 60px);
  animation: laneScroll 0.5s linear infinite;
}

@keyframes laneScroll {
  from {
    background-position: 0 0
  }

  to {
    background-position: 0 60px
  }
}

.player-car {
  position: absolute;
  font-size: 2.8rem;
  transition: left 0.1s;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.enemy-car {
  position: absolute;
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  animation: carMove linear forwards;
}

@keyframes carMove {
  from {
    top: -80px
  }

  to {
    top: 110%
  }
}

/* ===== COLOR MATCH ===== */
.color-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 360px;
  width: 100%;
}

.color-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 4px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.color-swatch:hover {
  transform: scale(1.08);
}

.color-swatch.selected {
  border-color: var(--dark);
  transform: scale(0.95);
}

.color-target {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  margin: 20px auto;
  border: 6px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

/* ===== ABC TAP ===== */
.abc-display {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(5rem, 20vw, 10rem);
  text-align: center;
  line-height: 1;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.1));
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.abc-display:hover {
  transform: scale(1.05) rotate(-3deg);
}

.abc-word {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--purple);
  text-align: center;
  margin-top: 10px;
}

.abc-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 600px;
  margin: 20px auto 0;
}

.abc-key {
  width: 52px;
  height: 52px;
  background: var(--white);
  border: 3px solid var(--sky);
  border-radius: 14px;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: var(--blue);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--light-blue);
}

.abc-key:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 0 #1d4ed8;
}

.abc-key:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 #1d4ed8;
}

/* ===== SHAPE MATCHING ===== */
.shape-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.shape-svg {
  width: 120px;
  height: 120px;
  filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.15));
}

.shape-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 480px;
}

.shape-option {
  background: var(--white);
  border: 4px solid var(--sky);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.shape-option:hover {
  transform: scale(1.08);
  border-color: var(--blue);
}

.shape-option.correct {
  border-color: var(--green);
  background: #d1fae5;
}

.shape-option.wrong {
  border-color: var(--red);
  background: #fee2e2;
}

/* ===== WORD BUILDER ===== */
.word-display {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.letter-slot {
  width: 54px;
  height: 64px;
  border-radius: 14px;
  border: 3px solid var(--sky);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--dark);
  box-shadow: 0 3px 0 var(--light-blue);
  transition: var(--transition);
}

.letter-slot.filled {
  border-color: var(--green);
  background: #d1fae5;
  color: var(--green);
}

.letter-slot.wrong {
  border-color: var(--red);
  background: #fee2e2;
  animation: shake 0.5s;
}

.word-hint {
  font-size: 1.3rem;
  text-align: center;
  color: var(--purple);
  font-weight: 800;
  margin-bottom: 10px;
}

.letter-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 500px;
  margin: 16px auto 0;
}

.letter-choice {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 0 #1d4ed8;
  border: none;
}

.letter-choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 #1d4ed8;
}

.letter-choice:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 #1d4ed8;
}

.letter-choice.used {
  opacity: 0.3;
  pointer-events: none;
}

/* ===== LEVEL SELECTOR ===== */
.level-selector {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.level-btn {
  padding: 10px 22px;
  border-radius: 50px;
  border: 3px solid transparent;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.level-btn.easy {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  color: #065f46;
  border-color: #6ee7b7;
}

.level-btn.medium {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  border-color: #fde68a;
}

.level-btn.hard {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  color: #7f1d1d;
  border-color: #fca5a5;
}

.level-btn.expert {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
  color: #4c1d95;
  border-color: #c4b5fd;
}

.level-btn.active {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.level-btn:hover {
  transform: scale(1.05) translateY(-2px);
}

.level-label {
  text-align: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: 50px;
  color: var(--white);
  margin-bottom: 12px;
  display: inline-block;
}

.level-easy {
  background: linear-gradient(135deg, var(--green), #059669);
}

.level-medium {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
}

.level-hard {
  background: linear-gradient(135deg, var(--pink), var(--red));
}

.level-expert {
  background: linear-gradient(135deg, var(--purple), #6d28d9);
}

.xp-bar-wrap {
  width: 100%;
  max-width: 400px;
  height: 16px;
  background: #e5e7eb;
  border-radius: 50px;
  overflow: hidden;
  margin: 8px auto;
}

.xp-bar {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.5s ease;
}

/* ===== WHACK-A-MOLE ===== */
.mole-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}

.mole-hole {
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #92400e 0%, #78350f 100%);
  border: 5px solid #451a03;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 -8px 16px rgba(0, 0, 0, 0.3);
  transition: transform .1s;
}

.mole-hole:active {
  transform: scale(0.94);
}

.mole-inner {
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2.5rem, 10vw, 4rem);
  transition: bottom 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.3));
}

.mole-hole.active .mole-inner {
  bottom: 0;
}

.mole-hole.hit .mole-inner {
  bottom: -100%;
}

.mole-whack-fx {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  pointer-events: none;
  z-index: 10;
  animation: whackFx .5s ease-out forwards;
}

@keyframes whackFx {
  to {
    transform: translate(-50%, -120%) scale(1.8);
    opacity: 0;
  }
}

/* ===== COUNTING GAME ===== */
.counting-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 16px auto;
  min-height: 120px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.count-item {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  animation: popIn .4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.15));
  cursor: default;
  user-select: none;
}

.count-answer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 380px;
  margin: 0 auto;
}

.count-option {
  padding: 16px 8px;
  border-radius: 18px;
  border: 3px solid var(--sky);
  background: var(--white);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.count-option:hover {
  border-color: var(--blue);
  transform: scale(1.07);
  background: var(--sky);
}

.count-option.correct {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  border-color: var(--green);
}

.count-option.wrong {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  border-color: var(--red);
}

/* ===== FRUIT CATCH (canvas) ===== */
#fruitCanvas {
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  touch-action: none;
  max-width: 100%;
}

/* ===== FIND THE ODD ONE OUT ===== */
.odd-grid {
  display: grid;
  gap: 14px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.odd-item {
  aspect-ratio: 1;
  border-radius: 20px;
  border: 4px solid transparent;
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 8vw, 3.5rem);
  box-shadow: var(--shadow);
}

.odd-item:hover {
  transform: scale(1.08);
  border-color: var(--blue);
}

.odd-item.correct {
  border-color: var(--green);
  background: #d1fae5;
  animation: celebrate .5s;
}

.odd-item.wrong {
  border-color: var(--red);
  background: #fee2e2;
  animation: shake .5s;
}

/* ===== COLORING BOOK ===== */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.palette-color {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid transparent;
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.palette-color:hover {
  transform: scale(1.2);
}

.palette-color.active {
  border-color: var(--dark);
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.coloring-svg {
  width: 100%;
  max-width: 360px;
  cursor: crosshair;
}

.coloring-svg path,
.coloring-svg circle,
.coloring-svg rect,
.coloring-svg polygon {
  transition: fill .2s;
  stroke: #1e1b4b;
  stroke-width: 3;
}

.coloring-svg .colorable:hover {
  filter: brightness(1.1);
}

/* ===== SNAKE GAME ===== */
#snakeCanvas {
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  image-rendering: pixelated;
  max-width: 100%;
  touch-action: none;
}

.snake-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.dpad-row {
  display: flex;
  gap: 6px;
}

.sdpad-btn {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  transition: all .1s;
  box-shadow: 0 4px 0 #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sdpad-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #94a3b8;
}

/* ===== TYPING SPEED ===== */
.typing-text {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.8;
  max-width: 600px;
  box-shadow: var(--shadow);
  margin: 0 auto 16px;
  text-align: left;
  border: 3px solid var(--sky);
}

.typing-text .char-correct {
  color: var(--green);
}

.typing-text .char-wrong {
  color: var(--red);
  background: #fee2e2;
  border-radius: 4px;
}

.typing-text .char-current {
  background: var(--yellow);
  border-radius: 4px;
  animation: blink .7s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

.typing-input {
  width: 100%;
  max-width: 600px;
  padding: 14px 20px;
  border-radius: 50px;
  border: 3px solid var(--sky);
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
  transition: border .2s;
  margin-bottom: 12px;
}

.typing-input:focus {
  border-color: var(--blue);
}

.typing-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.typing-stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.typing-stat-val {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--blue);
}

.typing-stat-lbl {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 700;
}

/* ===== TIC TAC TOE ===== */
.ttt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
  width: 100%;
}

.ttt-cell {
  aspect-ratio: 1;
  border-radius: 20px;
  border: 4px solid var(--sky);
  background: var(--white);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 8vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ttt-cell:hover:not(.taken) {
  background: var(--sky);
  transform: scale(1.05);
}

.ttt-cell.x {
  color: var(--blue);
}

.ttt-cell.o {
  color: var(--pink);
}

.ttt-cell.win {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: var(--yellow);
  animation: celebrate .5s;
}

.ttt-status {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  text-align: center;
  margin: 12px 0;
}

.ttt-score {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.ttt-score-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  min-width: 80px;
}

.ttt-score-box .val {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
}

.ttt-score-box .lbl {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 700;
}

/* ===== NUMBER SEQUENCE ===== */
.seq-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  max-width: 500px;
}

.seq-num {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  box-shadow: var(--shadow);
  border: 3px solid transparent;
}

.seq-num.known {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: var(--white);
}

.seq-num.unknown {
  background: var(--white);
  border-color: var(--sky);
  color: #9ca3af;
  font-size: 2.5rem;
}

.seq-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 400px;
}

.seq-option {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  border: 3px solid var(--sky);
  background: var(--white);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.seq-option:hover {
  border-color: var(--blue);
  transform: scale(1.08);
  background: var(--sky);
}

.seq-option.correct {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  border-color: var(--green);
}

.seq-option.wrong {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  border-color: var(--red);
}

/* ===== HANGMAN ===== */
.hangman-drawing {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.hang-canvas {
  border-radius: 16px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.hangman-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 500px;
  margin: 12px auto 0;
}

.hang-key {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--white);
  border: 3px solid var(--sky);
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 3px 0 var(--light-blue);
}

.hang-key:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-3px);
}

.hang-key.used-correct {
  background: linear-gradient(135deg, var(--green), #059669);
  color: var(--white);
  border-color: var(--green);
  pointer-events: none;
}

.hang-key.used-wrong {
  background: #e5e7eb;
  color: #9ca3af;
  border-color: #d1d5db;
  pointer-events: none;
}

.hangman-word {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0;
}

.hang-slot {
  width: 50px;
  height: 60px;
  border-bottom: 5px solid var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  transition: var(--transition);
}

.hang-slot.revealed {
  color: var(--blue);
}