/* ============================================================
   VOKLY — main.css
   Variables globales, reset, layout y vistas principales
   ============================================================ */

/* Las fuentes se sirven desde css/fonts.css (self-hosteadas en /public/fonts).
   Acá había un @import a fonts.googleapis.com que sobrevivió al self-hosting
   del 15/07: se sacaron los <link> de los HTML pero no se miró adentro de los
   CSS. El CSP lo bloqueaba (style-src no incluye Google), así que no llegó a
   filtrar ninguna IP — pero tiraba un error en consola en cada carga y, si
   alguien aflojaba el CSP, la fuga se reabría sola.
   NO volver a poner @import de fuentes externas. */

/* --- Variables de diseño --- */
:root {
  /* Brand colors */
  --color-yellow:        #FFD400;
  --color-yellow-dim:    rgba(255, 212, 0, 0.12);
  --color-yellow-glow:   rgba(255, 212, 0, 0.25);
  --color-purple:        #7B2FFF;
  --color-purple-dim:    rgba(123, 47, 255, 0.15);
  --color-purple-glow:   rgba(123, 47, 255, 0.3);

  /* Aliases semánticos */
  --color-primary:       var(--color-yellow);
  --color-secondary:     var(--color-purple);
  --color-success:       #22C55E;
  --color-error:         #EF4444;
  --color-warning:       #F59E0B;
  --color-xp:            var(--color-yellow);

  /* Fondos */
  --bg-base:             #090A10;
  --bg-primary:          #090A10;
  --bg-surface:          #0F1120;
  --bg-card:             #13162A;
  --bg-card-hover:       #1A1F38;
  --bg-border:           #1E2340;

  /* Texto */
  --text-primary:        #F1F5F9;
  --text-secondary:      #8892B0;
  --text-muted:          #4A5568;

  /* Tipografía */
  --font-display:        'Space Grotesk', system-ui, sans-serif;
  --font-main:           'Inter', system-ui, sans-serif;
  --font-mono:           'JetBrains Mono', 'Fira Code', monospace;

  /* Espaciados */
  --spacing-xs:          4px;
  --spacing-sm:          8px;
  --spacing-md:          16px;
  --spacing-lg:          24px;
  --spacing-xl:          32px;
  --spacing-2xl:         48px;

  /* Border radius */
  --radius-sm:           6px;
  --radius-md:           12px;
  --radius-lg:           20px;
  --radius-xl:           28px;
  --radius-full:         9999px;

  /* Sombras */
  --shadow-card:         0 0 0 1px var(--bg-border);
  --shadow-yellow:       0 0 24px var(--color-yellow-glow);
  --shadow-purple:       0 0 24px var(--color-purple-glow);

  /* Profundidad — blur grande, opacidad baja (elevación real) */
  --shadow-sm:           0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md:           0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg:           0 16px 48px rgba(0, 0, 0, 0.45);

  /* Highlight superior: simula luz cayendo desde arriba */
  --border-top-light:    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Glow de acento (colores reales de marca) */
  --glow-accent:         0 0 24px rgba(255, 212, 0, 0.35);
  --glow-purple-soft:    0 0 24px rgba(123, 47, 255, 0.30);

  /* Curva de movimiento con vida (spring suave) */
  --ease-spring:         cubic-bezier(.34, 1.56, .64, 1);
}

/* --- Reset base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
}

/* --- Utilidades --- */
.hidden { display: none !important; }

/* ============================================================
   LANDING — index.html
   ============================================================ */

.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Glow de fondo decorativo */
.landing::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.12) 0%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.landing::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.07) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  pointer-events: none;
}

.landing__content {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.landing__logo-img {
  max-height: 48px;
  width: auto;
  display: block;
}

.landing__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  color: var(--color-yellow);
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: var(--shadow-yellow);
}

.landing__tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 360px;
}

.landing__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--spacing-sm);
}

/* ============================================================
   AUTH FORMS — index.html
   ============================================================ */

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
}

.auth-form__card {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.auth-form__card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-form__switch {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-form__switch a {
  color: var(--color-yellow);
  text-decoration: none;
  font-weight: 600;
}

/* Formularios */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group select {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: border-color 0.2s;
  width: 100%;
}

.form-group select:invalid {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-yellow);
  box-shadow: 0 0 0 3px var(--color-yellow-dim);
}

/* Ojito para mostrar/ocultar contraseña (js/password-toggle.js) */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input.has-toggle {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.password-toggle:hover {
  color: var(--color-yellow);
}

.password-toggle i,
.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Atribución "by Clika Tech" (js/clika-attribution.js) — discreta, secundaria,
   nunca más prominente que el logo de Vokly. */
.clika-attribution {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.55;
  text-decoration: none;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
  font-family: var(--font-main, sans-serif);
  transition: opacity 0.2s ease;
}

.clika-attribution:hover,
.clika-attribution:focus-visible {
  opacity: 1;
  outline: none;
}

.clika-attribution span {
  font-size: 12px;
  line-height: 1;
}

.clika-attribution img {
  height: 18px;
  width: auto;
  display: block;
  max-width: 100%;
}

/* Centrada en auth y config; en el footer sigue el layout existente */
.clika-attribution--center {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* Modal de confirmación con la estética de la app (js/ui.js mostrarConfirm) */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.confirm-modal-overlay.open {
  opacity: 1;
}

.confirm-modal {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal-overlay.open .confirm-modal {
  transform: none;
}

.confirm-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  background: var(--color-yellow-dim);
  color: var(--color-yellow);
}

.confirm-modal__icon i,
.confirm-modal__icon svg {
  width: 26px;
  height: 26px;
}

.confirm-modal__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.confirm-modal__msg {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.confirm-modal__actions {
  display: flex;
  gap: 10px;
}

.confirm-modal__actions .btn {
  flex: 1;
}

@media (max-width: 400px) {
  .confirm-modal__actions {
    flex-direction: column-reverse;
  }
}

/* Dos campos lado a lado (ej: género + edad en el registro) */
.form-row {
  display: flex;
  gap: var(--spacing-sm);
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
}

/* ============================================================
   APP HEADER — app.html
   ============================================================ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: var(--spacing-sm);
}

.app-header__logo {
  max-height: 40px;
  width: auto;
  display: block;
}

.app-header a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.app-header__stats {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

/* Cada stat en una pill redondeada */
.stat {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  padding: 4px 12px;
}

.stat--streak { color: #FF6B35; }
.stat--xp     { color: var(--color-yellow); }
.stat--lives  { color: #FF4D6D; }

.stat svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.25;
  vertical-align: -2px;
  display: inline;
  margin-right: 3px;
  transition: filter 0.3s, color 0.3s;
}

/* Vidas: pulso rojo al perder una */
.stat--lives.lose-life {
  animation: screen-shake 0.4s ease;
  color: var(--color-error) !important;
}

/* Racha: la llama crece de intensidad según los días consecutivos */
.stat.streak--tier-0 { color: var(--text-muted); }
.stat.streak--tier-1 { color: #FF6B35; }
.stat.streak--tier-2 { color: #FF6B35; }
.stat.streak--tier-2 svg { filter: drop-shadow(0 0 4px rgba(255, 107, 53, 0.6)); }
.stat.streak--tier-3 svg { filter: drop-shadow(0 0 7px rgba(255, 107, 53, 0.85)); animation: flame-pulse 1.4s ease-in-out infinite; }
.stat.streak--tier-4 { color: #FFB000; }
.stat.streak--tier-4 svg { filter: drop-shadow(0 0 10px rgba(255, 176, 0, 0.9)); animation: flame-pulse 0.9s ease-in-out infinite; }

@keyframes flame-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* Flip vertical del número cuando un stat cambia de valor */
.stat-flip {
  display: inline-block;
  animation: stat-flip 0.4s ease;
}

@keyframes stat-flip {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

/* Bounce + glow amarillo al ganar XP */
.stat--gain {
  animation: stat-gain 0.55s ease;
}

@keyframes stat-gain {
  0%, 100% { transform: scale(1);    text-shadow: none; }
  40%       { transform: scale(1.18); text-shadow: 0 0 14px rgba(255, 212, 0, 0.9); }
}

/* ============================================================
   VISTAS — estructura base
   ============================================================ */

.view {
  padding: var(--spacing-md);
  max-width: 680px;
  margin: 0 auto;
}

/* Transición de entrada entre vistas */
.view-enter {
  animation: view-enter 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   DASHBOARD — app.html
   ============================================================ */

.dashboard {
  padding-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.dashboard__welcome {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.dashboard__welcome h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background-color: var(--color-yellow-dim);
  border: 1px solid var(--color-yellow-glow);
  color: var(--color-yellow);
  border-radius: var(--radius-full);
  padding: 2px var(--spacing-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: fit-content;
  font-family: var(--font-display);
}

.dashboard__section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
}

.dashboard__modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 500px) {
  .dashboard__modules {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   ONBOARDING — selección de perfil
   ============================================================ */

.onboarding {
  padding: var(--spacing-lg) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
}

.onboarding__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-yellow);
}

.onboarding__title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
}

.onboarding__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 320px;
  line-height: 1.6;
}

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  width: 100%;
  max-width: 560px;
}

@media (min-width: 480px) {
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tarjeta de perfil */
.profile-card {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-sm);
  text-align: left;
}

.profile-card:hover {
  border-color: var(--color-yellow);
  background-color: var(--bg-card-hover);
  box-shadow: var(--shadow-yellow);
  transform: translateY(-2px);
}

.profile-card:active {
  transform: translateY(0);
}

.profile-card--active {
  border-color: var(--color-yellow);
  background-color: var(--color-yellow-dim);
  cursor: default;
}

.profile-card--active:hover {
  transform: none;
  box-shadow: none;
}

.profile-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--color-yellow-dim);
  border-radius: var(--radius-md);
  color: var(--color-yellow);
}

.profile-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 1.75;
}

.profile-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   POPUP DE XP
   ============================================================ */

.xp-popup {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  background-color: var(--color-yellow);
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 200;
  box-shadow: var(--shadow-yellow);
}

.xp-popup.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  top: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--bg-border);
  border-top-color: var(--color-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--spacing-xl) auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVE — breakpoint principal 390px (iPhone 14)
   ============================================================ */

/* mobile base: <= 390px */
@media (max-width: 390px) {
  .view {
    padding: var(--spacing-sm);
  }

  .app-header {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .app-header__logo {
    max-height: 32px;
  }

  .app-header__stats {
    gap: var(--spacing-sm);
  }

  .stat {
    font-size: 0.8rem;
  }

  .profile-card {
    padding: var(--spacing-md);
  }

  .dashboard__welcome h2 {
    font-size: 1.4rem;
  }

  .xp-popup {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 1rem;
  }
}

/* > 390px: profile-cards y módulos en columna única */
/* > 480px: 2 columnas (ver .profiles-grid y .dashboard__modules) */

/* ============================================================
   LANDING — variables adicionales
   ============================================================ */
:root {
  --nav-h:      68px;
  --ease-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:     0.18s;
  --t-med:      0.35s;
}

/* ============================================================
   BG: DOT GRID
   ============================================================ */
.bg-dots {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 212, 0, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* BG: noise texture via SVG data-uri */
.bg-noise {
  position: fixed;
  inset: 0;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Scanlines sutiles */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.022) 3px,
    rgba(0, 0, 0, 0.022) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(9, 10, 16, 0.75);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--bg-border);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.site-nav.scrolled {
  background: rgba(9, 10, 16, 0.93);
  border-bottom-color: rgba(255, 212, 0, 0.15);
}

.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav__logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
}

.logo-accent {
  color: var(--color-yellow);
  text-shadow: 0 0 18px var(--color-yellow-glow);
}

/* Logo completo (isotipo + palabra) como imagen — reemplaza el logo de texto
   en el nav, el footer y el header del modal de login. */
.site-nav__logo-img {
  height: 30px;
  width: auto;
  display: block;
}

.auth-modal__header .site-nav__logo-img {
  height: 44px;
  margin: 0 auto 4px;
}

.site-footer__brand .site-nav__logo-img {
  height: 26px;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}

.site-nav__link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav__cta {
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 14px;
}

/* Hamburger */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast);
}

.site-nav__toggle:hover { background: rgba(255, 255, 255, 0.05); }

.site-nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  display: block;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast);
}

.site-nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle.open span:nth-child(2) { opacity: 0; }
.site-nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(-45deg, #090A10 0%, #0f0032 25%, #060d00 50%, #0b001f 75%, #090A10 100%);
  background-size: 400% 400%;
  animation: hero-gradient 20s ease infinite;
  z-index: 2;
}

@keyframes hero-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero::before {
  content: '';
  position: absolute;
  top: 45%;
  right: 10%;
  transform: translate(50%, -50%);
  width: 660px;
  height: 660px;
  background: radial-gradient(circle, rgba(123, 47, 255, 0.11) 0%, rgba(255, 212, 0, 0.04) 45%, transparent 70%);
  pointer-events: none;
}

/* Haz de luz que barre el hero, efecto cinematográfico */
.hero__scanline {
  position: absolute;
  top: 0;
  left: -50%;
  width: 35%;
  height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 212, 0, 0.05) 45%, rgba(123, 47, 255, 0.07) 55%, transparent 100%);
  pointer-events: none;
  z-index: 1;
  animation: scanline-sweep 7s linear infinite;
}

@keyframes scanline-sweep {
  from { left: -50%; }
  to   { left: 130%; }
}

/* Red de partículas con líneas de conexión (canvas, dibujada por index.js) */
.hero__network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

/* Parallax por mouse — controlado desde index.js */
.hero__copy,
.hero__visual {
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Badges */
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(123, 47, 255, 0.12);
  border: 1px solid rgba(123, 47, 255, 0.28);
  color: #a070ff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* Badge "Nuevo" con shimmer que lo recorre */
.hero__badge--new {
  position: relative;
  overflow: hidden;
  background: rgba(255, 212, 0, 0.1);
  border-color: rgba(255, 212, 0, 0.35);
  color: var(--color-yellow);
  font-weight: 600;
}

.hero__badge--new::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: badge-shimmer 2.8s ease-in-out infinite;
}

@keyframes badge-shimmer {
  0%   { left: -60%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}

.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-purple);
  box-shadow: 0 0 8px var(--color-purple);
  animation: badge-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.4); }
}

/* Título GO GLOBAL */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(58px, 8.5vw, 115px);
  font-weight: 800;
  color: var(--color-yellow);
  line-height: 0.92;
  letter-spacing: -3px;
  margin-bottom: 24px;
  text-shadow:
    0 0 40px rgba(255, 212, 0, 0.55),
    0 0 80px rgba(255, 212, 0, 0.24);
  animation: title-neon 4s ease-in-out infinite;
  cursor: default;
  min-height: 1em; /* reserva la línea mientras corre el typewriter */
}

/* Caret de bloque mientras se tipea el título al cargar */
.hero__title--typing::after {
  content: '▌';
  color: var(--color-yellow);
  animation: cursor-blink 0.7s step-end infinite;
}

@keyframes title-neon {
  0%, 100% {
    text-shadow: 0 0 40px rgba(255, 212, 0, 0.55), 0 0 80px rgba(255, 212, 0, 0.24);
  }
  50% {
    text-shadow: 0 0 60px rgba(255, 212, 0, 0.85), 0 0 110px rgba(255, 212, 0, 0.42), 0 0 155px rgba(255, 212, 0, 0.15);
  }
}

/* Glitch RGB-split al pasar el mouse — vibe gamer/CRT */
.hero__title:hover {
  animation: title-glitch 0.4s steps(2, end) 1;
}

@keyframes title-glitch {
  0%   { text-shadow: 0 0 40px rgba(255, 212, 0, 0.55), 0 0 80px rgba(255, 212, 0, 0.24); transform: translate(0); }
  20%  { text-shadow: -3px 0 #7B2FFF, 3px 0 #00C896, 0 0 40px rgba(255, 212, 0, 0.55); transform: translate(-2px, 1px); }
  40%  { text-shadow: 3px 0 #FF4D6D, -3px 0 #7B2FFF, 0 0 40px rgba(255, 212, 0, 0.55); transform: translate(2px, -1px); }
  60%  { text-shadow: -2px 0 #00C896, 2px 0 #FF4D6D, 0 0 40px rgba(255, 212, 0, 0.55); transform: translate(-1px, 0); }
  80%  { text-shadow: 2px 0 #7B2FFF, -2px 0 #00C896, 0 0 40px rgba(255, 212, 0, 0.55); transform: translate(1px, 1px); }
  100% { text-shadow: 0 0 40px rgba(255, 212, 0, 0.55), 0 0 80px rgba(255, 212, 0, 0.24); transform: translate(0); }
}

.hero__sub {
  font-size: clamp(15px, 1.8vw, 19px);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero__typing-line {
  display: block;
  margin-top: 8px;
  font-size: clamp(13px, 1.4vw, 16px);
  color: var(--text-muted);
  font-style: italic;
}

.hero__typing-word {
  color: rgba(241, 245, 249, 0.7);
  font-style: normal;
}

.hero__cursor {
  display: inline-block;
  color: var(--color-yellow);
  font-weight: 700;
  margin-left: 1px;
  animation: cursor-blink 0.85s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* CTA row */
.hero__cta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* CTA hero: glow pulsante + shine sweep, efecto premium/gamer */
.hero__cta .btn--primary {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(255, 212, 0, 0.35);
  animation: cta-glow-pulse 2.6s ease-in-out infinite;
}

.hero__cta .btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: cta-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cta-glow-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(255, 212, 0, 0.35); }
  50%       { box-shadow: 0 0 40px rgba(255, 212, 0, 0.6), 0 0 70px rgba(255, 212, 0, 0.2); }
}

@keyframes cta-shine {
  0%   { left: -60%; }
  35%  { left: 130%; }
  100% { left: 130%; }
}

.hero__social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero__social-proof strong { color: var(--text-primary); }

.hero__avatars { display: flex; }

.hero__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  margin-left: -8px;
}

.hero__avatar:first-child { margin-left: 0; }

/* Stats */
.hero__stats { display: flex; align-items: center; }

.hero__stat {
  display: flex;
  flex-direction: column;
  padding: 0 22px;
}

.hero__stat:first-child { padding-left: 0; }

.hero__stat-num {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--color-yellow);
  line-height: 1;
}

.hero__stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
}

.hero__stat-sep {
  width: 1px;
  height: 36px;
  background: var(--bg-border);
  flex-shrink: 0;
}

/* Scroll dot */
.hero__scroll-dot {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-yellow);
  animation: scroll-drop 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes scroll-drop {
  0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(14px); opacity: 0.2; }
}

/* ============================================================
   HERO VISUAL — Ducky
   ============================================================ */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.ducky-wrap {
  position: relative;
  width: 320px;
  height: 320px;
}

.ducky-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.17) 0%, rgba(123, 47, 255, 0.07) 50%, transparent 70%);
  border-radius: 50%;
  animation: glow-breathe 3.5s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.7; }
  50%       { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
}

.ducky {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  animation: duck-float 3.2s ease-in-out infinite;
  filter: drop-shadow(0 20px 36px rgba(255, 212, 0, 0.20));
  object-fit: contain;
}

@keyframes duck-float {
  0%, 100% { transform: translateY(0)    rotate(-1.5deg); }
  50%       { transform: translateY(-18px) rotate(1.5deg); }
}

/* HUD cards flotantes */
.hud-card {
  position: absolute;
  background: rgba(13, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 4;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.hud-card--xp {
  bottom: 16px;
  left: -22px;
  min-width: 150px;
  animation: hud-float-l 4.5s ease-in-out infinite;
}

@keyframes hud-float-l {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

.hud-card__label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.hud-card__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.hud-card__bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-yellow), #ffb800);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(255, 212, 0, 0.6);
  animation: xp-bar-enter 1.8s 0.8s var(--ease-out) forwards;
}

@keyframes xp-bar-enter { to { width: 68%; } }

.hud-card__value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-yellow);
}

.hud-card--streak {
  top: 16px;
  right: -22px;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: hud-float-r 4.5s ease-in-out 1.2s infinite;
}

@keyframes hud-float-r {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-11px); }
}

.hud-card__flame {
  animation: flame-flicker 0.75s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
}

.hud-card__flame svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: #FF6B00;
  fill: rgba(255, 107, 0, 0.25);
}

@keyframes flame-flicker {
  0%   { transform: scale(1)    rotate(-4deg); filter: brightness(1); }
  100% { transform: scale(1.12) rotate(4deg);  filter: brightness(1.35); }
}

.hud-card__streak {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================================
   LANDING SECTIONS
   ============================================================ */
.landing-section {
  padding: 96px 0;
  position: relative;
  z-index: 2;
}

.landing-section--alt {
  background: rgba(255, 255, 255, 0.018);
}

.landing-section__header {
  text-align: center;
  margin-bottom: 56px;
}

.landing-section__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-yellow);
  margin-bottom: 12px;
}

.landing-section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
}

/* ============================================================
   STEPS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 34px 26px 30px;
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--t-med) var(--ease-out),
    box-shadow   var(--t-med) var(--ease-out),
    transform    var(--t-med) var(--ease-out);
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-yellow), var(--color-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}

.step-card:hover {
  border-color: var(--color-yellow-glow);
  box-shadow: 0 0 48px rgba(255, 212, 0, 0.06), 0 20px 36px rgba(0, 0, 0, 0.28);
  transform: translateY(-5px);
}

.step-card:hover::before { transform: scaleX(1); }

.step-card__num {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: rgba(255, 212, 0, 0.09);
  line-height: 1;
  position: absolute;
  top: 18px;
  right: 20px;
  letter-spacing: -1px;
}

.step-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.step-card__icon--yellow {
  background: rgba(255, 212, 0, 0.08);
  border-color: rgba(255, 212, 0, 0.15);
}

.step-card__icon--purple {
  background: rgba(123, 47, 255, 0.08);
  border-color: rgba(123, 47, 255, 0.18);
}

.step-card__icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.step-card__icon--yellow svg { color: var(--color-yellow); }
.step-card__icon--purple svg { color: var(--color-purple); }

.step-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* ============================================================
   PERFILES LANDING
   ============================================================ */
.landing-profiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.landing-profile {
  grid-column: span 2;
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  position: relative;
  transition:
    border-color var(--t-med) var(--ease-out),
    box-shadow   var(--t-med) var(--ease-out),
    transform    var(--t-med) var(--ease-out);
}

.landing-profile:nth-child(4),
.landing-profile:nth-child(5) {
  grid-column: span 3;
}

.landing-profile:hover {
  border-color: rgba(255, 212, 0, 0.35);
  box-shadow:
    0 0 38px rgba(255, 212, 0, 0.11),
    0 0 76px rgba(255, 212, 0, 0.04),
    inset 0 0 28px rgba(255, 212, 0, 0.02);
  transform: translateY(-4px) scale(1.01);
}

.landing-profile--hot {
  border-color: rgba(123, 47, 255, 0.32);
  background: linear-gradient(145deg, rgba(123, 47, 255, 0.07) 0%, var(--bg-card) 60%);
}

.landing-profile--hot:hover {
  border-color: var(--color-purple);
  box-shadow: 0 0 38px rgba(123, 47, 255, 0.20), 0 0 76px rgba(123, 47, 255, 0.06);
}

.landing-profile__badge {
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--color-purple);
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 3px 11px;
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
  box-shadow: 0 0 14px rgba(123, 47, 255, 0.55);
}

.landing-profile__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 212, 0, 0.08);
  border: 1px solid rgba(255, 212, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.landing-profile__icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
  color: var(--color-yellow);
}

.landing-profile--hot .landing-profile__icon {
  background: rgba(123, 47, 255, 0.08);
  border-color: rgba(123, 47, 255, 0.18);
}

.landing-profile--hot .landing-profile__icon svg {
  color: var(--color-purple);
}

.landing-profile h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--text-primary);
}

.landing-profile p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.landing-profile__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.landing-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-out);
}

.faq-item:hover { border-color: rgba(255, 255, 255, 0.1); }
.faq-item.open  { border-color: rgba(255, 212, 0, 0.22); }

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--t-fast);
}

.faq-item__q:hover,
.faq-item.open .faq-item__q { color: var(--color-yellow); }

.faq-item__arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--t-fast) var(--ease-out), color var(--t-fast);
}

.faq-item.open .faq-item__arrow {
  transform: rotate(180deg);
  color: var(--color-yellow);
}

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.34s var(--ease-out);
}

.faq-item.open .faq-item__a { max-height: 220px; }

.faq-item__a p {
  padding: 2px 22px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.74;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  padding: 60px 0 32px;
  position: relative;
  z-index: 2;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.site-footer__brand {
  flex: 1;
  min-width: 170px;
}

.site-footer__brand p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 11px 0 18px;
  max-width: 220px;
  line-height: 1.6;
}

.site-footer__social { display: flex; gap: 8px; }

.site-footer__social-link {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.site-footer__social-link:hover {
  color: var(--color-yellow);
  border-color: rgba(255, 212, 0, 0.3);
  background: rgba(255, 212, 0, 0.06);
}

.site-footer__links { display: flex; gap: 48px; }

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-display);
}

.site-footer__col a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t-fast);
}

.site-footer__col a:hover { color: var(--color-yellow); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--bg-border);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer__version {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.4;
}

.site-footer__bottom-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Atribución en el footer: más protagonismo y legible (el logo es un lockup
   con texto, no un isotipo). Sigue por debajo del logo de Vokly del footer. */
.clika-attribution--footer .clika-attribution {
  opacity: 0.85;
  gap: 8px;
}

.clika-attribution--footer .clika-attribution:hover,
.clika-attribution--footer .clika-attribution:focus-visible {
  opacity: 1;
}

.clika-attribution--footer .clika-attribution span {
  font-size: 13px;
  color: var(--text-muted);
}

.clika-attribution--footer .clika-attribution img {
  height: 28px;
}

/* Mobile: barra inferior apilada y centrada (© arriba, by Clika Tech abajo) */
@media (max-width: 560px) {
  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__bottom-left {
    justify-content: center;
  }
}

/* ============================================================
   MODAL LOGIN / REGISTRO
   ============================================================ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease-out), visibility var(--t-med);
}

.auth-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 38px 34px;
  width: 100%;
  max-width: 420px;
  position: relative;
  transform: translateY(16px) scale(0.97);
  transition: transform var(--t-med) var(--ease-out);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.65),
    0 0 120px rgba(123, 47, 255, 0.07),
    0 0 1px rgba(255, 255, 255, 0.07);
}

.auth-modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-border);
  cursor: pointer;
  transition: all var(--t-fast);
}

.auth-modal__close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.09);
}

.auth-modal__header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-modal__header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* Tabs */
.auth-modal__tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-modal__tab {
  flex: 1;
  padding: 9px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.auth-modal__tab.active {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Overrides para inputs dentro del modal */
.auth-modal .form-group {
  margin-bottom: 14px;
}

.auth-modal .form-group input,
.auth-modal .form-group select {
  border-radius: var(--radius-md);
  padding: 11px 14px;
}

.auth-modal .form-error {
  min-height: 18px;
  margin-bottom: 6px;
}

.auth-modal .btn--primary {
  margin-top: 4px;
}

.auth-modal__footer-note {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-modal__footer-note a {
  color: var(--color-yellow);
  text-decoration: none;
}

.auth-modal__footer-note a:hover { text-decoration: underline; }

.auth-modal__forgot-link {
  text-align: right;
  margin: -8px 0 14px;
}

.auth-modal__forgot-link a {
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.auth-modal__forgot-link a:hover {
  color: var(--color-yellow);
  text-decoration: underline;
}

.auth-modal__forgot-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* ============================================================
   STAGGER ANIMATION (scroll reveal)
   ============================================================ */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.48s var(--ease-out), transform 0.48s var(--ease-out);
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   LANDING RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 44px;
  }

  .hero__visual { order: -1; }

  .ducky-wrap { width: 250px; height: 250px; }
  .hud-card--xp   { left: 4px; }
  .hud-card--streak { right: 4px; }

  .hero__cta   { justify-content: center; }
  .hero__stats { justify-content: center; }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .landing-profiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-profile,
  .landing-profile:nth-child(4),
  .landing-profile:nth-child(5) {
    grid-column: span 1;
  }

  .site-nav__links { display: none; }
  .site-nav__toggle { display: flex; }
  .site-nav__cta { display: none; }

  .site-nav__links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(9, 10, 16, 0.97);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--bg-border);
    padding: 12px 16px 16px;
    gap: 2px;
    z-index: 99;
  }

  .site-nav__links.open .site-nav__link {
    font-size: 15px;
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  .landing-profiles {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: clamp(50px, 16vw, 76px);
    letter-spacing: -2px;
  }

  .site-footer__inner { flex-direction: column; gap: 28px; }
  .site-footer__links { flex-wrap: wrap; gap: 24px; }

  .auth-modal { padding: 26px 18px; }
  .landing-section { padding: 68px 0; }
  .landing-section__header { margin-bottom: 40px; }
}

@media (max-width: 380px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__social-proof { justify-content: center; }
  .hero__stat { padding: 0 12px; }
  .hero__stat-num { font-size: 17px; }
}

/* Utilidad mono */
.mono { font-family: var(--font-mono); }

/* ============================================================
   MAPA DE NIVELES — view-dashboard
   ============================================================ */

/* Override del padding de .view para el mapa */
.view--map {
  padding: 0;
  max-width: 100%;
}

.level-map {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md) 80px;
}

/* Halo de fondo detrás del camino — acento cálido + violeta, respira lento.
   Da la sensación de que el nodo activo emite luz sobre el fondo. */
.level-map__glow {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 380px;
  height: 380px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 212, 0, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 50% 45%, rgba(123, 47, 255, 0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: halo-breathe 6s ease-in-out infinite;
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1; }
}

.level-map__header,
.level-map__path {
  position: relative;
  z-index: 1;
}

.level-map__header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.level-map__header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Banner del módulo actual (estilo "ETAPA" de Duolingo, en clave Vokly) */
.module-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(135deg, var(--color-purple) 0%, #5a1fd4 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 14px var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  box-shadow: 0 8px 24px rgba(123, 47, 255, 0.35);
  position: relative;
  z-index: 60;
}

.module-banner__label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
}

.module-banner__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

/* En mobile el banner queda fijo arriba mientras scrolleás el mapa */
@media (max-width: 768px) {
  .module-banner {
    position: sticky;
    top: 8px;
  }
}

/* Columna central del camino */
.level-map__path {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Conector curvo punteado (SVG generado por app.js) entre nodos del zigzag */
.map-connector {
  flex-shrink: 0;
  line-height: 0;
  margin: -2px 0;
}

/* Trayecto completado: dorado calmo (sin pulso — el pulso se reserva al nodo activo) */
.map-connector--done {
  color: var(--color-yellow);
  opacity: 0.9;
}

/* Capa 2: los puntos del conector "fluyen" hacia el próximo nodo (marcha lenta del dash) */
.map-connector--done path {
  animation: connector-flow 3.2s linear infinite;
}

@keyframes connector-flow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -11.5; }
}

.map-connector--locked {
  color: #23283f;
}

/* Wrapper del nodo — el offset zigzag lo aplica app.js por inline transform */
.map-node-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Espacio extra para Ducky sobre el nodo actual */
.map-node-wrap--current { padding-top: 44px; }

/* Ducky indicator */
.map-node__ducky {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

/* El bounce vive en la imagen para que la sombra (en el wrapper) quede en el piso */
.map-node__ducky-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  animation: duck-bob 1.8s ease-in-out infinite;
}

@keyframes duck-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

/* Sombra elíptica que late al ritmo del bounce de Ducky */
.map-node__ducky::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45) 0%, transparent 70%);
  animation: duck-shadow 1.8s ease-in-out infinite;
}

@keyframes duck-shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1);    opacity: 0.6; }
  50%       { transform: translateX(-50%) scaleX(0.65); opacity: 0.3; }
}

/* Círculo del nodo — 80px mobile, 90px desktop, con sombra de profundidad */
.map-node__circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  position: relative;
  border: 3px solid transparent;
  background: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s, box-shadow 0.2s;
}

@media (min-width: 769px) {
  .map-node__circle {
    width: 90px;
    height: 90px;
    font-size: 2.3rem;
  }
}

.map-node__circle:hover:not(:disabled) { transform: scale(1.08); }

/* Completado: gradiente violeta→amarillo + check dorado */
.map-node__circle--completed {
  background: linear-gradient(145deg, rgba(123, 47, 255, 0.35) 0%, rgba(255, 212, 0, 0.28) 100%), var(--bg-card);
  border-color: var(--color-yellow);
}

/* Estrellita tenue y ESTÁTICA en nodos completados — no compite con el foco (nodo activo) */
.map-node__circle--completed::before {
  content: '✦';
  position: absolute;
  top: -9px;
  left: -7px;
  font-size: 10px;
  color: var(--color-yellow);
  opacity: 0.35;
  pointer-events: none;
}

.map-node__circle--current {
  background: var(--color-yellow-dim);
  border: 4px solid var(--color-yellow);
  animation: node-breathe 2.6s ease-in-out infinite;
}

/* Un solo anillo expansivo — foco único, sensación de "respirar" (no radar) */
.map-node__circle--current::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(255, 212, 0, 0.5);
  border-radius: 50%;
  animation: ring-expand 2.6s ease-out infinite;
  pointer-events: none;
}

@keyframes ring-expand {
  from { transform: scale(0.95); opacity: 0.75; }
  to   { transform: scale(1.5);  opacity: 0; }
}

/* Animación de unlock: flash de luz + scale al desbloquear un nodo nuevo */
.map-node-wrap--just-unlocked .map-node__circle {
  animation: node-unlock 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275), node-breathe 2.6s ease-in-out 0.9s infinite;
}

@keyframes node-unlock {
  0%   { transform: scale(0.6); filter: brightness(1); box-shadow: 0 0 0 0 rgba(255, 212, 0, 0); }
  45%  { transform: scale(1.25); filter: brightness(2.2); box-shadow: 0 0 0 18px rgba(255, 212, 0, 0.25), 0 0 60px rgba(255, 212, 0, 0.6); }
  100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 rgba(255, 212, 0, 0); }
}

.map-node__circle--locked {
  background: var(--bg-card);
  border-color: var(--bg-border);
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* Glow que "respira": sube y baja la intensidad, lento y orgánico (foco único) */
@keyframes node-breathe {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,212,0,0.10), 0 0 18px rgba(255,212,0,0.18); }
  50%       { box-shadow: 0 0 0 9px rgba(255,212,0,0.05), var(--glow-accent); }
}

/* Check dorado en nodos completados */
.map-node__check {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  background: var(--color-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-base);
}

.map-node__check svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
  color: #000;
}

/* Lock icon en nodos bloqueados */
.map-node__lock {
  color: var(--text-muted);
  width: 22px !important;
  height: 22px !important;
}

/* Etiquetas del nodo */
.map-node__name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  line-height: 1.3;
}

.map-node-wrap--current .map-node__name { color: var(--text-primary); }
.map-node-wrap--completed .map-node__name { color: var(--text-secondary); }

.map-node__module {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  font-family: var(--font-mono);
  opacity: 0.65;
}

/* Estrellitas de score bajo un nodo completado */
.map-node__stars {
  display: flex;
  gap: 2px;
  margin-top: -2px;
}

.map-node__star {
  width: 11px !important;
  height: 11px !important;
  stroke-width: 2.5;
}

.map-node__star--full {
  color: var(--color-yellow);
  fill: var(--color-yellow);
  filter: drop-shadow(0 0 3px rgba(255, 212, 0, 0.5));
}

.map-node__star--empty {
  color: rgba(255, 255, 255, 0.15);
  fill: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   OVERLAY: SUBIDA DE NIVEL
   ============================================================ */

.levelup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 16, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.levelup-overlay.open { opacity: 1; visibility: visible; }
.levelup-overlay.hidden { display: none; }

.levelup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
  padding: var(--spacing-xl);
  transform: scale(0.8);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.levelup-overlay.open .levelup-card { transform: scale(1); }

.levelup-card__ducky {
  width: 120px;
  height: 120px;
  object-fit: contain;
  animation: ducky-jump 1s ease-in-out infinite;
}

.levelup-card__label {
  font-family: var(--font-display);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 700;
}

.levelup-card__nivel {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-yellow);
  text-shadow: var(--shadow-yellow);
}

/* ============================================================
   MODAL DE MISIÓN (bottom sheet)
   ============================================================ */

.mission-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.mission-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mission-modal-overlay.hidden {
  display: none;
}

.mission-modal {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--spacing-xl) var(--spacing-xl) calc(var(--spacing-xl) + 8px);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
  transform: translateY(40px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mission-modal-overlay.open .mission-modal {
  transform: translateY(0);
}

/* Icono de categoría */
.mission-modal__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  line-height: 1;
  background: var(--color-yellow-dim);
  border: 2px solid var(--color-yellow-glow);
}

.mission-modal__icon--sintaxis {
  background: var(--color-purple-dim);
  border-color: var(--color-purple-glow);
}

.mission-modal__icon--conceptos {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
}

.mission-modal__icon--interview_prep {
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.25);
}

.mission-modal__meta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  align-items: center;
}

.mission-modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.mission-modal__category-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-display);
  color: var(--color-yellow);
}

.mission-modal__category-label--sintaxis { color: var(--color-purple); }

.mission-modal__category-label--conceptos { color: var(--color-success); }

.mission-modal__category-label--interview_prep { color: #FF4D6D; }

.mission-modal__module {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mission-modal__actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* ============================================================
   APP SHELL — layout general (sidebar + main + panel derecho)
   ============================================================ */

.app-main {
  min-height: 100vh;
  padding-bottom: 76px; /* espacio para la navbar inferior mobile */
}

@media (min-width: 769px) {
  .app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
  }

  .app-main {
    padding-bottom: 0;
    min-width: 0;
  }

  .app-header,
  .mobile-nav {
    display: none;
  }
}

@media (min-width: 1025px) {
  .app-shell {
    grid-template-columns: 240px 1fr 300px;
  }
}

/* ============================================================
   SIDEBAR — solo desktop (>768px)
   ============================================================ */

.sidebar {
  display: none;
}

@media (min-width: 769px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--bg-surface);
    border-right: 1px solid var(--bg-border);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
  }
}

.sidebar__logo-link {
  display: block;
}

.sidebar__logo {
  height: 52px;
  width: auto;
  animation: logo-breathe 4s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 212, 0, 0.15)); }
  50%       { filter: drop-shadow(0 0 16px rgba(255, 212, 0, 0.45)); }
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.sidebar__avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-yellow), var(--color-purple));
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Anillo con gradiente rotativo lento detrás del avatar */
.sidebar__avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--color-yellow), var(--color-purple), var(--color-yellow));
  animation: ring-spin 8s linear infinite;
  z-index: -1;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.sidebar__user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar__user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__level-badge {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-yellow);
  background: var(--color-yellow-dim);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

.sidebar__stats {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}
/* Los corazones en su propia fila: si el XP es grande no los corta */
.sidebar__stats .stat--lives {
  flex-basis: 100%;
  justify-content: center;
  margin-top: 6px;
}

/* Video de presentación en Interview, recortado cuadrado y centrado */
.iv-video {
  position: relative;
  width: 100%; max-width: 280px; aspect-ratio: 1 / 1;
  margin: 4px auto 18px; border-radius: var(--radius-lg);
  overflow: hidden; background: #000;
}
.iv-video__mute {
  position: absolute; bottom: 8px; right: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.iv-video__mute i { width: 18px; height: 18px; }
.iv-video video {
  width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer;
}

/* Foto de perfil */
.profile-view__avatar-ring { position: relative; }
.profile-view__avatar { overflow: hidden; }
.profile-view__avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-view__avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-yellow); border: 2px solid var(--bg-base);
  color: #000; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.profile-view__avatar-edit i { width: 16px; height: 16px; }

/* Editar nombre en el perfil */
.profile-view__name-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.btn-editar {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px; display: inline-flex; border-radius: var(--radius-sm);
}
.btn-editar:hover { color: var(--color-yellow); }
.btn-editar i { width: 16px; height: 16px; }

/* Input dentro del modal (mostrarPrompt) */
.confirm-modal__input {
  width: 100%; padding: 10px 12px; margin: 4px 0 10px;
  background: var(--bg-base); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 1rem; font-family: inherit;
}
.confirm-modal__input:focus { outline: none; border-color: var(--color-yellow); }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s, color 0.15s, transform 0.15s ease-out, border-color 0.15s;
}

.sidebar__nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar__nav-item:hover:not(:disabled):not(.sidebar__nav-item--active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar__nav-item--active {
  background: rgba(255, 208, 0, 0.1);
  color: var(--color-yellow);
  border-left-color: var(--color-yellow);
}

/* Divider + botón Salir al fondo del sidebar */
.sidebar__divider {
  height: 1px;
  background: var(--bg-border);
  margin: var(--spacing-sm) 0;
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: #ff4444;
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  opacity: 0.75;
  transition: opacity 0.15s, background-color 0.15s;
}

.sidebar__logout svg {
  width: 18px;
  height: 18px;
}

.sidebar__logout:hover {
  opacity: 1;
  background: rgba(255, 68, 68, 0.08);
}

.sidebar__nav-item--locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar__nav-soon {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  white-space: nowrap;
}

.sidebar__footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--bg-border);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sidebar__footer-logo {
  height: 14px;
  width: auto;
  opacity: 0.6;
}

/* ============================================================
   RIGHT PANEL — solo desktop grande (>1024px)
   ============================================================ */

.right-panel {
  display: none;
}

@media (min-width: 1025px) {
  .right-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-md);
    height: 100vh;
    overflow-y: auto;
  }
}

.panel-card {
  /* Capa 1: superficie con profundidad — gradiente sutil (luz arriba) sobre el color base */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  box-shadow: var(--shadow-md), var(--border-top-light);
  transition: transform 0.25s var(--ease-spring), border-color 0.2s, box-shadow 0.25s var(--ease-spring);
}

.panel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg), var(--border-top-light);
}

.panel-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.panel-card__header svg {
  width: 14px;
  height: 14px;
  color: var(--color-yellow);
}

.panel-card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.panel-card__progress {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.panel-card__progress-bar {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.panel-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple), var(--color-yellow), var(--color-purple));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
  animation: quest-gradient 3s linear infinite;
  position: relative;
  overflow: hidden;
}

@keyframes quest-gradient {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}

/* Shimmer sobre la barra de progreso (próximo logro) */
.panel-card__progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: bar-shimmer 2.2s ease-in-out infinite;
}

@keyframes bar-shimmer {
  0%   { left: -40%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}

.panel-card__progress-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Mini calendario semanal (L M M J V S D) */
.week-calendar {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.week-calendar__day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.week-calendar__label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.week-calendar__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s, border-color 0.2s;
}

.week-calendar__day--active .week-calendar__dot {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
  box-shadow: 0 0 8px rgba(255, 212, 0, 0.4);
  animation: dot-fill-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

/* Fill escalonado de los días completados al cargar el panel */
.week-calendar__day:nth-child(1).week-calendar__day--active .week-calendar__dot { animation-delay: 0.05s; }
.week-calendar__day:nth-child(2).week-calendar__day--active .week-calendar__dot { animation-delay: 0.15s; }
.week-calendar__day:nth-child(3).week-calendar__day--active .week-calendar__dot { animation-delay: 0.25s; }
.week-calendar__day:nth-child(4).week-calendar__day--active .week-calendar__dot { animation-delay: 0.35s; }
.week-calendar__day:nth-child(5).week-calendar__day--active .week-calendar__dot { animation-delay: 0.45s; }
.week-calendar__day:nth-child(6).week-calendar__day--active .week-calendar__dot { animation-delay: 0.55s; }
.week-calendar__day:nth-child(7).week-calendar__day--active .week-calendar__dot { animation-delay: 0.65s; }

@keyframes dot-fill-in {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.week-calendar__day--future .week-calendar__dot {
  opacity: 0.35;
}

/* Chips de perfiles */
.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.profile-chip svg {
  width: 13px;
  height: 13px;
}

.profile-chip:hover {
  border-color: var(--color-purple);
  color: var(--text-primary);
}

.profile-chip--active {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
  background: var(--color-yellow-dim);
  cursor: default;
}

/* ============================================================
   MOBILE BOTTOM NAV — solo mobile (<=768px)
   ============================================================ */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  z-index: 150;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.64rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav__item svg {
  width: 20px;
  height: 20px;
}

/* Ítem activo con pill redondeada detrás */
.mobile-nav__item--active {
  color: var(--color-yellow);
  background: rgba(255, 208, 0, 0.1);
  border-radius: var(--radius-full);
  margin: 5px 6px;
  padding: 5px 0 3px;
}

/* ============================================================
   PLACEHOLDER VIEWS — Ranking / Configuración
   ============================================================ */

.placeholder-view {
  max-width: 420px;
  margin: 12vh auto 0;
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  /* Capa 1: superficie con profundidad en vez de texto suelto sobre negro */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), var(--border-top-light);
  /* Capa 4: entra al montar (se reinicia al cambiar de vista) */
  animation: panel-enter 0.5s var(--ease-spring) both;
}

/* Capa 5: el ícono es el foco único — chip circular con halo que respira */
.placeholder-view__icon {
  width: 40px;
  height: 40px;
  color: var(--color-yellow);
  padding: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  margin-bottom: var(--spacing-md);
  animation: icon-breathe 2.8s ease-in-out infinite;
}

@keyframes icon-breathe {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 212, 0, 0.14), var(--border-top-light); }
  50%       { box-shadow: 0 0 30px rgba(255, 212, 0, 0.32), var(--border-top-light); }
}

.placeholder-view h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.placeholder-view p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   GRID DE PUNTOS ANIMADO — fondo del mapa de niveles
   ============================================================ */

.view--map {
  position: relative;
  overflow: hidden;
}

.view--map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 212, 0, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: dots-drift 45s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes dots-drift {
  from { background-position: 0 0; }
  to   { background-position: 260px 260px; }
}

/* ============================================================
   CTA FLOTANTE — landing mobile
   ============================================================ */

.floating-cta {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-yellow);
  color: #000;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 180;
  box-shadow: 0 8px 32px rgba(255, 212, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.floating-cta svg {
  width: 18px;
  height: 18px;
}

.floating-cta.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Solo mobile — en desktop el CTA del hero siempre está a la vista o cerca */
@media (min-width: 769px) {
  .floating-cta { display: none; }
}

/* ============================================================
   SKELETON LOADER — mapa de niveles
   ============================================================ */

.map-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--spacing-lg);
}

.map-skeleton__node {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(100deg, var(--bg-card) 40%, var(--bg-card-hover) 50%, var(--bg-card) 60%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.map-skeleton__node:nth-child(odd)  { transform: translateX(-52px); }
.map-skeleton__node:nth-child(even) { transform: translateX(52px); }

.map-skeleton__connector {
  width: 3px;
  height: 44px;
  background: var(--bg-border);
  opacity: 0.5;
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ============================================================
   EMPTY STATE — con Ducky
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  text-align: center;
  padding: 48px 24px;
}

.empty-state__ducky {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: grayscale(0.35);
  opacity: 0.9;
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 300px;
}

/* ============================================================
   VISTA MI PERFIL
   ============================================================ */

.profile-view {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md) 40px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Header: avatar con anillo de gradiente rotativo */
.profile-view__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  text-align: center;
}

.profile-view__avatar-ring {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
  /* Capa 5: el avatar es el ÚNICO foco de la pantalla — halo que respira */
  animation: avatar-glow 2.8s ease-in-out infinite;
}

@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 212, 0, 0.14), 0 0 36px rgba(123, 47, 255, 0.10); }
  50%       { box-shadow: 0 0 30px rgba(255, 212, 0, 0.30), 0 0 60px rgba(123, 47, 255, 0.18); }
}

.profile-view__avatar-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--color-yellow), var(--color-purple), var(--color-yellow));
  animation: ring-spin 4s linear infinite;
}

.profile-view__avatar {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--bg-base);
  color: var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  z-index: 1;
}

.profile-view__name {
  font-size: 1.5rem;
  font-weight: 800;
}

.profile-view__level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  padding: 4px 12px;
}

.profile-view__level-badge svg { width: 13px; height: 13px; }

.profile-view__level-badge--junior { color: #4ADE80; background: rgba(74, 222, 128, 0.12); }
.profile-view__level-badge--mid    { color: var(--color-yellow); background: var(--color-yellow-dim); }
.profile-view__level-badge--senior { color: #A78BFA; background: rgba(167, 139, 250, 0.12); }
.profile-view__level-badge--staff  { color: #FBBF24; background: rgba(251, 191, 36, 0.15); box-shadow: 0 0 14px rgba(251, 191, 36, 0.25); }

.profile-view__role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.profile-view__role svg { width: 15px; height: 15px; }

/* Stats 2x2 */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.profile-stat-card {
  /* Capa 1: profundidad — gradiente sutil + sombra difusa + filo de luz arriba */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: var(--shadow-md), var(--border-top-light);
  /* Capa 4: entrada escalonada (se reinicia al volver a la vista) + hover con vida */
  animation: panel-enter 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 80ms);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
}

.profile-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--border-top-light);
}

.profile-stat-card svg {
  width: 20px;
  height: 20px;
  color: var(--color-yellow);
  margin-bottom: 2px;
}

.profile-stat-card__value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-stat-card__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

/* Secciones */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.profile-section__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-section__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Selector de nivel de inglés */
.english-level-selector {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.english-level-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-md);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-main);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}

.english-level-option:hover {
  border-color: rgba(255, 212, 0, 0.4);
}

.english-level-option--active {
  border-color: var(--color-yellow);
  background: var(--color-yellow-dim);
  color: var(--text-primary);
}

.english-level-option__emoji { font-size: 1rem; }
.english-level-option__label { font-weight: 700; font-size: 0.88rem; white-space: nowrap; }
.english-level-option__desc  { font-size: 0.78rem; color: var(--text-muted); text-align: right; }

/* Progreso por módulo */
.module-progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.module-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-progress__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-sm);
}

.module-progress__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.module-progress__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.module-progress__bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.module-progress__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-purple), var(--color-yellow));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grid de badges */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--spacing-md) var(--spacing-xs);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  font-family: var(--font-main);
  transition: transform 0.15s, border-color 0.15s;
}

.badge-tile:hover { transform: translateY(-2px); }

.badge-tile__icon { width: 26px !important; height: 26px !important; }

.badge-tile__name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.badge-tile__hint {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.badge-tile--unlocked {
  border-color: rgba(255, 212, 0, 0.45);
  box-shadow: 0 0 16px rgba(255, 212, 0, 0.12);
}

.badge-tile--unlocked .badge-tile__icon {
  color: var(--color-yellow);
  filter: drop-shadow(0 0 6px rgba(255, 212, 0, 0.5));
}

.badge-tile--locked {
  opacity: 0.55;
  filter: grayscale(0.8);
}

.badge-tile--locked .badge-tile__icon { color: var(--text-muted); }

/* Modal de badge */
.badge-modal {
  align-items: center;
  text-align: center;
  gap: var(--spacing-sm);
}

.badge-modal__icon {
  width: 52px !important;
  height: 52px !important;
  color: var(--text-muted);
}

.badge-modal__icon--unlocked {
  color: var(--color-yellow);
  filter: drop-shadow(0 0 12px rgba(255, 212, 0, 0.55));
}

.badge-modal__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.badge-modal__fecha {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Cards compactas de cambio de perfil */
.profile-switch-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.profile-card--compact {
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-md);
}

.profile-card--compact .profile-card__icon {
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
}

.profile-card--compact .profile-card__name {
  font-size: 0.82rem;
}

/* ============================================================
   PÍLDORA "INSTALAR APP" (PWA) — mobile + desktop (js/install-app.js)
   Abajo a la derecha; en mobile elevada sobre la .mobile-nav (z-150).
   ============================================================ */
.vk-install {
  position: fixed;
  right: 16px;
  bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  z-index: 160;
}

@media (min-width: 769px) {
  .vk-install { right: 24px; bottom: 24px; }
}

.vk-install__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--color-yellow);
  border-radius: var(--radius-full);
  background: rgba(19, 22, 42, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 20px var(--color-yellow-glow);
  transition: transform 0.15s ease;
}

.vk-install__btn:hover { transform: translateY(-2px); }
.vk-install__btn svg { width: 18px; height: 18px; color: var(--color-yellow); }

.vk-install__close {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--bg-card, #13162A);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.vk-install__close svg { width: 12px; height: 12px; }
.vk-install__close:hover { color: #fff; }

.vk-install-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.vk-install-modal.hidden { display: none; }

@media (min-width: 769px) {
  .vk-install-modal { align-items: center; }
}

.vk-install-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card, #13162A);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 26px 22px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: vk-install-in 0.2s ease;
}

@keyframes vk-install-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.vk-install-modal__x {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

.vk-install-modal__x:hover { color: #fff; }

.vk-install-modal__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-yellow);
  color: #000;
  margin-bottom: 14px;
}

.vk-install-modal__card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

.vk-install-modal__sub {
  margin: 0 0 16px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.vk-install-modal__pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vk-install-modal__pasos li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #eaeaf0;
  line-height: 1.45;
}

.vk-install-modal__ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 212, 0, 0.12);
  border: 1px solid rgba(255, 212, 0, 0.3);
  color: var(--color-yellow);
}

.vk-install-modal__ico svg { width: 15px; height: 15px; }

.vk-install-modal__nota {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 12px;
}

/* ============================================================
   PANEL DE ADMIN
   ============================================================ */
.sidebar__nav-item--admin i { color: var(--color-purple); }

.admin {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-2xl);
}

.admin__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.admin__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
}
.admin__title i { color: var(--color-purple); width: 26px; height: 26px; }

.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--sm i { width: 16px; height: 16px; }

/* KPIs */
.admin__kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}

.admin-kpi {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  position: relative;
  overflow: hidden;
}
.admin-kpi::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--color-yellow);
  opacity: 0.7;
}
.admin-kpi__icon {
  width: 20px; height: 20px;
  color: var(--color-purple);
  margin-bottom: 10px;
}
.admin-kpi__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.admin-kpi__label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Secciones */
.admin__section { margin-bottom: var(--spacing-2xl); }
.admin__section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}
.admin__count { color: var(--text-muted); font-weight: 400; font-size: 0.9rem; }

/* Barras por perfil */
.admin__profiles { display: flex; flex-direction: column; gap: 10px; }
.admin-bar {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: var(--spacing-md);
}
.admin-bar__label { font-size: 0.88rem; color: var(--text-primary); }
.admin-bar__track {
  height: 10px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.admin-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple), var(--color-yellow));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.admin-bar__meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Tabla de usuarios */
.admin__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
}
.admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 640px;
}
.admin__table thead th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.admin__table tbody td {
  padding: 11px 14px;
  border-top: 1px solid var(--bg-border);
  color: var(--text-primary);
  white-space: nowrap;
}
.admin__table tbody tr:hover { background: var(--bg-card-hover); }
.admin__td-user { font-weight: 600; }
.admin__td-num { font-variant-numeric: tabular-nums; color: var(--color-yellow); }

.admin__empty, .admin__error {
  color: var(--text-secondary);
  text-align: center;
  padding: var(--spacing-lg);
}
.admin__error { color: var(--color-error); }

@media (max-width: 560px) {
  .admin-bar { grid-template-columns: 110px 1fr; }
  .admin-bar__meta { grid-column: 2; text-align: right; }
}

/* ============================================================
   CAPA 3 — FONDO CON VIDA (partículas + grano). Scoped a la app.
   Decorativo: no captura clicks, va detrás del contenido.
   ============================================================ */
.app-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;            /* capa de fondo pura: detrás de TODO el contenido */
  pointer-events: none;
  overflow: hidden;
}

/* Un solo scroll VISIBLE: el sidebar y el panel derecho conservan su scroll
   propio (por si el contenido supera la altura de pantalla) pero sin barra
   visible — así no aparece una "segunda barra" entre el sidebar y el contenido. */
.sidebar,
.right-panel {
  scrollbar-width: none;          /* Firefox */
}
.sidebar::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
  display: none;                  /* Chrome / Safari / Edge */
}

/* Partículas: puntos tenues que derivan muy lento (sólo transform → 60fps) */
.app-ambient::before {
  content: '';
  position: absolute;
  inset: -15%;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 70% 62%, rgba(255, 212, 0, 0.22), transparent),
    radial-gradient(1px 1px   at 42% 82%, rgba(255, 255, 255, 0.22), transparent),
    radial-gradient(1.5px 1.5px at 85% 22%, rgba(123, 47, 255, 0.28), transparent),
    radial-gradient(1px 1px   at 55% 14%, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(1px 1px   at 12% 68%, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(1.5px 1.5px at 90% 78%, rgba(255, 255, 255, 0.20), transparent);
  animation: ambient-drift 36s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes ambient-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(10px, -24px, 0); }
}

/* Grano sutil: mata el "vacío digital" plano. Muy leve — casi imperceptible. */
.app-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   CAPA 4 — Entrada escalonada de las cards del panel derecho
   ============================================================ */
.right-panel .panel-card {
  animation: panel-enter 0.5s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ACCESIBILIDAD — prefers-reduced-motion: sin loops, sólo estados
   estáticos (sombras, gradientes, foco). La pantalla queda quieta y prolija.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .map-node__circle--current,
  .map-node__circle--current::before,
  .map-connector--done path,
  .map-node__ducky-img,
  .map-node__ducky::after,
  .level-map__glow,
  .app-ambient::before,
  .panel-card__progress-fill,
  .panel-card__progress-fill::after,
  .right-panel .panel-card,
  .profile-view__avatar-ring,
  .profile-view__avatar-ring::before,
  .profile-stat-card,
  .placeholder-view,
  .placeholder-view__icon {
    animation: none !important;
  }
  /* El nodo activo conserva su foco, pero estático (sin latido) */
  .map-node__circle--current { box-shadow: var(--glow-accent); }
  /* El avatar conserva su halo de foco, pero estático */
  .profile-view__avatar-ring { box-shadow: 0 0 24px rgba(255, 212, 0, 0.22); }
  /* El ícono placeholder conserva su halo de foco, pero estático */
  .placeholder-view__icon { box-shadow: 0 0 18px rgba(255, 212, 0, 0.20), var(--border-top-light); }
}

/* ============================================================
   VISTA PASATE A PRO
   ============================================================ */
.pro { max-width: 560px; margin: 0 auto; padding: 24px 16px 64px; }
.pro__hero { text-align: center; margin-bottom: 28px; }
.pro__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  background: rgba(123, 47, 255, 0.15); color: var(--color-yellow);
  font-weight: 700; font-size: 0.85rem; border: 1px solid rgba(123, 47, 255, 0.4);
}
.pro__badge i { width: 16px; height: 16px; }
.pro__title {
  font-family: 'Space Grotesk', 'Sora', sans-serif;
  font-size: 2rem; margin: 14px 0 6px; color: var(--text-primary);
}
.pro__subtitle { color: var(--text-secondary); font-size: 1rem; }

.pro__benefits { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.pro__benefits li {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 16px; border: 1px solid rgba(255, 255, 255, 0.06);
}
.pro__benefits li i { width: 24px; height: 24px; flex-shrink: 0; color: var(--color-yellow); margin-top: 2px; }
.pro__benefits li div { display: flex; flex-direction: column; gap: 3px; }
.pro__benefits li strong { color: var(--text-primary); font-size: 0.98rem; }
.pro__benefits li span { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.4; }

.pro__plans { display: grid; gap: 14px; margin-bottom: 18px; }
@media (min-width: 560px) { .pro__plans { grid-template-columns: 1fr 1fr; } }
.pro__plan {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 22px 18px; text-align: center;
  border: 1px solid rgba(255, 212, 0, 0.25);
  display: flex; flex-direction: column; gap: 6px;
}
.pro__plan--soon { border-color: rgba(255, 255, 255, 0.06); opacity: 0.7; }
.pro__plan-price {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 1.8rem; color: var(--text-primary);
}
.pro__plan-price span { font-size: 0.9rem; color: var(--text-secondary); font-weight: 400; }
.pro__plan-region { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 8px; }
.pro__pay { width: 100%; margin-top: auto; }

.pro__error {
  background: rgba(239, 68, 68, 0.12); color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3); border-radius: var(--radius-md);
  padding: 12px 14px; text-align: center; font-size: 0.9rem; margin-bottom: 14px;
}
.pro__fineprint { text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* Tarjeta de Pro en Configuración */
.config__card--pro {
  border: 1px solid rgba(255, 212, 0, 0.3);
  background: linear-gradient(135deg, rgba(123, 47, 255, 0.10), rgba(255, 212, 0, 0.05));
}
.config__card--pro h3 { display: flex; align-items: center; gap: 8px; }
.config__card--pro h3 i { color: var(--color-yellow); width: 20px; height: 20px; }

/* ============================================================
   CORAZONES (VIDAS)
   ============================================================ */
.stat--lives { display: inline-flex; align-items: center; gap: 3px; }
.stat--lives .heart { width: 18px; height: 18px; transition: transform 0.15s ease; }
.heart--full { color: #FF4D6D; fill: #FF4D6D; }
.heart--empty { color: var(--text-muted); fill: none; opacity: 0.55; }
.stat--lives.lose-life { animation: lose-life-pulse 0.45s ease; }
@keyframes lose-life-pulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-6deg); }
  100% { transform: scale(1); }
}

/* ============================================================
   BLOQUEO POR CORAZONES AGOTADOS
   ============================================================ */
.bloqueo {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(9, 10, 16, 0.88); backdrop-filter: blur(6px);
  padding: 20px;
}
.bloqueo.hidden { display: none; }
.bloqueo__card {
  background: var(--bg-card); border: 1px solid rgba(255, 77, 109, 0.3);
  border-radius: var(--radius-lg); padding: 32px 24px;
  max-width: 380px; width: 100%; text-align: center;
  display: flex; flex-direction: column; gap: 14px;
}
.bloqueo__hearts i { width: 56px; height: 56px; color: #FF4D6D; }
.bloqueo__title { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; color: var(--text-primary); margin: 0; }
.bloqueo__msg { color: var(--text-secondary); font-size: 0.95rem; margin: 0; }
.bloqueo__timer {
  font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 700;
  color: var(--color-yellow); letter-spacing: 1px;
}
.bloqueo .btn { width: 100%; }

/* Botón de pista con IA */
.btn-pista {
  background: rgba(255, 212, 0, 0.12); border: 1px solid rgba(255, 212, 0, 0.3);
  color: var(--color-yellow); border-radius: var(--radius-full);
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s ease;
}
.btn-pista:hover { background: rgba(255, 212, 0, 0.22); }
.btn-pista:disabled { opacity: 0.5; cursor: default; }
.btn-pista i { width: 20px; height: 20px; }

/* Corazones al lado del patito, arriba del ejercicio */
.lesson-lives { gap: 4px; }
.lesson-lives .heart { width: 22px; height: 22px; }

/* ============================================================
   TOUR DE BIENVENIDA
   ============================================================ */
#tour-overlay { position: fixed; inset: 0; z-index: 3000; }
#tour-spot {
  position: fixed; border-radius: 12px; display: none; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(9, 10, 16, 0.82);
  border: 2px solid var(--color-yellow);
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.tour-card {
  position: fixed; z-index: 3001; background: var(--bg-card);
  border: 1px solid rgba(255, 212, 0, 0.3); border-radius: var(--radius-lg);
  padding: 18px; width: 300px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.tour-card--center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); }
.tour-card__step { color: var(--text-muted); font-size: 0.75rem; }
.tour-card__title { margin: 0; color: var(--text-primary); font-size: 1.1rem; font-family: 'Space Grotesk', sans-serif; }
.tour-card__text { margin: 0; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.45; }
.tour-card__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.tour-card__skip { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.tour-card__skip:hover { color: var(--text-secondary); }
