/* Drop Zone — tema oscuro estilo gaming */
:root {
  --bg: #0d0d17;
  --bg2: #151522;
  --card: #1a1a2b;
  --border: #2b2b45;
  --text: #e8e8f2;
  --muted: #9a9ab5;
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --gold: #fbbf24;
  --green: #22c55e;
  --red: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    linear-gradient(rgba(13,13,23,.55), rgba(13,13,23,.86)),
    url("../img/bg-battle-royale.jpg") center top / cover no-repeat fixed,
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px; flex: 1; width: 100%; }

/* ---------- navbar ---------- */
.navbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-name { font-weight: 900; letter-spacing: 2px; font-size: 1.2rem; color: var(--text); }
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a {
  color: var(--muted); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--card); text-decoration: none; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.username { color: var(--gold); font-weight: 700; }

/* ---------- botones ---------- */
.btn {
  display: inline-block; padding: 9px 18px; border-radius: 10px;
  font-weight: 700; border: none; cursor: pointer; font-size: 0.95rem;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-block { width: 100%; margin-top: 8px; }
.btn-copy { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 6px 12px; font-size: 0.85rem; }
.btn-toggle { background: var(--card); color: var(--text); border: 1px solid var(--border); width: 100%; margin-top: 8px; }
.btn-toggle.is-owned { background: linear-gradient(135deg, #166534, #15803d); border-color: var(--green); color: #fff; }
.btn-toggle:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 40px 0 20px; }
.hero-logo { width: min(440px, 85%); height: auto; }
.hero h1 { font-size: 3rem; letter-spacing: 6px; margin: 12px 0 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { color: var(--muted); font-size: 1.15rem; margin-bottom: 24px; }
.stats { display: flex; gap: 24px; justify-content: center; margin-bottom: 32px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 32px; }
.stat-num { display: block; font-size: 2rem; font-weight: 900; color: var(--gold); }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.hero-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; text-align: left; }
.card-link:hover { text-decoration: none; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; height: 100%; transition: transform .12s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-emoji { font-size: 2.2rem; }
.card h2 { margin: 10px 0 8px; font-size: 1.3rem; }
.card p { color: var(--muted); margin-bottom: 16px; }

/* ---------- paginas ---------- */
.page-title { font-size: 1.9rem; margin-bottom: 6px; }
.page-sub { color: var(--muted); margin-bottom: 14px; }
.updated-at { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.hint { color: var(--muted); font-size: 0.92rem; margin-top: 14px; }
.hidden { display: none; }
.empty { background: var(--card); border: 1px dashed var(--border); border-radius: 14px;
  padding: 40px; text-align: center; color: var(--muted); }

/* ---------- tabla de codigos ---------- */
.codes-table-wrap { overflow-x: auto; }
.codes-table { width: 100%; border-collapse: collapse; background: var(--card);
  border-radius: 14px; overflow: hidden; }
.codes-table th, .codes-table td { padding: 12px 14px; text-align: left; }
.codes-table thead { background: #20203a; }
.codes-table tbody tr { border-top: 1px solid var(--border); }
.codes-table tbody tr.row-new { background: rgba(139, 92, 246, 0.08); }
.code-cell code { background: #0a0a14; padding: 6px 10px; border-radius: 8px;
  font-size: 1rem; color: var(--gold); font-weight: 700; }
.badge-new { background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 800;
  padding: 3px 8px; border-radius: 20px; margin-left: 8px; vertical-align: middle;
  animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.reward-cell { color: var(--muted); }
.copy-cell { white-space: nowrap; }

/* ---------- sprites ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filter-input {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-size: 0.95rem; flex: 1; min-width: 150px;
}
.filter-input:focus { outline: none; border-color: var(--accent); }
select.filter-input { flex: 0 1 auto; }

.sprite-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px;
}
.sprite-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; text-align: center; transition: border-color .15s ease;
}
.sprite-card:hover { border-color: var(--accent); }
.sprite-card.owned { border-color: var(--green); }
.sprite-img { width: 100%; max-width: 110px; height: auto; aspect-ratio: 1; object-fit: contain; }
.sprite-name { font-weight: 700; font-size: 0.92rem; margin: 8px 0 6px; }
.sprite-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.badge-family { background: #1e2a5a; color: #93c5fd; }
.badge-variant { background: #3b2a5a; color: #c4b5fd; }
.login-hint { color: var(--muted); font-size: 0.75rem; margin-top: 6px; }

/* ---------- progreso ---------- */
.progress-wrap { margin: 16px 0 24px; }
.progress-label { font-weight: 800; font-size: 1.2rem; margin-bottom: 8px; color: var(--gold); }
.progress-bar { background: var(--card); border: 1px solid var(--border); border-radius: 20px; height: 22px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 20px; transition: width .4s ease; }

/* ---------- auth ---------- */
.auth-box { max-width: 420px; margin: 40px auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.auth-form label { display: block; margin-bottom: 14px; font-weight: 600; }
.auth-form input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-size: 1rem;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }

/* ---------- flashes ---------- */
.flash-wrap { max-width: 1100px; margin: 12px auto 0; padding: 0 16px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; font-weight: 600; }
.flash-ok { background: rgba(34,197,94,.15); border: 1px solid var(--green); color: #bbf7d0; }
.flash-warn, .flash-error { background: rgba(239,68,68,.12); border: 1px solid var(--red); color: #fecaca; }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 0.82rem;
  padding: 28px 16px 20px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer p { margin: 4px 0; }

/* ---------- movil ---------- */
@media (max-width: 640px) {
  .navbar { flex-wrap: wrap; gap: 10px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
  .hero h1 { font-size: 2.1rem; letter-spacing: 3px; }
  .sprite-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .stats { gap: 12px; }
  .stat { padding: 12px 20px; }
}

/* ---------- paginas legales ---------- */
.legal { max-width: 800px; margin: 0 auto; line-height: 1.7; }
.legal h1 { margin-bottom: 4px; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }
.legal h2 { margin-top: 28px; font-size: 1.15rem; color: var(--accent); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* ---------- temporadas ---------- */
.badge-season { background: rgba(124,58,237,.25); border: 1px solid #7c3aed; color: #d8b4fe; }
.season-progress { max-width: 640px; margin: 18px auto 28px; display: flex; flex-direction: column; gap: 10px; }
.season-row { display: flex; align-items: center; gap: 12px; }
.season-name { min-width: 70px; font-weight: 700; }
.season-count { min-width: 80px; text-align: right; color: var(--muted); font-size: 0.9rem; }
.progress-bar-sm { height: 10px; flex: 1; }

/* ---------- login con Google ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 0.9rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #333; }
.btn-google { background: #fff; color: #1f1f1f; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; }
.btn-google:hover { background: #f2f2f2; text-decoration: none; }
.google-g { flex-shrink: 0; }
