body {
  background: linear-gradient(180deg, #fff5f5, #ffeaea);
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  line-height: 1.6;
  color: #222;
  margin: 0;
  padding: 0;
  transition: background 0.6s ease;
}

header {
  text-align: center;
  background: linear-gradient(to right, #d33338, #ff6b6b);
  color: #fff;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

header img {
  max-width: 100px;
  display: block;
  margin: 0 auto 10px;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.1) rotate(-3deg);
}

nav {
  text-align: center;
  background: #fce5e9;
  padding: 12px;
  border-bottom: 3px solid #ffc3c9;
}

nav button {
  margin: 0 10px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #d24465;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

nav button:hover {
  background: #ff6b81;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

main {
  padding: 24px;
  max-width: 960px;
  margin: auto;
}

.page {
  display: none;
  animation: fadeIn 0.6s ease;
}

.active-page {
  display: block;
}

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

h2 {
  color: #d24465;
  font-size: 28px;
  text-align: center;
  margin-top: 10px;
  animation: aparecer 1s ease-in-out;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: #ffffff;
  padding: 20px;
  border-radius: 20px;
  border: 2px solid #ffd7d7;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  margin: 24px auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.portada {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: linear-gradient(to right, #ffdddd, #ffeaea);
  padding: 40px 20px; 
  border-bottom: 4px solid #d24465;
  border-radius: 0 0 40px 40px;
}

.portada-texto {
  flex: 1;
  min-width: 250px;
  padding: 20px;
}

.portada-texto h2 {
  font-size: 32px;
  color: #d24465;
  margin-bottom: 12px;
}

.portada-texto p {
  font-size: 20px;
  color: #333;
}

.portada-img {
  flex: 1;
  min-width: 220px;
  text-align: center;
}

.portada-img img {
  max-width: 250px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.4s ease;
}

.portada-img img:hover {
  transform: scale(1.05) rotate(-2deg);
}

/* 🦶 PIE DE PÁGINA */
footer {
  text-align: center;
  background: linear-gradient(90deg, #f8dede, #ffcccc);
  padding: 16px;
  margin-top: 30px;
  font-size: 16px;
  box-shadow: 0 -3px 8px rgba(0,0,0,0.1);
}

/* 🎮 JUEGOS Y LECCIONES */
.vowels, .syllables {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.vowel, .syll-word {
  background: #f9bebe;
  padding: 16px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  font-size: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.vowel:hover, .syll-word:hover {
  background: #ffa5b7;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.vowel.active {
  background: #ff7d95;
  color: white;
}

.audio-btn {
  margin-left: 10px;
  padding: 6px 12px;
  background: #eeaab0;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.audio-btn:hover {
  background: #d4747f;
  transform: scale(1.1);
}

/* 🧠 OPCIONES Y MENSAJES */
.options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.option {
  background: #fff0f0;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  border: 2px solid #e4939b;
}

.option:hover {
  background: #e9bbce;
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.message {
  margin-top: 18px;
  font-weight: bold;
  font-size: 20px;
  text-align: center;
}

.correct {
  color: #2e7d32;
}

.wrong {
  color: #d32f2f;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(255,182,193,0.3), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(255,192,203,0.3), transparent 60%);
  animation: floatBg 8s ease-in-out infinite alternate;
  z-index: -2;
}

@keyframes floatBg {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

@keyframes floatHearts {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

.heart {
  position: fixed;
  bottom: 0;
  font-size: 20px;
  color: #ff6b81;
  animation: floatHearts 6s linear infinite;
  z-index: -1;
}

/* Brillo en títulos */
h1, h2 {
  position: relative;
  overflow: hidden;
}

h1::after, h2::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Efecto de luz en botones */
nav button:hover {
  background: linear-gradient(90deg, #d24465, #ff7fa2);
  box-shadow: 0 0 10px #ff8cb4;
  transform: scale(1.05);
}

/* Tarjetas con brillo sutil */
.card {
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(255,105,135,0.4);
  transform: translateY(-4px);
}
/* --- BOTÓN DE DESCARGA BONITO --- */
.download-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff7a18, #af002d 70%);
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 40px;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  letter-spacing: 0.5px;
  margin-top: 10px;
  animation: pulseGlow 2s infinite;
}

.download-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 10px 25px rgba(255, 140, 0, 0.5);
  background: linear-gradient(135deg, #ff9a3c, #ff006a 80%);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 12px rgba(255, 140, 0, 0.5); }
  50% { box-shadow: 0 0 24px rgba(255, 0, 100, 0.7); }
  100% { box-shadow: 0 0 12px rgba(255, 140, 0, 0.5); }
}