/* =====================================================
   FALLTEM — GAME SHELL
   Estructura común para TODOS los juegos
   ===================================================== */

/* =========================
   SECCIÓN DE JUEGO
   ========================= */

section.juego {
  display: block;
  margin-top: 2rem;
}

/* Contenedor interno común */
.juego .game-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

/* Asegura ancho completo interno */
.juego .game-shell > * {
  width: 100%;
}

/* Evita choque con el botón ? en mobile */
@media (max-width: 767px) {
  .juego .game-shell {
    padding-top: clamp(2.5rem, 8vw, 3.5rem);
  }
}

/* Aire visual desktop */
@media (min-width: 900px) {
  .juego .game-shell {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* =========================
   BOTÓN AYUDA (?)
   ========================= */

.fab-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

/* =========================
   MODAL AYUDA
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 520px;
  width: calc(100% - 2rem);
  max-height: 85vh;
  overflow: auto;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

/* Cerrar */
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* =========================
   TÍTULO
   ========================= */

.modal-title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 900;
}

/* =========================
   SOLAPAS (TABS)
   ========================= */

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modal-tabs .tab {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e7eb);
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
}

.modal-tabs .tab.active {
  background: #ffffff;
  border-color: var(--brand, #2563eb);
}

/* =========================
   CONTENIDO DEL MODAL
   ========================= */

.modal-content {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Paneles */
.tab-panel {
  display: block;
}

.tab-panel[hidden] {
  display: none;
}

/* =========================
   ACCIONES
   ========================= */

.modal-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* =========================
   TEXTO AUXILIAR
   ========================= */

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
}

/* =========================
   Ajuste FAB ayuda – Mobile
   ========================= */
@media (max-width: 480px) {
  section.juego .game-shell {
    padding-top: clamp(3.5rem, 10vw, 4.5rem);
  }
}