body {
  font-family: 'Poppins', "Noto Sans SC", Arial, sans-serif;
  background: #f4f6f8;
  padding: 20px;
}
h2 {
  text-align: center;
  color: #2c3e50;
}

.table-container {
  max-width: 1100px;
  margin: auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: #ffffff;
  padding: 12px;
}

td {
  padding: 10px;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #f9fbfd;
}

tr:hover {
  background-color: #eaf2ff;
}

td:nth-child(2) {
  font-size: 20px;
  font-weight: bold;
}

td:nth-child(3) {
  color: #2980b9;
  font-style: italic;
}

button {
  background: #3498db;
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
}

/* Botón modo oscuro*/
#modoBtn {
  background: #2c3e50;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  position: absolute;
  top: 50px;
  right: 50px;
  transition: all 0.3s;
}

#modoBtn:hover {
  background: #1a252f;
}

#paginacion {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
  flex-wrap: wrap;
}

#paginacion button.active {
  background: #3498db;
  color: white;
  font-weight: bold;
}

/* ===== MODO OSCURO ===== */
body.dark {
  background: #121212;
  color: #e0e0e0;
}

body.dark .table-container {
  background: #1e1e1e;
}

body.dark th {
  background: #000;
}

body.dark tr:nth-child(even) {
  background: #232323;
}

body.dark tr:hover {
  background: #2e3b4e;
}
body.dark h2 {
    color: #ffffff;
}


/* ===== BOTONES DE PAGINACIÓN ===== */
.btn-pagina {
  background: #ecf0f1;
  color:    #2c3e50;
  border: 1px solid #e1dcdc;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pagina:hover {
  background: #3498db;
  color: #fff;
  transform: translateY(-2px);
  border-color: #3498db;
}

.btn-pagina.active {
  background: #2c3e50;
  color: #fff;
  border-color: #3498db;
}

/* ===== MODO OSCURO ===== */
body.dark .btn-pagina {
  background: #2a2a2a;
  color: #e0e0e0;
  border-color: #444;
}

body.dark .btn-pagina:hover {
  background: #3498db;
}

body.dark .btn-pagina.active {
  background: #fff;
  color: #000;
}

/* ZOOM */

/* CARACTER NORMAL */
.hanzi {
  font-size: 22px;
  cursor: zoom-in;
}

/* FONDO OSCURO */
.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* CARACTER GRANDE */
.zoom-caracter {
  background: white;
  color: black;
  font-size: 120px;
  padding: 40px 60px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

body.dark .zoom-caracter {
  background: #1e1e1e;
  color: white;
}

/* BOTÓN APRENDE JUGANDO */
.btn-aprender-jugando {
  background: linear-gradient(135deg, #34495e, #5dade2);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  position: absolute;
  top: 50px;
  left: 50px;
}

.btn-aprender-jugando:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

.btn-aprender-jugando:active {
  transform: scale(0.95);
}
a{
  text-decoration: none;
  color: #fff;
}

@media (max-width: 480px) {
  .btn-resp {
    width: 90%;
    max-width: 300px;
  }
}


/* Menú de juegos */
body {
  font-family: 'Poppins', "Noto Sans SC", Arial, sans-serif;
  background: #8ac5ff;
  padding: 20px;
}
a{
  text-decoration: none;
  color: #ffffff;
}
.menu {
  max-width: 900px;
  margin: 40px auto;
  text-align: center;
}

.menu h1 {
  margin-bottom: 30px;
}

.tablero-menu {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.carta-menu {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  background: #34495e;
  color: white;
  border-radius: 14px;
  padding: 16px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  user-select: none;
  transition: transform 0.2s, opacity 0.2s;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.carta-menu.pendiente {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
}
.carta-menu.pendiente .icono {
  opacity: 0.7;
}
.carta-menu:not(.desplegable) {
  pointer-events: auto;
}
.carta-menu:not(.desplegable):hover {
  transform: none;
  box-shadow: none;
}

.carta-menu .icono {
  font-size: 65px;
}

.carta-menu .titulo {
  margin-top: 10px;
  font-size: 18px;
}

/* Pendientes */
.carta-menu.pendiente {
  background: #7f8c8d;
  opacity: 0.6;
  cursor: not-allowed;
}

.carta-menu.pendiente:hover {
  transform: none;
  box-shadow: none;
}

/* Modo oscuro */
body.dark .carta-menu {
  background: #485460;
}

body.dark .carta-menu.pendiente {
  background: #576574;
}
/* Estilo Etapas */
.titulo-etapa {
  font-size: 2.0rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #34495e, #2c3e50);
  display: inline-block;
  padding: 12px 28px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
}
/* Estilo Principal */
.titulo-principal {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin: 30px 0 10px;
  color: #2c3e50;
  text-transform: uppercase;
  position: relative;
}

.titulo-principal::after {
  content: "";
  display: block;
  width: 90px;
  height: 6px;
  margin: 12px auto 0;
  border-radius: 6px;
  background: linear-gradient(135deg, #1abc9c, #16a085);
}

.carta-menu.desplegable {
  position: relative;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
}
.carta-menu .opciones button {
  cursor: pointer;
}
.carta-menu .opciones {
  position: absolute;
  top: calc(100% - 6px);
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  left: 6px;
  width: calc(100% - 12px);

  display: none;
  flex-direction: column;
  gap: 8px;

  background: #34495e;
  border-radius: 0 0 14px 14px;
  padding: 8px;
  box-sizing: border-box;
  animation: aparecer 0.2s ease-out;
}
@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.carta-menu.desplegable {
  position: relative;
  transition: transform 0.2s;
}

/* al pasar el mouse */
.carta-menu.desplegable:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  z-index: 20;
}

/* mostrar opciones */
.carta-menu.desplegable:hover .opciones {
  display: flex;
}
.carta-menu .opciones button {
  background: #1abc9c;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.carta-menu .opciones button:hover {
  background: #16a085;
  transform: scale(1.05);
}
/* Animación de baile Texto principal */
@keyframes respirar {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.titulo-principal {
  animation: respirar 3.5s ease-in-out infinite;
}
.titulo-principal:hover {
  animation-play-state: paused;
}
/* Contenedor en la esquina superior derecha */
.login-container {
    position: absolute;  /* flota sobre todo */
    top: 20px;           /* distancia desde arriba */
    right: 20px;         /* distancia desde la derecha */
    z-index: 1000;       /* que siempre quede encima */
    font-family: Arial, sans-serif;
}

.btn-login {
    text-decoration: none;
    color: white;
    background-color: #4CAF50; /* verde, cambia al que quieras */
    padding: 8px 12px;
    margin-left: 5px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #45a049; /* efecto hover */
}
#saludoUsuario{
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
}

/* botón cerrar sesión */
#btnLogout{
    background: #1abc9c;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#btnLogout:hover{
    background: #16a085;
    transform: scale(1.05);
}

#progresoJugador{

    display:none;

    background: #34495e;
    color: white;

    padding: 10px 20px;
    margin: 10px auto 25px auto;

    width: fit-content;

    border-radius: 10px;

    font-weight: 600;

    box-shadow: 0 6px 15px rgba(0,0,0,0.25);

    text-align: center;
}

#loader{
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;

    background:#8ac5ff;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    z-index:9999;
}

.spinner{
    width:50px;
    height:50px;
    border:6px solid #ffffff;
    border-top:6px solid #1abc9c;
    border-radius:50%;

    animation: girar 1s linear infinite;
}

@keyframes girar{
    from{transform:rotate(0deg);}
    to{transform:rotate(360deg);}
}

#loader p{
    margin-top:15px;
    font-weight:600;
    color:#34495e;
}
#progresoJugador{
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
}

#progresoJugador:hover{
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  background: linear-gradient(135deg,#1abc9c,#16a085);
  color: white;
}
#progresoJugador:active{
  transform: scale(0.97);
}
/* BOTONES DE ETAPAS */
#etapas:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}