/* ==============================================================================
   CREDIOLIMPIADAS / CREDIJUEGOS - ESTILOS PRINCIPALES DEL PORTAL
   Archivo: apps/juegos/public/styles/app.css
   Layout responsive mobile-first (360px+), Auth Tabs, OTP 6-box, Modal y Animaciones
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700;800&family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800;900&display=swap');

/* --- Reset y Estilos Globales --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.cc-game-lock-active {
  overscroll-behavior-y: contain !important;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  background-color: var(--cc-theme-bg);
  color: var(--cc-theme-text-primary);
  font-family: var(--cc-font-sans);
  background-image: var(--cc-theme-bg-gradient);
  background-attachment: scroll;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

@media (min-width: 769px) {
  body {
    background-attachment: fixed;
  }
}

/* Contenedor Principal SPA */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* ------------------------------------------------------------------------------
   HEADER SUPERIOR / HUD BAR (Visible en todo momento)
   ------------------------------------------------------------------------------ */
.arcade-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--cc-theme-header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--cc-theme-header-border);
  box-shadow: 0 4px 20px rgba(18, 44, 92, 0.08);
  padding: 0.6rem 1rem;
}

.arcade-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.arcade-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  cursor: pointer;
}

.arcade-header__logo {
  height: 36px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.08));
}

.arcade-header__emblem-badge {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.arcade-header__emblem-badge:hover {
  transform: scale(1.05);
}

.arcade-header__badge {
  display: none;
  background: linear-gradient(135deg, var(--cc-orange), var(--cc-orange-dark));
  color: #fff;
  font-family: var(--cc-font-arcade);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-orange-light);
  letter-spacing: 0.05em;
}

.arcade-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* HUD de Puntos Acumulados */
.hud-score-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(180deg, #13224F 0%, #0D1B3E 100%);
  border: 2px solid #FFA858;
  border-radius: var(--cc-radius-pill);
  padding: 0.35rem 0.85rem;
  box-shadow:
    0 3px 0 #8A3E00,
    0 4px 8px rgba(0, 0, 0, 0.4);
}

.hud-score-chip__coin {
  font-size: 1.15rem;
  line-height: 1;
}

.hud-score-chip__val {
  font-family: var(--cc-font-arcade);
  font-size: 0.85rem;
  color: #FFD280;
  text-shadow: 0 0 6px rgba(255, 168, 88, 0.7);
  letter-spacing: 0.04em;
}

/* Perfil de Usuario en Header */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(19, 34, 79, 0.8);
  border: 1.5px solid var(--cc-navy-500);
  border-radius: var(--cc-radius-pill);
  padding: 0.25rem 0.6rem 0.25rem 0.35rem;
}

.user-profile-badge__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cc-sky), var(--cc-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  border: 2px solid #fff;
}

.user-profile-badge__info {
  display: none;
  flex-direction: column;
}

.user-profile-badge__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-badge__dept {
  font-size: 0.65rem;
  color: var(--cc-sky-light);
}

.user-profile-badge__logout {
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  transition: color var(--cc-transition-fast);
}

.user-profile-badge__logout:hover {
  color: var(--cc-red-light);
}

/* ------------------------------------------------------------------------------
   PANTALLA DE AUTENTICACIÓN (LOGIN & REGISTRO)
   ------------------------------------------------------------------------------ */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  width: 100%;
  min-height: calc(100vh - 65px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--cc-theme-surface-card);
  border: 2.5px solid var(--cc-theme-border);
  border-radius: 28px;
  padding: 2.2rem 1.75rem;
  box-shadow: var(--cc-theme-card-shadow);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--cc-orange) 0%, var(--cc-sky) 50%, var(--cc-green) 100%);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-header__logo {
  height: 54px;
  width: auto;
  max-width: 195px;
  margin-bottom: 0.75rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.auth-header__emblem {
  width: 100%;
  max-width: 290px;
  height: auto;
  margin: 0.25rem 0 0.5rem;
  filter: drop-shadow(0 8px 16px rgba(18, 44, 92, 0.16));
  transition: transform var(--cc-transition-normal) ease;
}

.auth-header__emblem:hover {
  transform: scale(1.02);
}

.auth-header__title {
  font-family: var(--cc-font-pill);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cc-theme-text-primary);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.auth-header__subtitle {
  font-size: 0.85rem;
  color: var(--cc-theme-text-muted);
  margin-top: 0.25rem;
}

/* Tabs Arcade */
.auth-tabs {
  display: flex;
  background: var(--cc-theme-surface-alt);
  border-radius: var(--cc-radius-pill);
  padding: 4px;
  margin-bottom: 1.5rem;
  border: 2px solid var(--cc-theme-border);
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--cc-theme-text-muted);
  font-family: var(--cc-font-pill);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.6rem 0.5rem;
  border-radius: var(--cc-radius-pill);
  cursor: pointer;
  transition: background-color var(--cc-transition-fast), color var(--cc-transition-fast), box-shadow var(--cc-transition-fast);
}

.auth-tab.active {
  background: linear-gradient(180deg, var(--cc-sky), var(--cc-blue));
  color: #fff;
  box-shadow: 0 3px 0 var(--cc-blue-deep);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Formulario */
.form-group {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cc-theme-text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.2;
}

.form-input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 1rem;
  background: var(--cc-theme-input-bg);
  border: 2px solid var(--cc-theme-input-border);
  border-radius: 12px;
  color: var(--cc-theme-text-primary);
  font-family: var(--cc-font-sans);
  font-size: 0.95rem;
  transition: border-color var(--cc-transition-fast), box-shadow var(--cc-transition-fast);
  outline: none;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--cc-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(46, 109, 180, 0.25);
}

.form-input.is-valid {
  border-color: var(--cc-green);
  box-shadow: 0 0 0 2px rgba(63, 185, 80, 0.3);
}

.form-input.is-invalid {
  border-color: var(--cc-red);
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.3);
}

.form-feedback {
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.3;
  min-height: 1.3em; /* Reserva espacio para que la pantalla no salte/brinque al escribir */
}

.form-feedback--error {
  color: var(--cc-red-light);
}

.form-feedback--success {
  color: var(--cc-green-light);
}

.form-feedback--hint {
  color: var(--cc-gray-400);
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}

.auth-forgot-link {
  background: transparent;
  border: none;
  color: var(--cc-blue);
  font-family: var(--cc-font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0;
  text-decoration: none;
  transition: color var(--cc-transition-fast), text-decoration var(--cc-transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.auth-forgot-link:hover {
  color: var(--cc-orange);
  text-decoration: underline;
}

.auth-forgot-link:focus-visible {
  outline: 2px solid var(--cc-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-recovery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(46, 109, 180, 0.12);
  border: 1px solid rgba(46, 109, 180, 0.35);
  border-radius: var(--cc-radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cc-blue-deep);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0.35rem auto 0.5rem auto;
}

.auth-recovery-title {
  font-family: var(--cc-font-pill);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cc-theme-text-primary);
  text-align: center;
  margin: 0 0 0.35rem 0;
}

.auth-recovery-desc {
  font-size: 0.86rem;
  color: var(--cc-theme-text-muted);
  text-align: center;
  line-height: 1.45;
  margin: 0 0 1.1rem 0;
}

/* ------------------------------------------------------------------------------
   MODAL DE SESIÓN REEMPLAZADA / TERMINADA (JUEGO LIMPIO)
   ------------------------------------------------------------------------------ */
.session-terminated-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 20, 51, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease-out;
}

.session-terminated-card {
  width: 100%;
  max-width: 460px;
  background: var(--cc-theme-surface-card);
  border: 2.5px solid var(--cc-orange);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(242, 140, 40, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.session-terminated-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--cc-orange), #FFA858, var(--cc-red));
}

.session-terminated-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.session-terminated-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--cc-radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--cc-red-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.session-terminated-title {
  font-family: var(--cc-font-pill);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cc-theme-text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.session-terminated-message {
  font-size: 0.92rem;
  color: var(--cc-theme-text-primary);
  line-height: 1.5;
  margin: 0 0 0.85rem 0;
}

.session-terminated-rule {
  background: rgba(46, 109, 180, 0.09);
  border: 1px dashed var(--cc-blue);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--cc-blue-deep);
  line-height: 1.45;
  text-align: left;
  margin: 0.35rem 0 0.85rem 0;
}

.session-terminated-sub {
  font-size: 0.82rem;
  color: var(--cc-theme-text-muted);
  line-height: 1.45;
  margin: 0 0 1.25rem 0;
}

/* ------------------------------------------------------------------------------
   PANTALLA OTP DE 6 DÍGITOS
   ------------------------------------------------------------------------------ */
.otp-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.otp-icon-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cc-sky), var(--cc-blue));
  border: 3px solid #82BCFF;
  box-shadow: 0 6px 0 #12365F, 0 8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.otp-boxes {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin: 1.5rem 0;
  width: 100%;
}

.otp-box {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: var(--cc-font-arcade);
  font-size: 1.4rem;
  color: var(--cc-orange-dark);
  background: var(--cc-theme-input-bg);
  border: 3px solid var(--cc-theme-input-border);
  border-radius: 12px;
  outline: none;
  transition: all var(--cc-transition-fast) ease;
  box-shadow: inset 0 2px 4px rgba(10, 20, 50, 0.05);
}

.otp-box:focus {
  border-color: var(--cc-orange);
  background: #FFFFFF;
  box-shadow:
    0 0 0 3px rgba(255, 168, 88, 0.4),
    inset 0 1px 2px rgba(10, 20, 50, 0.05);
  transform: translateY(-2px);
}

.otp-timer {
  font-family: var(--cc-font-arcade);
  font-size: 0.95rem;
  color: var(--cc-blue);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.otp-timer.is-warning {
  color: var(--cc-red);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.otp-resend {
  background: none;
  border: none;
  color: var(--cc-blue);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 1rem;
  transition: color var(--cc-transition-fast);
}

.otp-resend:disabled {
  color: var(--cc-gray-400);
  cursor: not-allowed;
  text-decoration: none;
}

/* ------------------------------------------------------------------------------
   DASHBOARD / MENÚ PRINCIPAL ARCADE
   ------------------------------------------------------------------------------ */
.dashboard-view {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.arcade-hero {
  text-align: center;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arcade-hero__logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
}

.arcade-hero__emblem {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(18, 44, 92, 0.25));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arcade-hero__emblem:hover {
  transform: scale(1.03) translateY(-2px);
  filter: drop-shadow(0 12px 28px rgba(242, 140, 40, 0.35));
}

.arcade-hero__subtitle {
  font-family: var(--cc-font-arcade);
  font-size: 0.75rem;
  color: var(--cc-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.arcade-hero__title {
  font-family: var(--cc-font-pill);
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, #0A1433 0%, #1E40AF 60%, #F28C28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(46, 109, 180, 0.2));
  line-height: 1.15;
}

/* Layout del Menú: Botones Principales y Tarjeta Destacada */
.arcade-menu-layout {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Tarjeta Destacada: Credillonario */
.credillonario-card {
  position: relative;
  background: linear-gradient(145deg, #FFFFFF 0%, #F4F8FD 100%);
  border: 3.5px solid #FFA858;
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow:
    0 16px 36px rgba(242, 140, 40, 0.16),
    0 4px 12px rgba(10, 25, 60, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
}

.credillonario-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 168, 88, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.credillonario-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.credillonario-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.credillonario-card__title {
  font-family: var(--cc-font-pill);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cc-theme-text-primary);
}

.credillonario-card__desc {
  font-size: 0.9rem;
  color: var(--cc-theme-text-secondary);
  line-height: 1.4;
}

.credillonario-card__stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cc-theme-surface);
  border: 1.5px solid var(--cc-theme-border);
  border-radius: var(--cc-radius-pill);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--cc-theme-text-secondary);
  font-weight: 600;
}

.stat-pill strong {
  color: var(--cc-orange-dark);
}

/* Columna de Botones Píldora 3D de Juegos */
.arcade-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

/* ------------------------------------------------------------------------------
   CUADRÍCULA DE JUEGOS ARCADE EN 4 COLUMNAS (RESPONSIVE)
   ------------------------------------------------------------------------------ */
.arcade-games-grid-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.arcade-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
}

@media (min-width: 600px) {
  .arcade-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 900px) {
  .arcade-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .arcade-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Tarjeta Arcade Ilustrada de Juego */
.game-art-card {
  position: relative;
  background: linear-gradient(180deg, #16244E 0%, #0B1433 100%);
  border: 3.5px solid #3B82F6;
  border-radius: 22px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  box-shadow:
    0 9px 0 #0E1A38,
    0 14px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

@media (min-width: 900px) {
  .game-art-card {
    padding: 0.85rem;
    border-radius: 26px;
    box-shadow:
      0 10px 0 #0E1A38,
      0 18px 36px rgba(0, 0, 0, 0.5),
      inset 0 1.5px 2px rgba(255, 255, 255, 0.3);
  }
}

.game-art-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #FFA858;
  box-shadow:
    0 13px 0 #0E1A38,
    0 18px 30px rgba(255, 168, 88, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.game-art-card:active {
  transform: translateY(4px);
  box-shadow:
    0 4px 0 #0E1A38,
    0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Variantes temáticas de borde y resplandor */
.game-art-card--trivia {
  border-color: #F59E0B;
}
.game-art-card--trivia:hover {
  border-color: #FBBF24;
  box-shadow:
    0 13px 0 #78350F,
    0 18px 32px rgba(245, 158, 11, 0.4);
}

.game-art-card--penales {
  border-color: #6366F1;
}
.game-art-card--penales:hover {
  border-color: #A5B4FC;
  box-shadow:
    0 13px 0 #1E1B4B,
    0 18px 32px rgba(99, 102, 241, 0.45);
}

.game-art-card--beisbol {
  border-color: #3B82F6;
}
.game-art-card--beisbol:hover {
  border-color: #60A5FA;
  box-shadow:
    0 13px 0 #1E3A8A,
    0 18px 32px rgba(59, 130, 246, 0.4);
}

.game-art-card--rally {
  border-color: #8B5CF6;
}
.game-art-card--rally:hover {
  border-color: #A78BFA;
  box-shadow:
    0 13px 0 #4C1D95,
    0 18px 32px rgba(139, 92, 246, 0.4);
}

.game-art-card.is-completed {
  border-color: #EF4444 !important;
}

/* Envoltura de la Ilustración */
.game-art-card__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #0A1433;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.game-art-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-art-card:hover .game-art-card__img {
  transform: scale(1.06);
}

/* Badge de Estado sobre la Ilustración */
.game-art-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  background: rgba(10, 20, 51, 0.88);
  backdrop-filter: blur(4px);
  color: #FFA858;
  font-family: var(--cc-font-arcade, monospace);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 168, 88, 0.4);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Pie de la tarjeta */
.game-art-card__footer {
  width: 100%;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-art-card__title {
  font-family: var(--cc-font-pill, sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.15;
}

.game-art-card__sub {
  font-family: var(--cc-font-arcade, monospace);
  font-size: 0.65rem;
  color: #82CEFA;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .game-art-card__footer {
    padding-top: 0.75rem;
    gap: 4px;
  }
  .game-art-card__title {
    font-size: 1.25rem;
  }
  .game-art-card__sub {
    font-size: 0.78rem;
  }
  .game-art-card__badge {
    top: 8px;
    left: 8px;
    right: 8px;
    font-size: 0.72rem;
    padding: 4px 8px;
  }
}

/* ------------------------------------------------------------------------------
   PANTALLA DE CARGA ARCADE (LOADING SCREEN PRINCIPAL - TEMA CLARO CORPORATIVO)
   ------------------------------------------------------------------------------ */
.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #EEF5FC;
  background-image:
    radial-gradient(circle at 50% 30%, rgba(79, 179, 232, 0.22) 0%, transparent 65%),
    linear-gradient(to right, rgba(46, 109, 180, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(46, 109, 180, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #EEF5FC 0%, #F8FAFD 50%, #E3EFFB 100%);
  background-size: 100% 100%, 28px 28px, 28px 28px, 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-loading-overlay.is-fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-box {
  background: #FFFFFF;
  border: 2px solid #D2E4F8;
  border-radius: 28px;
  padding: 2.75rem 2.25rem 2.25rem;
  max-width: 460px;
  width: 100%;
  box-shadow:
    0 24px 60px rgba(18, 44, 92, 0.12),
    0 4px 16px rgba(18, 44, 92, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: loadingPopIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes loadingPopIn {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.app-loading-box__strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #122C5C, #2E6DB4, #F28C28, #3FB950);
}

.app-loading-logo {
  height: 125px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  margin-bottom: 1.35rem;
  filter: drop-shadow(0 10px 24px rgba(18, 44, 92, 0.22));
  animation: logoFloat 3s ease-in-out infinite;
  image-rendering: -webkit-optimize-contrast;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.02); }
}

.app-loading-badge {
  background: linear-gradient(135deg, #F28C28 0%, #EA580C 100%);
  border: 2px solid #FED7AA;
  border-radius: 9999px;
  padding: 0.45rem 1.4rem;
  font-family: var(--cc-font-arcade, monospace);
  font-size: 0.82rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38);
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.app-loading-spinner-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-loading-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #E2EDF9;
  border-top-color: #F28C28;
  border-right-color: #2E6DB4;
  border-bottom-color: #3FB950;
  animation: arcadeSpin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
  box-shadow: 0 0 16px rgba(46, 109, 180, 0.25);
}

.app-loading-spinner-icon {
  font-size: 1.65rem;
  animation: pulseIcon 1.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

@keyframes pulseIcon {
  0% { transform: scale(0.92); }
  100% { transform: scale(1.18); }
}

@keyframes arcadeSpin {
  to { transform: rotate(360deg); }
}

.app-loading-title {
  font-family: var(--cc-font-arcade, monospace);
  font-size: 1.05rem;
  font-weight: 900;
  color: #0A1433;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(10, 20, 51, 0.1);
}

.app-loading-subtext {
  font-family: var(--cc-font-sans, sans-serif);
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 1.35rem;
  line-height: 1.4;
}

.app-loading-progress-track {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: #E2EDF9;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.35rem;
  box-shadow: inset 0 1px 3px rgba(18, 44, 92, 0.12);
}

.app-loading-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #2E6DB4, #4FB3E8, #3FB950, #F28C28, #2E6DB4);
  background-size: 200% 100%;
  border-radius: 9999px;
  animation: progressShimmer 1.8s ease-in-out infinite;
}

@keyframes progressShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.app-loading-seal {
  font-family: var(--cc-font-sans, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------------------
   BOTONES LATERALES FLOTANTES (REFERENCIA "AWESOME GAME")
   ------------------------------------------------------------------------------ */
.arcade-floating-dock {
  position: fixed;
  right: 1rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 90;
}

/* ------------------------------------------------------------------------------
   MODAL / DRAWER DE OPCIONES Y CRÉDITOS
   ------------------------------------------------------------------------------ */
.arcade-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: rgba(5, 10, 26, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.arcade-modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cc-theme-surface-card);
  border: 3px solid var(--cc-theme-border);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(18, 44, 92, 0.16);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.arcade-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arcade-modal__title {
  font-family: var(--cc-font-pill);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cc-orange-dark);
}

.arcade-modal__close {
  background: transparent;
  border: none;
  color: var(--cc-theme-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.arcade-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cc-theme-border);
}

.arcade-setting-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cc-theme-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.arcade-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.arcade-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.arcade-toggle__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 34px;
}

.arcade-toggle__slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.arcade-toggle input:checked + .arcade-toggle__slider {
  background-color: var(--cc-green);
}

.arcade-toggle input:checked + .arcade-toggle__slider:before {
  transform: translateX(22px);
}

/* ------------------------------------------------------------------------------
   TOAST / NOTIFICACIONES ARCADE
   ------------------------------------------------------------------------------ */
.arcade-toast-container {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.arcade-toast {
  pointer-events: auto;
  padding: 0.75rem 1.25rem;
  border-radius: var(--cc-radius-pill);
  font-family: var(--cc-font-pill);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  animation: slideInRight 0.25s ease-out;
}

.arcade-toast--success {
  background: linear-gradient(180deg, #6AE87A 0%, #3FB950 100%);
  border: 2px solid #7EF78D;
  color: #fff;
}

.arcade-toast--error {
  background: linear-gradient(180deg, #FF6E6B 0%, #E53935 100%);
  border: 2px solid #FF8F8C;
  color: #fff;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ------------------------------------------------------------------------------
   MEDIA QUERIES (MOBILE-FIRST)
   ------------------------------------------------------------------------------ */

/* Mobile Estándar (360px a 767px) */
@media (max-width: 767px) {
  .otp-box {
    width: 42px;
    height: 52px;
    font-size: 1.25rem;
  }
  .otp-boxes {
    gap: 0.35rem;
  }
  .dashboard-view {
    padding: 0.85rem 0.75rem 2.5rem;
    gap: 1.25rem;
  }
  .arcade-hero__emblem {
    max-width: 195px;
  }
}

@media (max-width: 480px) {
  .auth-header__logo {
    height: 46px;
    max-width: 165px;
    margin-bottom: 0.5rem;
  }
  .arcade-header {
    padding: 0.35rem 0.6rem;
  }
  .arcade-header__inner {
    gap: 0.4rem;
  }
  .arcade-header__brand {
    gap: 0.35rem;
  }
  .arcade-header__logo,
  .arcade-header__emblem-badge {
    height: 28px;
    max-width: 105px;
  }
  .arcade-header__right {
    gap: 0.4rem;
  }
  .hud-score-chip {
    padding: 0.25rem 0.55rem;
    gap: 0.3rem;
  }
  .hud-score-chip__coin {
    font-size: 0.95rem;
  }
  .hud-score-chip__val {
    font-size: 0.7rem;
  }
  .user-profile-badge {
    padding: 0.2rem 0.45rem 0.2rem 0.25rem;
    gap: 0.35rem;
  }
  .user-profile-badge__avatar {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }
}

/* Tablet (768px+) */
@media (min-width: 768px) {
  .arcade-header__badge {
    display: inline-block;
  }
  .user-profile-badge__info {
    display: flex;
  }
  .arcade-menu-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .arcade-hero__title {
    font-size: 2.8rem;
  }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
  .dashboard-view {
    max-width: 1200px;
    padding-top: 2rem;
  }
  .arcade-menu-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .arcade-hero__title {
    font-size: 3.2rem;
  }
}

/* ==============================================================================
   COLETILLA INSTITUCIONAL: VP DE ESTRATEGIA Y EFICIENCIA DIGITAL
   Gerencia Estrategia Inteligencia Artificial · Diseño Elegante y Profesional
   ============================================================================== */
.corporate-leadership-footer {
  width: 100%;
  max-width: 960px;
  margin: 3rem auto 1.5rem auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.corporate-leadership-footer__bar {
  width: 100%;
  max-width: 380px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(130, 206, 250, 0.4) 25%, rgba(242, 140, 40, 0.6) 50%, rgba(139, 92, 246, 0.4) 75%, transparent 100%);
  margin-bottom: 1.2rem;
}

.corporate-leadership-footer__card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(130, 206, 250, 0.35);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(10, 20, 51, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.corporate-leadership-footer__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(10, 20, 51, 0.08);
}

.corporate-leadership-footer__entity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.corporate-leadership-footer__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.corporate-leadership-footer__vp {
  font-family: var(--cc-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #0A1433;
  line-height: 1.2;
}

.corporate-leadership-footer__gerencia {
  font-family: var(--cc-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #1E336A;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.corporate-leadership-footer__sparkle {
  color: #F28C28;
  font-size: 0.75rem;
}

.corporate-leadership-footer__copy {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: #64748B;
  letter-spacing: 0.4px;
}

/* Coletilla en Login / Auth Card */
.auth-leadership-badge {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(208, 224, 243, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  width: 100%;
}

.auth-leadership-badge__vp {
  font-family: var(--cc-font-sans, 'Inter', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0A1433;
}

.auth-leadership-badge__gerencia {
  font-family: var(--cc-font-sans, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #1E336A;
}
