/* English Quest — Componentes reutilizables */

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 24px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-dark));
  box-shadow: var(--shadow-violet);
}
.btn-primary:hover { box-shadow: 0 0 32px rgba(139, 92, 246, 0.5); }

.btn-secondary {
  color: var(--text-primary);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--text-secondary); }

.btn-ghost {
  color: var(--cyan);
  background: transparent;
  border: 1px solid rgba(34, 211, 238, 0.4);
}
.btn-ghost:hover { background: rgba(34, 211, 238, 0.08); }

.btn-block { width: 100%; }

/* Tarjetas */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
}
.chip-amber { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.4); color: var(--amber); }
.chip-violet { background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.4); color: var(--violet); }
.chip-muted { background: var(--bg-elevated-2); border: 1px solid var(--border-strong); color: var(--text-tertiary); }

/* Stat tiles (resumen en el hero) */
.stat-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
}
.stat-tile .icon { font-size: 20px; }
.stat-tile .label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }

/* Título de sección */
.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.section-title {
  font-size: clamp(24px, 4vw, 32px);
  margin-top: var(--space-2);
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: var(--space-3);
  max-width: 60ch;
}

/* Pasos "Cómo funciona" */
.step-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.step-number {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--violet);
}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Tarjetas de nivel */
.level-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.level-card.is-open { border-color: var(--violet); box-shadow: var(--shadow-violet); }
.level-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
}
.level-name { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.level-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.level-lock { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); margin-top: auto; }

/* Tarjetas de juego */
.game-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.game-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.game-card:active { transform: translateY(0) scale(0.99); }
.game-card .emoji { font-size: 30px; }
.game-card .name { font-size: 15px; font-weight: 700; }
.game-card .desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* Campos de formulario */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.field input {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  min-height: 48px;
}
.field input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.field-error { font-size: 12px; color: var(--coral); min-height: 16px; }
.form-error-banner {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid var(--coral);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* Espacios publicitarios (preparados, ver core/ad-slot.js) */
.ad-slot { margin: var(--space-4) 0; }
.ad-slot[hidden] { display: none; }
.ad-slot-placeholder {
  min-height: 90px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(90vw, 380px);
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
