/* RESET BÁSICO */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================
   MENU – GENESIS
   ========================================= */

.menu-body {
  background: #bfe7ff;
  color: #111827;
}

/* Banner 1920x500 (PARA EL MENU) */
.hero-banner {
  width: 100%;
  height: 500px;
  background-image: url('genesis-hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Overlay – ELIMINADO EL GRADIENTE OSCURO */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-left: 6%;
}

.hero-title-block {
  display: flex;
  flex-direction: column;
}

/* Bible Learning (PARA EL MENU) */
.hero-title {
  font-size: 58px;
  font-weight: 800;
  color: #ffffff; /* Color: blanco */
  letter-spacing: 0.03em;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Sombra reducida */
}

/* Genesis (PARA EL MENU) */
.hero-subtitle {
  font-size: 105px;
  font-weight: 800;
  color: #fce58a; /* Color: fce58a */
  margin: -25px 0 0 0; /* Subido 25px */
  text-shadow:
    0 0 5px rgba(0, 0, 0, 0.7), /* Sombra reducida */
    0 0 8px rgba(252, 229, 138, 0.5); /* Sombra de glow reducida */
}

/* Main content under banner */
.menu-main {
  max-width: 1200px;
  margin: 40px auto 72px auto;
  padding: 0 24px 40px;
}

.menu-header {
  text-align: center;
  margin-bottom: 32px;
}

/* Subtitle sentence */
.menu-subtitle {
  max-width: 1000px;
  margin: 0 auto;
  font-size: 24px;
  line-height: 1.9;
  font-weight: 600;
  color: #1f2933;
}

/* Card that holds levels + buttons */
.menu-card {
  display: flex;
  justify-content: center;
}

.menu-card-inner {
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
  padding: 32px 40px;
  width: 100%;
}

/* Each level row */
.menu-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  column-gap: 32px;
  padding: 16px 0;
}

.menu-row + .menu-row {
  border-top: 1px solid #e5e7eb;
}

/* “Level 1, Level 2…” label */
.menu-level {
  font-weight: 700;
  font-size: 17px;
  color: #111827;
}

/* Container for the buttons */
.menu-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Base button style */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px; /* Redondeo reducido */
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  border: none;
  outline: none;
  box-shadow: 0 8px 18px rgba(15,23,42,0.25);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15,23,42,0.32);
  filter: brightness(1.05);
}

/* Small icon before text (emoji) */
.menu-btn-icon {
  font-size: 16px;
  color: #ffffff; 
  font-family: Arial, sans-serif;
  line-height: 1;
}

/* Category colors – consistent across all levels */
.menu-btn--study {
  background: #1f3b99;
}
.menu-btn--flashcards {
  background: #007fd6;
}
.menu-btn--scroll {
  background: #005d99;
}
.menu-btn--truth {
  background: #3b8596;
}
.menu-btn--pathfinder {
  background: #2c9b57;
}
.menu-btn--story {
  background: #3e6d2a;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero-overlay {
    align-items: flex-start;
    padding-top: 40px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 64px;
    margin-top: -15px; /* Ajuste responsive de la posición */
  }

  .menu-main {
    margin-top: 24px;
  }

  .menu-row {
    grid-template-columns: 1fr;
  }

  .menu-level {
    margin-bottom: 8px;
  }
}

/* =========================================
   STUDY PAGE LAYOUT (Página Study)
   ========================================= */

body.study-page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #02071a;
}

/* Banner Study (1920 x 445) */
.study-hero {
  position: relative;
  width: 100%;
  height: 445px; /* altura exacta del banner */
  background-image: url("Banner_Study_03.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff; /* Asegura el color del texto dentro del banner */
  display: flex;
  align-items: center;
  padding-left: 8%;
  box-sizing: border-box;
}

.study-hero::before {
  /* Overlay eliminado */
  content: none; 
}

.study-hero__content {
  position: relative;
  z-index: 1;
  /* Añadido un text-shadow para mejorar la legibilidad del texto blanco sobre la imagen */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); 
}

/* Título "Study" */
.study-hero__title {
  font-size: 58px; /* Mismo tamaño que Bible Learning en menú */
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #ffffff; /* Color blanco */
}

/* Subtítulo "Genesis - Level X" */
.study-hero__subtitle {
  font-size: 48px; /* Tamaño bastante más grande */
  font-weight: 600;
  color: #fce58a; /* Color amarillo fce58a */
  margin: 0;
}

/* Fondo azul con rayos + tarjeta */
.study-main {
  min-height: calc(100vh - 445px);
  background-image: url("Background_Layout_Study_Genesis1.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 40px 0 60px;
  box-sizing: border-box;
}

.study-card {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  padding: 32px 40px 40px;
  box-sizing: border-box;
}

.study-card__title {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

/* Status: Loaded - ocultado */
.status {
  display: none;
}

/* Accordion */
.accordion details {
  border-radius: 999px; /* Bordes redondeados por defecto */
  background: #f7f7f7;
  padding: 10px 18px;
  margin-bottom: 10px;
  border: 1px solid #ececec;
  overflow: hidden; /* Asegura que el contenido interno no desborde en el redondeo */
}

.accordion details[open] {
  border-radius: 18px; /* Redondeo menos pronunciado cuando está abierto */
  padding-bottom: 16px; /* Espacio extra cuando está abierto */
}

.accordion summary {
  list-style: none; /* Oculta el marcador nativo */
  cursor: pointer;
  position: relative; 
  padding-left: 25px; /* Deja espacio para la flecha personalizada */
  font-weight: 600; /* Hace el texto del summary más legible */
}

.accordion summary::-webkit-details-marker {
  display: none; /* Oculta el marcador nativo en Webkit */
}

/* Flecha personalizada a la izquierda (▸) */
.accordion summary::before {
  content: "▸"; 
  position: absolute;
  left: 8px; 
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em; 
  transition: transform 0.2s ease;
}

.accordion details[open] summary::before {
  transform: translateY(-50%) rotate(90deg); /* Rota la flecha al abrir */
}

/* Contenido de cada detalle */
.accordion details > *:not(summary) {
  padding-top: 10px;
  padding-right: 18px;
  padding-bottom: 5px; /* Ajuste para un espaciado más limpio */
  padding-left: 18px; /* Alineado con el texto del summary */
  border-top: 1px solid #e5e7eb; /* Separador entre summary y contenido */
  margin-left: 0; /* Elimina margen predeterminado de ul/ol */
  margin-right: 0;
}

.accordion p,
.accordion ul,
.accordion ol,
.accordion dl {
  margin-top: 10px; /* Asegura espacio si es el primer elemento */
  margin-bottom: 10px;
}

/* Eliminar margen inferior del último párrafo/lista para un espaciado más compacto */
.accordion details > *:not(summary):last-child {
    margin-bottom: 0;
    padding-bottom: 0; /* Para que no haya padding extra al final */
}


/* Botón Back to Menu */
.study-card__footer {
  text-align: center;
  margin-top: 24px;
}

.btn-back {
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 0.95rem;
  cursor: pointer;
  background: #2669c6;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-back:hover {
  background: #1f56a1;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.3);
}

/* Responsive para la página STUDY */
@media (max-width: 768px) {
  .study-hero {
    padding-left: 5%;
  }

  .study-hero__title {
    font-size: 40px;
  }

  .study-hero__subtitle {
    font-size: 30px;
  }

  .study-card {
    padding: 24px 25px 30px;
  }

  .accordion summary {
    padding-left: 20px;
  }
  .accordion summary::before {
    left: 5px;
  }
}
/* =========================================
   GAME PAGES (Scroll Scramble) - Genesis
   ========================================= */

body.game-page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #02071a;
}

/* Hero similar to Study */
.game-hero {
  position: relative;
  width: 100%;
  height: 445px;
  background-image: url("Banner_Study_03.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding-left: 8%;
  box-sizing: border-box;
}

.game-hero__content {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.game-hero__title {
  font-size: 58px;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #ffffff;
}

.game-hero__subtitle {
  font-size: 48px;
  font-weight: 600;
  color: #fce58a;
  margin: 0;
}

/* Background + centered card */
.game-main--genesis {
  min-height: calc(100vh - 445px);
  background-image: url("Background_Layout_Study_Genesis1.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 40px 0 60px;
  box-sizing: border-box;
}

.game-card {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
  padding: 32px 40px 40px;
  box-sizing: border-box;
}

/* Hide status line (keep for debug if you want) */
.game-page .status {
  display: none;
}

.game-footer {
  text-align: center;
  margin-top: 24px;
}

/* Buttons used by the game */
.btn-primary,
.btn-secondary,
.btn-ghost {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn-primary {
  background: #2669c6;
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  filter: brightness(1.03);
}

.btn-secondary {
  background: #0b3b63;
  color: #fff;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  filter: brightness(1.03);
}

.btn-ghost {
  background: #eef2f7;
  color: #111827;
}

.btn-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  filter: brightness(1.02);
}

/* Scramble layout */
.scramble-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: #f5f7fb;
  border: 1px solid #e6eaf2;
  border-radius: 16px;
  margin-bottom: 16px;
}

.scramble-hud__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #111827;
  font-size: 0.95rem;
}

.scramble-panel {
  padding: 4px 6px;
}

.scramble-label {
  margin: 0 0 10px 0;
  color: #111827;
}

.scramble-word {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 10px;
  text-align: center;
  padding: 18px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0a2a4a, #0d5ea8);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
  margin: 10px 0 18px;
  user-select: none;
}

.scramble-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.scramble-input {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid #d6dbe6;
  background: #ffffff;
  font-size: 1rem;
  outline: none;
}

.scramble-input:focus {
  border-color: #2669c6;
  box-shadow: 0 0 0 4px rgba(38,105,198,0.16);
}

.muted {
  color: #6b7280;
  font-size: 0.95rem;
  text-align: center;
}

.scramble-hint {
  margin-top: 8px;
}

.scramble-feedback {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5f7fb;
  border: 1px solid #e6eaf2;
}

.scramble-feedback--good {
  background: #e9f8ef;
  border-color: #bfe8cd;
  color: #0f5132;
}

.scramble-feedback--bad {
  background: #fdecec;
  border-color: #f5c2c7;
  color: #842029;
}

.scramble-feedback--neutral {
  background: #f5f7fb;
  border-color: #e6eaf2;
  color: #111827;
}

.scramble-end {
  margin-top: 18px;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid #e6eaf2;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  text-align: center;
}

.scramble-end__title {
  margin: 0 0 8px;
}

.scramble-end__text {
  margin: 0 0 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .game-hero {
    padding-left: 5%;
  }

  .game-hero__title {
    font-size: 40px;
  }

  .game-hero__subtitle {
    font-size: 30px;
  }

  .game-card {
    padding: 24px 25px 30px;
  }

  .scramble-word {
    font-size: 32px;
    letter-spacing: 7px;
  }

  .scramble-input {
    min-width: 100%;
  }
}
