/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background: transparent;
  overflow: auto;
}

body {
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}


/* Fondo animado canvas */
#background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: transparent;
  pointer-events: none;
}

/* Contenedor del formulario */
.login-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 12px 45px rgba(0,0,0,0.2);
  z-index: 1;
  text-align: center;
  backdrop-filter: blur(10px);
  animation: fadeSlideUp 0.8s ease forwards;
}

/* Título */
.login-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #202020;
  font-weight: 700;
}

/* Inputs */
.login-input {
  width: 100%;
  padding: 0.9rem;
  margin: 0.6rem 0;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  transition: all 0.3s ease;
}

.login-input:focus {
  border-color: #007acc;
  outline: none;
  box-shadow: 0 0 8px rgba(0, 122, 204, 0.3);
}

/* Botón */
.login-button {
  width: 100%;
  padding: 0.85rem;
  margin-top: 1.2rem;
  background: linear-gradient(135deg, #007acc, #00b0ff);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 204, 0.4);
}

/* Enlaces */
.login-links {
  margin-top: 1.5rem;
}

.login-link {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #007acc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login-link:hover {
  color: #005fa3;
}

/* Animación de entrada */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Transición Canva */
#page-fade {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-fade);
  backdrop-filter: blur(20px);
  transform: scale(1.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#page-fade.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

/* Soporte tema claro/oscuro */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-fade: rgba(0, 0, 0, 0.8);
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-fade: rgba(255, 255, 255, 0.9);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .login-container {
    padding: 2rem 1.5rem;
    width: 95%;
  }

  .login-title {
    font-size: 1.6rem;
  }

  .login-input, .login-button {
    font-size: 0.95rem;
    padding: 0.8rem;
  }

  .login-link {
    font-size: 0.9rem;
  }
}

.login-back {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 1.8rem;
  z-index: 1000;
  text-decoration: none;
  color: #007acc;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.login-back:hover {
  background: rgba(0,0,0,0.1);
  color: #005fa3;
}

/* Alertas */
.mensaje-exito,
.mensaje-error {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 16px;
  z-index: 9999;
  animation: fadeInOut 5s ease-in-out;
}

.mensaje-exito {
  background-color: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.mensaje-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* Ocultar pantallas inicialmente */
.oculto {
  display: none !important;
}

/* Pantalla de verificación */
#pantalla-verifica {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  animation: fadeIn 0.4s ease-in-out;
}

.verifica-contenedor {
  text-align: center;
  background: #ffffffee;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.mensaje-verifica {
  font-size: 22px;
  margin-bottom: 25px;
  color: #444;
}

.botones-verifica button {
  margin: 0 10px;
  padding: 12px 18px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background-color: #0069d9;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
}

.botones-verifica button:hover {
  background-color: #004c9c;
}

/* Pantalla de éxito con animación */
#pantalla-exito {
  position: fixed;
  inset: 0;
  background-color: rgba(212, 237, 218, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  animation: fadeIn 0.4s ease-in-out;
}

.paloma-contenedor {
  text-align: center;
}

.paloma-img {
  width: 130px;
  height: 130px;
  animation: popUp 0.6s ease-in-out;
}

.mensaje-paloma {
  color: #155724;
  font-size: 30px;
  margin-top: 20px;
  font-weight: bold;
  animation: fadeIn 0.5s ease-in;
}

@keyframes popUp {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 🔄 Nueva animación de salida */
@keyframes fadeOutScale {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.95); }
}

/* ------------------ ESTILOS PERFIL ------------------ */
/* ------------------ ESTILOS PERFIL FINAL BANANO ------------------ */
.perfil-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  gap: 2rem;
  min-height: auto;
  height: auto;
  overflow-y: auto;
}

.perfil-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  padding: 2rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: all 0.4s ease;
}

.perfil-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  background: white;
  margin-bottom: 1.5rem;
}

.perfil-info {
  text-align: center;
}

.perfil-nombre {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-transform: uppercase; /* 👈 Siempre mayúsculas */
  letter-spacing: 1px;
}

.perfil-puntaje {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: medallaBrillante 3s infinite alternate;
}

.perfil-fecha {
  font-size: 1rem;
  color: #cccccc;
}

.perfil-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.perfil-btn {
  background-color: #4CAF50;
  color: white;
  padding: 0.7rem;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.perfil-btn:hover {
  background-color: #45a049;
}

.selector-avatar {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10000;
}

.avatar-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  max-height: 60vh; /* o el valor que quieras */
  overflow-y: auto; /* Agrega scroll si es necesario */

}

.avatar-option {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avatar-option:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.oculto {
  display: none;
}

/* 🌟 Animación de la medalla */
@keyframes medallaBrillante {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.5); }
}

/* 📱 Responsive para pantallas más grandes */
@media(min-width: 768px) {
  .perfil-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 75%;
    max-width: 850px;
  }

  .perfil-info {
    text-align: left;
  }

  .perfil-actions {
    flex-direction: column;
    align-items: flex-end;
    width: auto;
  }
}

/* 🌑 Modo oscuro elegante */
body.dark .perfil-card {
  background: rgba(40, 40, 40, 0.6);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

body.dark .perfil-btn {
  background-color: #6fcf97;
}

body.dark .perfil-btn:hover {
  background-color: #5bbf7f;
}

/* Modal para cambiar nombre */
#selector-nombre {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10000;
  animation: fadeIn 0.4s ease;
}

.aviso-cambio-nombre {
  font-size: 0.95rem;
  color: #bbbbbb;
  margin-bottom: 1rem;
  text-align: center;
}

#nuevo-nombre {
  padding: 0.7rem;
  font-size: 1rem;
  width: 90%;
  max-width: 300px;
  border: none;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.botones-cambio-nombre {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.botones-cambio-nombre .perfil-btn {
  padding: 0.6rem 1.2rem;
}

/* Animaciones suaves */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Adaptación a modo oscuro */
body.dark #selector-nombre {
  background: rgba(30, 30, 30, 0.8);
}

body.dark #nuevo-nombre {
  background: #333;
  color: white;
}

/* BOTÓN AZUL PARA INICIAR TEST (igual que login) */
.materia-button {
  width: 70%;
  padding: 10px 15px;
  margin-top: 10px;
  background: linear-gradient(135deg, #007acc, #00b0ff);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  font-size: 1rem;
}

.materia-button:hover {
  background-color: #005fa3;
  transform: translateY(-2px);
}

/* CONTENEDOR DEL HEADER */
.header-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: relative;
}

/* AVATAR O BOTÓN LOGIN */
.avatar-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

/* IMAGEN DEL AVATAR */
.avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* BOTÓN INICIAR SESIÓN */
.login-button {
  background-color: #007acc;
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.login-button:hover {
  background-color: #005fa3;
}

/* BOTÓN BACK IGUAL AL DE LOGIN */
.login-back {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 1.8rem;
  z-index: 1000;
  text-decoration: none;
  color: #007acc;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.login-back:hover {
  background: rgba(0,0,0,0.1);
  color: #005fa3;
}

/* CONTENEDOR PRINCIPAL DEL SELECTOR */
.selector-container {
  flex: 1;
  padding: 20px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible; /* Que NO tenga scroll propio */
}


@media(min-width:383px){
  .selector-container{
    padding: 22px 20px 40px; /* Espacio suficiente arriba y abajo */
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.materias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin-top: 20px;
  margin-bottom: 40px; /* Agregamos margen abajo para que no se corte */
}

.materia-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.materia-card:hover {
  transform: translateY(-5px);
}

.materia-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 10px;
  
}

.materia-nombre {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
/* Animación de fade y subida lenta */
/* Animación de fade y subida lenta (2 segundos) */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ahora todo fadeUp dura 2 segundos */
.fade-up {
  animation: fadeUp 2s ease forwards; /* Dura 2 segundos */
}

.fade-avatar {
  animation: fadeUp 1s ease forwards;
}

.intro-container {
  padding: 20px 20px 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

.intro-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.intro-img {
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
  border-radius: 15px;
}

.intro-text {
  max-width: 600px;
  margin-bottom: 30px;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.intro-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.intro-button {
  width: 100%;
  padding: 10px 15px;
  margin-top: 10px;
  background: linear-gradient(135deg, #007acc, #00b0ff);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  font-size: 1rem;
  text-decoration: none;
}

.intro-button:hover {
  background-color: #005fa3;
}

.start-test {
  background-color: #10b981;
}

.start-test:hover {
  background-color: #059669;
}

.test-container {
  padding: 100px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

.test-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.cronometro {
  font-size: 2rem;
  font-weight: bold;
  background: rgb(0, 122, 204, 0.1);
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.pregunta-container {
  width: 100%;
  max-width: 800px;
  background: rgb(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.opcion {
  background-color: #007acc;
  color: white;
  padding: 10px 15px;
  margin: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.opcion:hover {
  background-color: #005fa3;
}

/* Responsive */
@media (max-width: 600px) {
  .pregunta-container {
    padding: 20px;
  }

  .test-title {
    font-size: 1.5rem;
  }

  .cronometro {
    font-size: 1.5rem;
  }
}

/* ANIMACIONES BANANO ULTRA PRO */

/* Animación aparecer suave */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animación desaparecer */
@keyframes fadeOutScale {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

/* Pantalla de "¡Suerte!" y "¡Biennn!" */
.pantalla-suerte, #pantalla-bien {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  font-weight: bold;
  z-index: 9999;
  background: white; /* Fondo blanco por default */
  backdrop-filter: blur(8px);
  animation: fadeInScale 2s ease forwards;
  color: #007acc;
}
@media (max-width: 700px) {
  .pantalla-suerte, #pantalla-bien {
    font-size: 2rem; /* Tamaño de fuente más pequeño en móviles */
  }
}


/* Si el html tiene clase dark */
html.dark .pantalla-suerte,
html.dark #pantalla-bien {
  background: #0d0d0d; /* Fondo negro sólido en modo oscuro */
  color: #00b0ff;
}

/* Feedback de +5s y -20s */
.anim-feedback {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  font-weight: bold;
  z-index: 9999;
  background: white;
  backdrop-filter: blur(6px);
  animation: fadeInScale 0.6s ease forwards;
  color: #007acc;
}

html.dark .anim-feedback {
  background: #0d0d0d;
  color: #00b0ff;
}

/* Correcto */
.feedback-correcto {
  background: rgba(0, 255, 0, 0.25);
  color: #059669;
}

/* Incorrecto */
.feedback-incorrecto {
  background: rgba(255, 0, 0, 0.25);
  color: #dc2626;
}

/* Animación desaparecer */
.fade-out {
  animation: fadeOutScale 0.7s ease forwards;
}

/* Texto adicional en feedback */
.anim-feedback span {
  font-size: 1.5rem;
  margin-top: 10px;
  color: #555;
}

html.dark .anim-feedback span {
  color: #ccc;
}

/* Aparecer bonito */
@keyframes aparecerLento {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Desaparecer bonito */
@keyframes desaparecerSuave {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

/* Nueva clase de animación de aparición */
.fade-in {
  animation: aparecerLento 1s ease forwards;
}

/* Nueva clase de animación de desaparición */
.fade-out {
  animation: desaparecerSuave 0.7s ease forwards;
}

.columnas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

#columna-izquierda, #columna-derecha {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.elemento {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,122,204,0.1);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.elemento:hover {
  background: rgba(0,122,204,0.2);
}

.punto {
  width: 15px;
  height: 15px;
  background: #007acc;
  border-radius: 50%;
}
/* =============================== */
/*   BANANO ECOEMS - OPCIONES TEST */
/* =============================== */

/* Contenedor de opciones */
.opciones-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

/* Etiqueta completa de cada opción */
.opcion-label {
  display: flex;
  align-items: center;
  background: rgba(0, 122, 204, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  user-select: none;
}

/* Efecto hover */
.opcion-label:hover {
  background: rgba(0, 122, 204, 0.2);
}

/* Input oculto */
.opcion-input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #007acc;
  border-radius: 50%;
  margin-right: 12px;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

/* Cuando está seleccionado */
.opcion-input:checked {
  background-color: #007acc;
}

/* Responsive para móvil */
@media (max-width: 600px) {
  .opcion-label {
    font-size: 0.95rem;
    padding: 10px 14px;
  }
}

/* Estilos para Checkbox (opciones múltiples) */
.opcion-input[type="checkbox"] {
  border-radius: 6px;
}

/* Cuando está seleccionado (checkbox) */
.opcion-input[type="checkbox"]:checked {
  background-color: #007acc;
}

/* ==================================== */
/*     BANANO TEST CSS FINAL RESPONDER  */
/* ==================================== */

/* Contenedor principal del Test */
.test-container {
  padding: 100px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100vh;
}

.test-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.cronometro {
  position: relative;
  font-size: 2rem;
  font-weight: bold;
  background: rgba(0, 122, 204, 0.1);
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

#bonus-indicador {
  position: absolute;
  top: -10px;
  right: -30px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #00b300;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  animation: aparecerSuave 0.8s ease forwards;
}

/* Color automático al modo oscuro */
html.dark #bonus-indicador {
  background: rgba(0, 0, 0, 0.8);
}

/* Animación de entrada bonita */
@keyframes aparecerSuave {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


.pregunta-container {
  width: 100%;
  max-width: 800px;
  background: #ffffff; /* Color sólido blanco */
  backdrop-filter: blur(6px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

html.dark .pregunta-container {
  background: #1a1a1a; /* Sólido oscuro en modo oscuro */
}

/* Opciones */
.opciones-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.opcion-label {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,122,204,0.08);
  padding: 12px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.opcion-label:hover {
  background: rgba(0,122,204,0.15);
}

.opcion-input {
  font-size: 8px;
  padding: 8px;
  accent-color: #007acc;
  cursor: pointer;
}

@media (max-width: 600px) {
  .opcion-input {
    font-size: 8px;
    padding: 8px;
  }
}

/* Botón de Responder */
.login-button {
  width: 100%;
  padding: 10px 15px;
  margin-top: 25px;
  background: linear-gradient(135deg, #007acc, #00b0ff);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  font-size: 1.1rem;
  text-decoration: none;
  position: relative;
  top: -10px; /* Sube 10px */
}

@media (max-width: 768px) {
  #user-area .login-button {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    box-shadow: 0 1px 6px var(--color-accent);
  }
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,122,204,0.4);
}

/* Adaptación modo oscuro */
html.dark .cronometro {
  background: rgba(0, 176, 255, 0.1);
}

/* Fade In animación suave */
.fade-in {
  animation: aparecerLento 1.2s ease forwards;
}

@keyframes aparecerLento {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Fade Out para feedback */
.fade-out {
  animation: desaparecerFeedback 0.8s forwards;
}

@keyframes desaparecerFeedback {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); }
}
.pregunta-container {
  width: 100%;
  max-width: 800px;
  background: #ffffff;
  backdrop-filter: blur(6px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 1;
}

/* Para modo oscuro */
html.dark .pregunta-container {
  background: #1a1a1a;
}
.materia-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.materia-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Imagen redonda */
.materia-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.materia-card:hover .materia-img {
  transform: scale(1.08);
}

.img-fluid{
  width: 150px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pregunta-img {
  width: 350px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 600px) {
  .img-fluid{
    width: 40%;
    height: auto;
  }
  .pregunta-img {
    width: 100%;
    height: auto;
  }
}
.latex-respuesta mjx-container {
  font-size: 1.3em; /* O más si quieres */
  line-height: 1.6;
}

/* Mejora del layout general del index */

/* CSS INDEX */

/* CSS FINAL ACTUALIZADO PARA BANANOLAB */
/* === ANIMACIONES DE ENTRADA === */

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s ease;
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s ease;
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.zoom-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}
.zoom-in.visible {
  opacity: 1;
  transform: scale(1);
}

a {
  text-decoration: none;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

:root {
  --color-primary: #1E88E5;
  --color-accent: #00cfff;
  --color-success: #2ecc71;
  --color-text: #333;
  --color-bg: #fff;
  --glow-green: #00ffcc;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

main {
  padding-top: 80px; /* espacio igual o mayor al alto del header */
}


.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}
.nav-menu {
  display: flex;
  gap: 1.5rem;
  position: relative;
  align-items: center;
  top: -10px; /* Sube 10px */
}

.nav-menu a {
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: var(--color-text);
  position: relative;
}

.nav-menu a:hover {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 8px var(--color-primary);
}

/* Línea animada debajo de activo */
.nav-menu a.active {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom: 3px solid var(--color-primary);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

#hamburger {
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
}



/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 70%;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.1rem;
}
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 900;
}
#overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  display: block;
  font-size: 1.2rem;
  padding: 0.8rem 1rem;
  background: #f5f5f5;
  border-radius: 10px;
  font-weight: bold;
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.mobile-menu a:hover {
  background-color: var(--color-success);
  color: white;
  transform: scale(1.03);
}
.mobile-menu a {
  transition: transform 0.2s ease;
}
.mobile-menu a:active {
  transform: scale(0.96);
}


/* Avatar */
.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,255,255,0.4);

}

/*Carousel */
.carousel {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.carousel .list {
  display: flex;
  height: 100%;
  transition: transform 1s ease;
}

.carousel .item {
  flex: 0 0 100%;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 80px;
  height: 40rem;
}

.carousel .item .content {
  max-width: 500px;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.carousel .title {
  font-size: 60px;
  font-weight: 800;
  color: #14ff72cb;
}

.carousel .name {
  font-size: 40px;
  font-weight: bold;
}

.carousel .des {
  margin-top: 1rem;
  font-size: 18px;
}

.carousel .btn {
  margin-top: 1.2rem;
}

.carousel .btn button {
  margin-right: 1rem;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid white;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.carousel .btn button:hover {
  background: #14ff72cb;
  color: black;
  border-color: #14ff72cb;
}

.arrows {
  position: absolute;
  bottom: 1.5rem; /* Antes era 10%, ahora fijo */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 100;
}

.arrows button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #14ff72cb;
  color: #fff;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.arrows button:hover {
  background: white;
  color: #000;
}

/* Línea de tiempo animada */
.timeRunning {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  background: #14ff72cb;
  animation: runningTime 7s linear infinite;
}

@keyframes runningTime {
  from { width: 0%; }
  to { width: 100%; }
}


/* Hero adaptado a móvil */
.torneo-hero {
  margin: 2rem;
}
.hero-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  overflow: hidden;
}
.hero-card img {
  width: 100%;
  height: auto;
}
.hero-text {
  padding: 1.5rem;
  text-align: center;
}

/* Botón Neón */
.btn.neon {
  display: inline-block;
  background: var(--glow-green);
  color: #001f3f;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7em 1.4em;
  border: none;
  border-radius: 30px;
  margin-top: 1rem;
  box-shadow: 0 0 16px var(--glow-green), 0 0 32px var(--glow-green);
  animation: pulseGlow 2s infinite ease-in-out;
}
.btn.neon:hover {
  background: white;
  color: var(--glow-green);
  box-shadow: 0 0 25px var(--glow-green);
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px var(--glow-green), 0 0 20px var(--glow-green); }
  50% { box-shadow: 0 0 20px var(--glow-green), 0 0 40px var(--glow-green); }
  100% { box-shadow: 0 0 10px var(--glow-green), 0 0 20px var(--glow-green); }
}

/* Tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
}
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.card h3 {
  margin: 1rem;
  font-size: 1.1rem;
}
.card p {
  margin: 0 1rem 1rem;
  color: #555;
}
.card-btn {
  margin: 0 1rem 1.2rem;
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s;
}
.card-btn:hover {
  background: var(--color-accent);
}
.badge {
  background: var(--color-success);
  color: white;
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Cronómetro */
.countdown-section {
  padding: 2rem;
  text-align: center;
}
.countdown-line {
  background: linear-gradient(90deg, var(--color-success), var(--color-accent));
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 15px var(--color-accent);
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.countdown div {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  min-width: 70px;
  text-align: center;
}
.countdown span {
  font-size: 1.5rem;
  font-weight: bold;
}
.countdown label {
  display: block;
  font-size: 0.85rem;
  color: #666;
}

/* Footer */
.site-footer {
  padding: 2rem;
  text-align: center;
  background: #f7f7f7;
}
.socials a {
  margin: 0 0.5rem;
  color: var(--color-primary);
  text-decoration: none;
}
.socials a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/*Botón iniciar sesión*/


#user-area .btn {
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--color-accent);
  font-weight: 600;
  transition: background 0.3s;
  text-decoration: none;
}
#user-area .btn:hover {
  background: var(--color-accent);
}

#user-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  visibility: visible;
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  #hamburger {
    display: block;
  }
  .hero-card {
    margin: 1rem;
  }
}

@media (max-width: 600px) {
  .arrows {
    position: static;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    transform: none;
  }

  .arrows button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}


/* RESPONSIVO */
@media (max-width: 600px) {
  .carousel {
    height: auto;
  }

  .carousel .item {
    height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    padding: 1rem;
    text-align: center;
  }

  .carousel .item::before {
    display: none;
  }

  .carousel .item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0;
  }

  .carousel .content {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
  }

  .carousel .title {
    font-size: 28px;
  }

  .carousel .name {
    font-size: 20px;
  }

  .carousel .des {
    font-size: 14px;
  }

  .carousel .btn button {
    padding: 8px 16px;
    font-size: 14px;
  }
}


/* Animación suave de entrada para el contenido del slide */
/* Animación entrada para la imagen completa (item) */
@keyframes slideZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.item.animate-slide {
  animation: slideZoomIn 0.6s ease both;
}

/* Animación entrada para el contenido de texto */
@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content.animate-content {
  animation: fadeInText 0.6s ease both;
}

html, body {
  height: auto !important;
  min-height: 100vh;
  overflow-y: auto;
}

/* Alinea login/avatar con opciones de menú */
.nav-menu #user-area {
  margin-left: auto;
}

/* Esconde en escritorio el login móvil */
@media (min-width: 769px) {
  #mobile-user {
    display: none !important;
  }
}

/* ========================= */
/* 🎯 EXAMENES - ESTILO ESPECIAL */
/* ========================= */

.examen-header {
  text-align: center;
  margin-bottom: 40px;
}

.examen-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #007acc;
  margin-bottom: 10px;
}

.examen-header p {
  font-size: 1.2rem;
  font-weight: 500;
  color: #444;
}

.examen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-content: center;
  padding: 0 10px;
  max-width: 1000px;
  margin: 0 auto;
}

.examen-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 8px 24px rgba(0, 122, 204, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.examen-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 122, 204, 0.15);
}

.examen-card img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
}

.examen-card h3 {
  font-size: 1.4rem;
  color: #005fa3;
  margin-bottom: 10px;
}

.examen-card p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
}

.examen-card .btn-test {
  display: inline-block;
  background: #007acc;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease;
}

.examen-card .btn-test:hover {
  background: #00b0ff;
}

/* 🔥 Hover mejorado para tarjetas del simulador */
.examen-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.examen-card:hover {
  transform: scale(1.04) rotateX(1deg) rotateY(-1deg);
  box-shadow: 0 10px 28px rgba(0, 122, 204, 0.2);
  filter: brightness(1.03);
}

/* ✨ Botones con glow y transición elegante */
.btn-test {
  display: inline-block;
  background: linear-gradient(135deg, #007acc, #00b0ff);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 rgba(0, 176, 255, 0);
  position: relative;
  z-index: 1;
}

.btn-test:hover {
  background: #00b0ff;
  box-shadow: 0 8px 24px rgba(0, 176, 255, 0.4);
  transform: translateY(-2px) scale(1.03);
}

/* Agregar efecto tilt sutil en tarjetas al hacer hover (desktop) */
@media (min-width: 768px) {
  .examen-card:hover {
    transform: perspective(800px) rotateX(2deg) rotateY(-2deg);
  }
}

.examen-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform, box-shadow;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.examen-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 176, 255, 0.15), transparent 60%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.4s ease;
  z-index: 0;
}

.examen-card:hover::before {
  transform: scale(1);
  opacity: 1;
}

.examen-card:hover {
  transform: rotateX(2deg) rotateY(-2deg) scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 176, 255, 0.25);
}

.examen-card img,
.examen-card h3,
.examen-card p,
.examen-card a {
  position: relative;
  z-index: 1;
}

 @media (max-width: 600px) {
      .examen-page {
        padding: 30px 15px 60px;
      }
      .examen-header h1 {
        font-size: 1.6rem;
      }
      .examen-header p {
        font-size: 0.95rem;
      }
      .examen-card {
        padding: 18px;
      }
      .examen-card h3 {
        font-size: 1.1rem;
      }
      .examen-card p {
        font-size: 0.9rem;
      }
      .btn-test {
        font-size: 0.95rem;
        padding: 10px 18px;
      }
    }

.fade-in {
  animation: aparecerSuave 0.5s ease forwards;
}

.fade-out {
  animation: desaparecerSuave 0.3s ease forwards;
}

@keyframes aparecerSuave {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes desaparecerSuave {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

.examen-card a.materia-button {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
}
