@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  --bg-cream: #fff8ea;
  --bg-mint: #e6fbf3;
  --bg-sky: #e9f3ff;
  --ink: #1a1f2a;
  --muted: #4b5563;
  --primary: #1b9aaa;
  --primary-dark: #137c88;
  --accent: #f76c5e;
  --accent-dark: #e25547;
  --sun: #ffcf4a;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, var(--bg-sky), transparent 45%),
    radial-gradient(circle at 20% 10%, var(--bg-mint), transparent 45%),
    linear-gradient(180deg, var(--bg-cream), #ffffff 55%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  opacity: 0.22;
  filter: blur(4px);
}

body::before {
  background: radial-gradient(circle, #34d399, transparent 60%);
  top: -120px;
  right: -120px;
}

body::after {
  background: radial-gradient(circle, #facc15, transparent 60%);
  bottom: -140px;
  left: -140px;
}

.container {
  width: 95%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding: 10px 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 5px 0;
}

.site-logo .brand {
  color: var(--ink);
  text-decoration: none;
}

.site-logo .green {
  color: var(--primary);
}

.nav-menu a {
  margin-left: 24px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu .login-btn {
  background: var(--accent);
  color: white;
  padding: 8px 18px;
  border-radius: 24px;
  box-shadow: 0 8px 16px rgba(247, 108, 94, 0.25);
}

.hero {
  text-align: center;
  padding: 36px 0 24px;
  position: relative;
  animation: fadeUp 0.6s ease both;
}

.hero h2 {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h2 span {
  display: inline-block;
}

.hero .green {
  color: var(--primary);
}

.hero .red {
  color: var(--accent);
}

.hero p {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #34d399);
  color: #fff;
  box-shadow: 0 14px 24px rgba(27, 154, 170, 0.35);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 2px solid rgba(27, 154, 170, 0.3);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-stats {
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  max-width: 720px;
}

.hero-stat {
  background: var(--card);
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: left;
  animation: fadeUp 0.6s ease both;
}

.hero-stat span {
  display: block;
  font-weight: 700;
  color: var(--ink);
}

.hero-stat small {
  color: var(--muted);
}

.featured-games,
.popular-categories,
.skill-highlights {
  padding: 20px 0;
}

.featured-games h2,
.popular-categories h2 {
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 20px;
  text-align: left;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-link {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}

.section-link:hover {
  color: var(--accent);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.game-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  background: var(--card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.2);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.game-card:hover::after {
  transform: translateX(100%);
}

.game-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin: 0 auto;
}

.game-card.purple {
  background: linear-gradient(145deg, #fef3c7, #fcd34d);
}

.game-card.blue {
  background: linear-gradient(145deg, #dbeafe, #93c5fd);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.category-index {
  padding: 40px 0 60px;
}

.category-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.category-index-header h1 {
  margin: 0 0 8px 0;
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 2.2rem;
}

.category-index-header p {
  margin: 0;
  color: var(--muted);
}

.category-card {
  background: var(--card);
  padding: 20px;
  border-radius: 16px;
  font-weight: 700;
  text-align: center;
  font-size: 1rem;
  color: var(--ink);
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-4px);
}

.learning-path {
  padding: 30px 0 10px;
}

.learning-path .path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.learning-step {
  background: var(--card);
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: left;
}

.learning-step span {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.category-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
}

.skill-highlights h2 {
  font-size: 2rem;
  color: var(--ink);
  margin-bottom: 10px;
  text-align: center;
}

.skill-highlights .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 30px;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.skill-box {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.site-footer {
  padding: 30px 0 50px;
  text-align: center;
  color: var(--muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .container > div {
  margin-top: 8px;
}

@media screen and (max-width: 900px) {
  .nav-menu a {
    margin-left: 12px;
  }
  .hero {
    padding-top: 20px;
  }
}

@media screen and (max-width: 680px) {
  .site-header .container {
    flex-direction: column;
    gap: 12px;
  }
  .hero-actions {
    flex-direction: column;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
