:root {
  --pink: #FF6FA5;
  --soft-pink: #FFD6E5;
  --yellow: #FFD93D;
  --soft-yellow: #FFF3B0;
  --sky: #6FC8F2;
  --soft-sky: #C7E9FB;
  --mint: #6FE2C5;
  --soft-mint: #C8F5E8;
  --lavender: #B89CFF;
  --soft-lavender: #E5D9FF;
  --peach: #FFA87A;
  --soft-peach: #FFD9C2;
  --red: #FF6B6B;
  --ink: #2D2A4A;
  --paper: #FFFBF0;
  --shadow: rgba(45, 42, 74, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Patrick Hand', cursive;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 20%, var(--soft-pink) 0%, transparent 25%),
    radial-gradient(circle at 90% 10%, var(--soft-yellow) 0%, transparent 25%),
    radial-gradient(circle at 80% 80%, var(--soft-mint) 0%, transparent 25%),
    radial-gradient(circle at 15% 90%, var(--soft-lavender) 0%, transparent 25%);
}

.doodle {
  position: fixed;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
.doodle.d1 { top: 5%; left: 3%; animation: float 6s ease-in-out infinite; }
.doodle.d2 { top: 15%; right: 5%; animation: float 7s ease-in-out infinite 1s; }
.doodle.d3 { top: 50%; left: 2%; animation: float 8s ease-in-out infinite 2s; }
.doodle.d4 { bottom: 10%; right: 4%; animation: float 6s ease-in-out infinite 3s; }
.doodle.d5 { top: 70%; left: 6%; animation: float 9s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ===== TOP NAV ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 4px dashed var(--ink);
  padding: 14px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .heart {
  display: inline-block;
  animation: beat 1.2s ease-in-out infinite;
  color: var(--pink);
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  background: white;
  padding: 8px 18px;
  border-radius: 30px;
  border: 3px solid var(--ink);
  font-size: 1.1rem;
  font-weight: bold;
  transition: all 0.2s;
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-links a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.nav-links a.active { background: var(--soft-yellow); }
.nav-links a.spel-active { background: var(--soft-pink); }
.nav-links a.leer-active { background: var(--soft-yellow); }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 60px 30px 40px;
  text-align: center;
  z-index: 1;
}
.hello {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--pink);
  margin-bottom: 10px;
  transform: rotate(-3deg);
  display: inline-block;
  text-shadow: 4px 4px 0 white, 4px 4px 0 var(--ink);
}
.hero h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 700;
  margin: 10px 0;
  background: linear-gradient(90deg, var(--pink), var(--peach), var(--yellow), var(--mint), var(--sky), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.hero .subtitle {
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.name-stars {
  display: inline-block;
  position: relative;
}
.name-stars::before, .name-stars::after {
  content: '⭐';
  position: absolute;
  font-size: 2rem;
  animation: spin 4s linear infinite;
}
.name-stars::before { left: -50px; top: 10px; }
.name-stars::after { right: -50px; top: 10px; animation-direction: reverse; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== GENERAL SECTION ===== */
section {
  padding: 50px 30px;
  position: relative;
  z-index: 1;
}
.section-title {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  text-align: center;
  margin-bottom: 40px;
}
.section-title .underline {
  display: block;
  width: 200px;
  height: 12px;
  margin: 15px auto 0;
  border-radius: 10px;
  background: var(--pink);
}

/* ===== CARDS GRID (used on landing + overview pages) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.card {
  background: white;
  border: 4px solid var(--ink);
  border-radius: 25px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: block;
}
.card:nth-child(6n+1) { background: var(--soft-pink); transform: rotate(-2deg); }
.card:nth-child(6n+2) { background: var(--soft-mint); transform: rotate(1deg); }
.card:nth-child(6n+3) { background: var(--soft-sky); transform: rotate(-1deg); }
.card:nth-child(6n+4) { background: var(--soft-yellow); transform: rotate(2deg); }
.card:nth-child(6n+5) { background: var(--soft-lavender); transform: rotate(-1.5deg); }
.card:nth-child(6n+6) { background: var(--soft-peach); transform: rotate(1.5deg); }
.card:hover {
  transform: rotate(0) translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}
.card .emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 10px;
  transition: transform 0.3s;
}
.card:hover .emoji {
  transform: scale(1.2) rotate(15deg);
}
.card h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.card p {
  font-size: 1.1rem;
}

/* Back link */
.back-link {
  display: inline-block;
  margin: 20px auto;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 30px;
  padding: 8px 20px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.back-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

/* ===== CONFETTI ===== */
.confetti {
  position: fixed;
  width: 10px; height: 10px;
  pointer-events: none;
  z-index: 1000;
  animation: confetti-fall 3s linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== TOAST (replaces alert/confirm) ===== */
.toast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 74, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease;
}
.toast-overlay.show { display: flex; }
.toast {
  background: white;
  border: 5px solid var(--ink);
  border-radius: 30px;
  padding: 30px 35px;
  text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
  max-width: 90%;
  width: 420px;
  animation: bounceIn 0.45s ease;
}
.toast .t-emoji { font-size: 4rem; margin-bottom: 10px; }
.toast .t-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.toast .t-msg {
  font-size: 1.2rem;
  margin-bottom: 20px;
  line-height: 1.4;
}
.toast .t-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.toast button {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 10px 24px;
  border: 3px solid var(--ink);
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: all 0.15s;
  background: white;
  color: var(--ink);
}
.toast button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.toast button.primary { background: var(--mint); }
.toast button.danger { background: var(--soft-pink); }

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 50px 20px;
  font-size: 1.3rem;
  color: var(--ink);
  position: relative;
  z-index: 1;
}
footer .big {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  color: var(--pink);
  display: block;
  margin-top: 10px;
}

/* ===== FEEDBACK TEXT (used by games) ===== */
.feedback {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 20px;
  min-height: 40px;
}
.feedback.good { color: var(--mint); }
.feedback.bad { color: var(--red); }

/* ===== GENERIC BUTTONS ===== */
.btn {
  background: white;
  border: 4px solid var(--ink);
  border-radius: 30px;
  padding: 12px 28px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: all 0.2s;
  color: var(--ink);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn.primary { background: var(--mint); }
.btn.warn { background: var(--soft-pink); }
.btn.go { background: var(--yellow); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .name-stars::before, .name-stars::after { display: none; }
  nav { padding: 10px 15px; }
  .logo { font-size: 1.3rem; }
  .nav-links a { padding: 6px 12px; font-size: 0.95rem; }
  section { padding: 40px 15px; }
}
