/* SuperBowl · estilos. Diseñado primero para celular (mobile-first). */

:root {
  --bg: #070b16;
  --card-solid: #0f1428;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f5ff;
  --muted: #9aa3c0;
  --gold-1: #ffd76a;
  --gold-2: #f2a516;
  --violet: #7c5cff;
  --danger: #ff6b81;
  --radius: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(124, 92, 255, 0.3), transparent 60%),
    radial-gradient(700px 520px at 100% 110%, rgba(242, 165, 22, 0.16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
#root { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.noscript { padding: 24px; text-align: center; }

/* ---------- Textos ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.title { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.card-title { font-size: 17px; }
.stack { display: grid; gap: 8px; }

/* ---------- Logo y pantalla de carga ---------- */
.logo-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.5px; color: #1b1300;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 6px 24px rgba(242, 165, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.logo-sm { width: 40px; height: 40px; font-size: 16px; }
.logo-lg { width: 84px; height: 84px; border-radius: 26px; font-size: 34px; box-shadow: 0 12px 44px rgba(242, 165, 22, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot .logo-mark { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Vistas ---------- */
.view { display: grid; gap: 16px; animation: view-in 0.35s ease both; }
.view-center { min-height: 60dvh; align-content: center; justify-items: center; text-align: center; padding: 24px; }
.shell { min-height: 100dvh; }
.main { padding: calc(var(--safe-t) + 18px) 18px calc(100px + var(--safe-b)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* ---------- Ingreso / registro ---------- */
.auth { padding: calc(var(--safe-t) + 40px) 20px 40px; gap: 24px; }
.brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.brand-name { font-size: 32px; font-weight: 800; letter-spacing: -0.6px; }
.slogan { color: var(--muted); font-size: 16px; }

.form { display: grid; gap: 14px; }
.form-title { font-size: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28); color: var(--text); font-size: 16px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: #66708f; }
.input:focus { border-color: var(--gold-1); box-shadow: 0 0 0 3px rgba(255, 215, 106, 0.18); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 50px; }
.eye { position: absolute; right: 4px; top: 4px; width: 42px; height: 42px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.35; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--gold-2); }

.form-error {
  padding: 10px 12px; border-radius: 12px; font-size: 14px; color: #ffb3c0;
  background: rgba(255, 107, 129, 0.12); border: 1px solid rgba(255, 107, 129, 0.4);
}

.switch { text-align: center; color: var(--muted); font-size: 15px; }
.link { background: none; border: 0; padding: 6px 2px; color: var(--gold-1); font-weight: 700; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px;
  border-radius: 14px; border: 1px solid transparent; font-size: 16px; font-weight: 700;
  transition: transform 0.12s, filter 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-gold { color: #1b1300; background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); box-shadow: 0 8px 22px rgba(242, 165, 22, 0.28); }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-block { width: 100%; }

/* ---------- Íconos ---------- */
.ico { display: inline-flex; width: 22px; height: 22px; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; }

/* ---------- Inicio ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo-mark { flex: none; }
.topbar > div { min-width: 0; }
.hello { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; overflow-wrap: anywhere; }

.pot {
  position: relative; overflow: hidden; text-align: center; padding: 26px 18px;
  border: 1px solid transparent;
  background: linear-gradient(var(--card-solid), var(--card-solid)) padding-box, linear-gradient(135deg, var(--gold-1), var(--violet)) border-box;
  box-shadow: 0 18px 50px rgba(124, 92, 255, 0.18);
}
.pot::after {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.09) 50%, transparent 60%);
  transform: translateX(-60%); animation: shine 5.5s ease-in-out infinite;
}
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-1); }
.pot-amount { margin: 10px 0 8px; font-size: clamp(30px, 11vw, 48px); font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: #fff; }

/* Contador con dígitos que ruedan. El brillo va con drop-shadow (y no con text-shadow) para que no se corte en cuadritos. */
.roll { display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; filter: drop-shadow(0 0 14px rgba(255, 215, 106, 0.5)); }
.roll-sym { display: inline-block; }
.roll-digit { display: inline-block; width: 0.62em; height: 1em; line-height: 1; overflow: hidden; text-align: center; }
.roll-strip { display: flex; flex-direction: column; transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1); }
.roll-strip span { display: block; height: 1em; line-height: 1; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: grid; gap: 8px; padding: 14px; }
.tile-top { display: flex; align-items: center; gap: 8px; color: var(--gold-1); }
.tile-value { font-size: 26px; }

.steps { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-n {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  font-size: 14px; font-weight: 800; color: #1b1300; background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
}

.install { display: grid; gap: 10px; }
.install-title { display: flex; align-items: center; gap: 8px; color: var(--gold-1); }

/* ---------- Perfil ---------- */
.profile-head { display: grid; justify-items: center; gap: 6px; padding-top: 8px; text-align: center; }
.avatar {
  width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%;
  font-size: 34px; font-weight: 800; color: #1b1300; background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 10px 30px rgba(242, 165, 22, 0.3);
}
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.chip-gold { color: #1b1300; background: linear-gradient(135deg, var(--gold-1), var(--gold-2)); border: 0; }
.code { margin: 6px 0; text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 0.25em; color: var(--gold-1); }
.link-text { margin-bottom: 12px; text-align: center; word-break: break-all; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Pantallas "próximamente" ---------- */
.soon-icon { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 28px; color: var(--gold-1); background: var(--surface); border: 1px solid var(--line); }
.soon-icon .ico { width: 40px; height: 40px; }

/* ---------- Menú de abajo ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px calc(8px + var(--safe-b));
  background: rgba(9, 13, 26, 0.85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
}
.nav-btn { display: grid; justify-items: center; gap: 3px; padding: 6px 0; background: none; border: 0; font-size: 11px; font-weight: 600; color: var(--muted); transition: color 0.2s; }
.nav-btn .ico { width: 24px; height: 24px; transition: transform 0.25s; }
.nav-btn.active { color: var(--gold-1); }
.nav-btn.active .ico { transform: translateY(-2px) scale(1.1); }

/* ---------- Aviso corto ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); z-index: 50; max-width: 90vw; padding: 12px 18px;
  transform: translateX(-50%); border-radius: 999px; font-size: 14px; text-align: center;
  background: #1d2440; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: toast-in 0.25s ease both;
}
.toast-out { opacity: 0; transition: opacity 0.4s; }

/* ---------- Animaciones ---------- */
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes shine { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Quien tiene activada la opción de "reducir movimiento" no ve animaciones. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
