/* ===========================
   MÓDULO: VOCALES
   =========================== */

#screen-vocales {
  height: 100vh;
  max-height: 100vh;
  background: linear-gradient(160deg, #F0FFFE 0%, #FFF9F0 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ---- HEADER FIJO CON VOCAL OBJETIVO BIEN VISIBLE ---- */
.vocales-header {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  background: rgba(255,249,240,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(255,107,53,0.12);
  flex-shrink: 0;
  gap: 12px;
  animation: fadeSlideUp 0.4s ease both;
}

/* ---- VOCAL OBJETIVO CENTRADA EN EL HEADER ---- */
.vocal-objetivo-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.vocal-objetivo__texto {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vocal-objetivo__vocal {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-primary);
  text-shadow: 0 4px 0 var(--color-primary-dark), 0 0 30px rgba(255,107,53,0.3);
  animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.vocales-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
  flex-shrink: 0;
  min-width: 80px;
  justify-content: center;
}

.vocales-timer.urgente {
  background: rgba(255,71,71,0.12);
  color: var(--color-error);
  animation: pulse 0.6s ease infinite;
  border: 2px solid rgba(255,71,71,0.3);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ---- ÁREA DE BURBUJAS: ocupa todo el espacio restante ---- */
.vocales-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---- BURBUJAS DE VOCALES ---- */
.burbuja-vocal {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* La burbuja empieza abajo del área y sube hasta arriba */
  animation: floatBurbuja linear forwards;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.14);
  will-change: transform;
}

/* Sube desde abajo del área hasta bien arriba del área */
@keyframes floatBurbuja {
  0%   { transform: translateY(0px); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(var(--subida)); opacity: 0.6; }
}

.burbuja-vocal:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,0.25), 0 12px 32px rgba(0,0,0,0.2);
}

.burbuja-vocal.correcta-hit {
  animation: burbuja-pop 0.35s ease forwards !important;
  pointer-events: none;
}

.burbuja-vocal.incorrecta-hit {
  animation: burbuja-shake 0.3s ease !important;
}

@keyframes burbuja-pop {
  0%   { transform: scale(1); opacity: 1; }
  45%  { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(0) rotate(20deg); opacity: 0; }
}

@keyframes burbuja-shake {
  0%, 100% { filter: brightness(1); }
  25%  { transform: translateX(-8px) rotate(-5deg) scale(1.05); filter: brightness(1.2); }
  75%  { transform: translateX(8px) rotate(5deg) scale(1.05); filter: brightness(1.2); }
}

/* Colores por vocal */
.burbuja-a { background: radial-gradient(circle at 35% 30%, #FF9B7A, #FF6B35); color: white; }
.burbuja-e { background: radial-gradient(circle at 35% 30%, #7EDDD6, #2CBBB2); color: white; }
.burbuja-i { background: radial-gradient(circle at 35% 30%, #C4A8FF, #8B5CF6); color: white; }
.burbuja-o { background: radial-gradient(circle at 35% 30%, #FFE470, #F59E0B); color: #5a3800; }
.burbuja-u { background: radial-gradient(circle at 35% 30%, #86EFAC, #22C55E); color: white; }

/* Brillo de burbuja */
.burbuja-vocal::before {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 32%;
  height: 22%;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: rotate(-35deg);
  pointer-events: none;
}

/* ---- PROGRESO INFERIOR ---- */
.vocales-footer {
  padding: 10px 24px 14px;
  flex-shrink: 0;
  z-index: 20;
  background: rgba(255,249,240,0.9);
  animation: fadeSlideUp 0.4s ease 0.3s both;
}

.vocales-progreso-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .vocales-header { padding: 10px 14px; }
  .vocal-objetivo__vocal { font-size: 2.8rem; }
  .vocales-footer { padding: 8px 14px 12px; }
}


/* ========== CARD DE INSTRUCCIONES ========== */
.animales-instruccion,
.clasifica-instruccion,
.reloj-instruccion,
.memoria-instruccion,
.sec-instruccion,
.vocal-objetivo-header,
.inicial-instruccion,
.manzanas-instruccion {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 32px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.animales-instruccion h2,
.clasifica-instruccion h2,
.reloj-instruccion h2,
.memoria-instruccion h2,
.sec-instruccion h2,
.vocal-objetivo-header h2,
.inicial-instruccion h2,
.manzanas-instruccion h2 {
  margin: 0 0 12px 0;
  font-size: 1.6rem;
  color: var(--text-dark);
}

.animales-instruccion p,
.clasifica-instruccion p,
.reloj-instruccion p,
.memoria-instruccion p,
.sec-instruccion p,
.vocal-objetivo-header p,
.inicial-instruccion p,
.manzanas-instruccion p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-medium);
}
