/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  color: #333;
  padding: 20px;
}

.container {
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 1100px;
  width: 95%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem; /* Reducido para dejar espacio al botón superior */
  color: #ff6f61;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para la selección de categoría */
.category-selection {
  margin-bottom: 2.5rem;
  animation: fadeIn 0.5s ease-in-out;
}

.category-selection h2 {
  font-size: 2rem;
  margin-bottom: 1.8rem;
  color: #6a11cb;
}

.category-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 1.8rem;
}

.category-btn .icon {
  font-size: 4rem;
  margin-bottom: 1.2rem;
}

.category-btn .label {
  font-size: 1.5rem;
  font-weight: 600;
}

.clasico-btn {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
}

.parejas-btn {
  background: linear-gradient(135deg, #fa709a, #fee140);
  color: white;
}

.amigos-btn {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: white;
}

.category-btn:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.category-indicator {
  display: inline-block;
  padding: 0.6rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 1.8rem;
  font-size: 1.3rem;
}

.clasico-indicator {
  background-color: rgba(106, 17, 203, 0.2);
  color: #6a11cb;
}

.parejas-indicator {
  background-color: rgba(250, 112, 154, 0.2);
  color: #fa709a;
}

.amigos-indicator {
  background-color: rgba(67, 233, 123, 0.2);
  color: #43e97b;
}

/* Contenedor principal para el juego */
.game-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Botón de volver a categoría - MOVIDO ARRIBA O ABAJO */
.volver-categoria-container {
  width: 100%;
  margin-bottom: 2rem; /* Espacio debajo cuando está arriba */
  /* Alternativa: margin-top: 2rem; para cuando está abajo */
}

.volver-categoria {
  background: linear-gradient(to right, #6a11cb, #2575fc) !important;
  color: white;
  border: none;
  padding: 1.2rem 0 !important;
  font-size: 1.4rem !important;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4) !important;
  width: 100%;
  max-width: 400px; /* Limitar el ancho máximo */
  margin: 0 auto; /* Centrar horizontalmente */
  display: block;
}

.volver-categoria:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(106, 17, 203, 0.5) !important;
}

/* Botones de Verdad o Reto - HORIZONTAL Y CENTRADO */
.buttons {
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin: 0 auto; /* Centrado */
  flex-grow: 1; /* Toma el espacio disponible */
  width: 100%;
  min-height: 300px;
  justify-content: center;
  align-items: center;
}

.buttons button {
  flex: 1;
  background: linear-gradient(to right, #ff6f61, #ff9a9e);
  color: white;
  border: none;
  padding: 3rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 400px; /* Limitar el ancho máximo */
  height: 100%; /* Ocupar toda la altura disponible */
}

#verdadBtn {
  background: linear-gradient(to right, #43e97b, #38f9d7);
  box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
}

#retoBtn {
  background: linear-gradient(to right, #fa709a, #fee140);
  box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4);
}

.buttons button:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

#content {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 1.5rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.5s ease-in-out;
}

#texto {
  font-size: 2.8rem;
  line-height: 1.4;
  margin-bottom: 2.5rem;
  color: #333;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#volverBtn {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: white;
  border: none;
  padding: 1.2rem 4rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.4);
}

#volverBtn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(106, 17, 203, 0.5);
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para pantallas pequeñas */
@media (max-width: 992px) {
  .container {
    padding: 2.5rem;
  }

  h1 {
    font-size: 3rem;
  }

  .buttons {
    min-height: 250px;
  }

  .buttons button {
    font-size: 2.2rem;
    padding: 2.5rem 0;
  }
}

@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 2rem;
  }

  h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
  }

  .category-buttons {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .category-btn {
    width: 160px;
    height: 160px;
  }

  .category-btn .icon {
    font-size: 3.5rem;
  }

  /* Cambiar a vertical en móviles */
  .buttons {
    flex-direction: column;
    min-height: auto;
    gap: 20px;
  }

  .buttons button {
    padding: 2rem 0;
    font-size: 2rem;
    max-width: 100%; /* Ocupar todo el ancho en móvil */
  }

  #texto {
    font-size: 2rem;
    min-height: 150px;
  }

  .volver-categoria {
    font-size: 1.3rem !important;
    padding: 1rem 0 !important;
    max-width: 100%; /* Ocupar todo el ancho en móvil */
  }

  .volver-categoria-container {
    margin-bottom: 1.5rem; /* Menos espacio en móvil */
    /* Alternativa: margin-top: 1.5rem; para cuando está abajo */
  }
}

/* Estilos específicos para verdad */
.verdad-mode .container {
  background: rgba(230, 255, 240, 0.95);
}

.verdad-mode #content {
  background: rgba(230, 255, 240, 0.8);
}

/* Estilos específicos para reto */
.reto-mode .container {
  background: rgba(255, 230, 240, 0.95);
}

.reto-mode #content {
  background: rgba(255, 230, 240, 0.8);
}

/* Estilos específicos para categorías */
.clasico-mode .container {
  border: 6px solid rgba(106, 17, 203, 0.3);
}

.parejas-mode .container {
  border: 6px solid rgba(250, 112, 154, 0.3);
}

.amigos-mode .container {
  border: 6px solid rgba(67, 233, 123, 0.3);
}
