/* ═══════════════════════════════════════════════════════════
   LaQuiniela3 — Web3 dApp Styles
   Paleta: Azul Marino + Dorado
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary:   #0A1F3D;
  --bg-secondary: #0D2847;
  --bg-card:      #0F3060;
  --bg-card-hover:#143870;
  --border:       #1a4080;
  --border-hover: #2a5a9e;
  --text-primary: #FFFFFF;
  --text-secondary:#b8c8e8;
  --text-muted:   #6a88b8;
  --accent-blue:  #4f8ef7;
  --accent-green: #22c55e;
  --accent-yellow:#FFD700;
  --accent-red:   #ef4444;
  --accent-purple:#a855f7;
  --polygon:      #FFD700;
  --gold:         #FFD700;
  --gold-dark:    #B8960A;
  --gold-glow:    rgba(255, 215, 0, 0.25);
}

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


body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* ─── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ─── HEADER ─────────────────────────────────────────────── */
.header {
  background: rgba(10, 31, 61, 0.97);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: -55px 0 -65px;
  filter: drop-shadow(0 0 18px rgba(255,215,0,0.45));
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.logo-3 {
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}

.logo-sub {
  font-size: 16px;
  color: rgba(255,215,0,0.5);
  font-weight: 400;
  margin-top: -2px;
}

.header-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

/* ─── NAVEGACIÓN TABS ────────────────────────────────────── */
.tab-btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn:hover { color: var(--gold); background: rgba(255,215,0,0.08); }

.tab-btn-active {
  color: var(--gold) !important;
  background: rgba(255,215,0,0.12) !important;
  box-shadow: 0 0 0 1px rgba(255,215,0,0.3);
}

/* ─── WALLET BUTTON ─────────────────────────────────────── */
.wallet-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

#wallet-btn {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1F3D;
}

#wallet-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.net-badge {
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.net-polygon  { background: rgba(130,71,229,0.2); color: #a855f7; border: 1px solid rgba(130,71,229,0.3); }
.net-testnet  { background: rgba(79,142,247,0.2); color: #4f8ef7; border: 1px solid rgba(79,142,247,0.3); }

.usdc-balance {
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 600;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── POOL STATS ─────────────────────────────────────────── */
.pool-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.pool-stat:last-child { border-bottom: none; }

.pool-stat-label {
  font-size: 16px;
  color: var(--text-secondary);
}

.pool-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── AMOUNT BUTTONS ─────────────────────────────────────── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-primary);
}

.amount-btn:hover {
  border-color: var(--accent-blue);
  background: rgba(79,142,247,0.08);
}

.amount-btn-active {
  border-color: var(--accent-blue) !important;
  background: rgba(79,142,247,0.15) !important;
  box-shadow: 0 0 0 3px rgba(79,142,247,0.2);
}

.amount-usd {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-green);
}

.amount-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── FILTROS GRUPO ──────────────────────────────────────── */
#group-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover { color: var(--text-primary); border-color: var(--border-hover); }

.filter-btn-active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white !important;
}

/* ─── SECCIÓN DE GRUPO ───────────────────────────────────── */
.group-section { margin-bottom: 32px; }

.group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 700;
}

.group-badge {
  background: linear-gradient(135deg, rgba(130,71,229,0.3), rgba(79,142,247,0.3));
  border: 1px solid rgba(130,71,229,0.4);
  color: #c084fc;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ─── TARJETA DE PARTIDO ─────────────────────────────────── */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.2s;
  cursor: default;
}

.match-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.match-card-predicted {
  border-color: rgba(79,142,247,0.5) !important;
  background: rgba(79,142,247,0.04) !important;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.match-group {
  font-size: 16px;
  color: var(--accent-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.match-date {
  font-size: 16px;
  color: var(--text-muted);
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.team-flag { font-size: 42px; line-height: 1; }

.team-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 50px;
}

.vs-text {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.match-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ─── PREDICCIÓN INPUTS ──────────────────────────────────── */
.match-prediction {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.pred-label {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.score-input-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.score-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

.score-input {
  width: 48px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.score-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79,142,247,0.2); }

.score-separator {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 4px;
}

.pred-indicator {
  display: block;
  text-align: center;
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 600;
  margin-top: 6px;
}

/* ─── VENUE ──────────────────────────────────────────────── */
.match-venue {
  display: flex;
  align-items: center;
  gap: 4px;
}

.venue-icon { font-size: 16px; }
.venue-name {
  font-size: 16px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── RESULTS ─────────────────────────────────────────────── */
.result-official {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.result-official.correct { background: rgba(34,197,94,0.15); color: #22c55e; }
.result-official.wrong   { background: rgba(239,68,68,0.15);  color: #ef4444; }

/* ─── PANEL USUARIO ──────────────────────────────────────── */
.user-bet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.prize-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: 12px;
  padding: 10px 16px;
}

.claim-btn {
  background: var(--accent-yellow);
  color: #000;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.claim-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.user-predictions { }

.predictions-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.pred-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 15px;
  flex-wrap: wrap;
  gap: 4px;
}

.pred-teams { color: var(--text-secondary); flex: 1; }
.pred-score { font-weight: 600; color: var(--accent-blue); }

/* ─── BET FORM ───────────────────────────────────────────── */
.bet-form { }

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group { margin-bottom: 16px; }

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79,142,247,0.15); }

.predictions-summary {
  background: rgba(79,142,247,0.05);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.pred-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pred-chip {
  font-size: 16px;
  padding: 3px 10px;
  background: rgba(79,142,247,0.15);
  border: 1px solid rgba(79,142,247,0.3);
  border-radius: 20px;
  color: var(--accent-blue);
  font-weight: 500;
}

/* ─── BOTONES ─────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1F3D;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-bet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  color: white;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  width: 100%;
}

.btn-bet:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(130,71,229,0.4); }
.btn-bet:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── ADMIN ───────────────────────────────────────────────── */
.admin-section { }
.admin-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.btn-admin {
  width: 100%;
  padding: 10px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-admin:hover { filter: brightness(1.1); }
.btn-admin-green { background: var(--accent-green) !important; color: #000 !important; }
.btn-admin-yellow { background: var(--accent-yellow) !important; color: #000 !important; }

.admin-log {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
}

/* ─── HERO BANNER ────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(160deg, rgba(13,40,71,0.9) 0%, rgba(10,31,61,0.95) 100%);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='10'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-la, .hero-3 {
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  text-shadow: 0 0 30px rgba(255,215,0,0.5);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
}

.badge-polygon { background: rgba(255,215,0,0.12); border: 1px solid rgba(255,215,0,0.35); color: var(--gold); }
.badge-usdc    { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.3);  color: #22c55e; }
.badge-exact   { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: #FFFFFF; }
.badge-secure  { background: rgba(255,215,0,0.08);  border: 1px solid rgba(255,215,0,0.2);  color: var(--gold); }

/* ─── CÓMO FUNCIONA ──────────────────────────────────────── */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.how-step-num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin: 0 auto 10px;
}

.how-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.how-step-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ─── TABLA RESULTADOS ───────────────────────────────────── */
.results-container {
  padding: 24px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.results-table td {
  padding: 12px 16px;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}

.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--bg-card-hover); }

/* ─── LOADING OVERLAY ────────────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

#loading-msg {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── UTILIDADES ─────────────────────────────────────────── */
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.text-sm { font-size: 15px; }
.text-xs { font-size: 15px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: monospace; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* Color utilities */
.text-white  { color: #ffffff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-green-400 { color: #4ade80; }
.text-yellow-400 { color: #facc15; }
.text-orange-400 { color: #fb923c; }
.text-blue-400 { color: #60a5fa; }
.text-purple-400 { color: #c084fc; }
.text-red-400 { color: #f87171; }

/* Background utilities */
.bg-green-600  { background-color: #16a34a; }
.bg-blue-600   { background-color: #2563eb; }
.bg-red-600    { background-color: #dc2626; }
.bg-yellow-600 { background-color: #ca8a04; }

/* Hover utilities */
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-blue-700:hover  { background-color: #1d4ed8; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .header-nav { display: none; }
  .main-layout { padding: 16px; }
  .hero-title { font-size: 24px; }
  .amount-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .matches-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .how-it-works { grid-template-columns: repeat(2, 1fr); }
}

/* ─── ANIMACIONES ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.match-card { animation: fadeIn 0.3s ease both; }
.match-card:nth-child(1) { animation-delay: 0.05s; }
.match-card:nth-child(2) { animation-delay: 0.1s; }
.match-card:nth-child(3) { animation-delay: 0.15s; }

/* ─── PRED COUNTER BADGE ─────────────────────────────────── */
.pred-counter {
  background: var(--accent-blue);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════
   DUAL MODE — Nuevas clases para modo Partido + Fase Grupos
   ═══════════════════════════════════════════════════════════ */

/* ─── SELECTOR DE MODO ───────────────────────────────────── */
.mode-selector {
  display: flex;
  gap: 8px;
  padding: 20px 24px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.mode-btn-active {
  background: linear-gradient(135deg, rgba(130,71,229,0.25), rgba(79,142,247,0.25));
  border-color: rgba(130,71,229,0.6);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px rgba(130,71,229,0.3), 0 4px 16px rgba(130,71,229,0.2);
}

.mode-btn-inactive {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}

.mode-btn-inactive:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ─── MODE INFO BAR ──────────────────────────────────────── */
.mode-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px 16px;
  background: rgba(79,142,247,0.05);
  border: 1px solid rgba(79,142,247,0.15);
  border-radius: 10px;
  margin-bottom: 16px;
}

.mode-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-secondary);
}

.mode-info-icon {
  font-size: 15px;
}

/* ─── AMOUNT SELECTOR BAR (inline) ──────────────────────── */
.amount-selector-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.amount-label-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.amount-grid-inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.amount-btn-sm {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
}

.amount-btn-sm:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.amount-btn-sm-active {
  border-color: var(--accent-blue) !important;
  background: rgba(79,142,247,0.15) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 0 0 2px rgba(79,142,247,0.2);
}

.amount-usd-sm {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-green);
}

.amount-label-sm {
  font-size: 10px;
  color: var(--text-muted);
}

/* ─── GROUP BET BAR (modo fase grupos) ───────────────────── */
.group-bet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(130,71,229,0.08);
  border: 1px solid rgba(130,71,229,0.3);
  border-radius: 12px;
  margin-bottom: 16px;
}

.group-bet-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-bet-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  color: white;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-bet-compact:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(130,71,229,0.4);
}

.btn-bet-compact:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── MATCH RESULT BADGE ─────────────────────────────────── */
.match-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
}

.result-correct {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.35);
  color: #22c55e;
}

.result-wrong {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}

/* ─── MATCH TIMER ────────────────────────────────────────── */
.match-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.timer-open {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

.timer-closed {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}

.timer-pending {
  background: rgba(139,143,168,0.12);
  border: 1px solid rgba(139,143,168,0.2);
  color: var(--text-secondary);
}

/* ─── MATCH GROUP LABEL ──────────────────────────────────── */
.match-group-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── BET SUMMARY ITEMS (sidebar) ───────────────────────── */
.space-y-3 > * + * { margin-top: 12px; }

.bet-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.bet-summary-item:last-child { border-bottom: none; }

/* ─── PRIZE AVAILABLE ────────────────────────────────────── */
.prize-available {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: 10px;
  text-align: center;
}

/* ─── ORACLE STATUS BADGES ───────────────────────────────── */
.badge-finalized {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

.badge-pending {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(139,143,168,0.12);
  border: 1px solid rgba(139,143,168,0.2);
  color: var(--text-secondary);
}

/* ─── PREDICTION INPUT (estado cerrado) ──────────────────── */
.match-prediction.closed {
  opacity: 0.6;
  pointer-events: none;
}

/* ─── BTN BET MATCH (en cada tarjeta, modo partido) ─────── */
.btn-bet-match {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}

.btn-bet-match:hover:not(.disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(130,71,229,0.4);
}

.btn-bet-match.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none;
}

/* ─── PRED CHECK MARK ────────────────────────────────────── */
.pred-check {
  font-size: 15px;
  color: var(--accent-green);
  font-weight: 700;
  margin-left: 6px;
}

/* ─── HOME / AWAY TEAM ───────────────────────────────────── */
.home-team { }
.away-team { }

/* ─── ML-2 UTILITY ───────────────────────────────────────── */
.ml-2 { margin-left: 8px; }

/* ─── BORDER-T BORDER-GRAY-800 ───────────────────────────── */
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-gray-800 { border-top-color: #1f2937; }

/* ─── DUAL MODE PANEL CONTAINERS ─────────────────────────── */
#match-mode-panel,
#group-mode-panel {
  transition: opacity 0.2s ease;
}

/* ─── RESPONSIVE DUAL MODE ───────────────────────────────── */
@media (max-width: 768px) {
  .mode-selector { padding: 16px 16px 0; flex-wrap: wrap; }
  .mode-btn { padding: 8px 16px; font-size: 16px; }
  .amount-selector-bar { flex-direction: column; align-items: flex-start; }
  .group-bet-bar { flex-direction: column; align-items: flex-start; }
  .amount-grid-inline { gap: 4px; }
  .amount-btn-sm { padding: 5px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   BANNER CUENTA REGRESIVA — Próximo Partido
   ═══════════════════════════════════════════════════════════ */

#next-match-banner {
  max-width: 1400px;
  margin: 16px auto 0;
  padding: 0 24px;
}

.countdown-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(130,71,229,0.18) 0%,
    rgba(79,142,247,0.18) 50%,
    rgba(34,197,94,0.12) 100%);
  border: 1px solid rgba(130,71,229,0.35);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* brillo animado de fondo */
.countdown-banner::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.04) 50%,
    transparent 60%
  );
  animation: bannerShine 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bannerShine {
  0%   { left: -20%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}

/* etiqueta "próximo" */
.countdown-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 90px;
}

.countdown-label-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  gap: 5px;
}

.countdown-label-sub {
  font-size: 16px;
  color: var(--text-muted);
}

/* equipos */
.countdown-match-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.countdown-team {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-flag { font-size: 32px; line-height: 1; }

.countdown-team-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.countdown-vs {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 0 4px;
}

/* venue + fecha */
.countdown-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.countdown-venue {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* reloj digital */
.countdown-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(130,71,229,0.3);
  border-radius: 12px;
  padding: 10px 16px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 42px;
}

.countdown-digits {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  /* parpadeo suave en los últimos 60min */
  transition: color 0.3s;
}

.countdown-digits.urgent {
  color: var(--accent-red);
  animation: urgentPulse 1s ease-in-out infinite;
}

.countdown-digits.soon {
  color: var(--accent-yellow);
}

@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.countdown-unit-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

.countdown-colon {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  animation: colonBlink 1s step-start infinite;
  user-select: none;
}

@keyframes colonBlink {
  0%, 49% { opacity: 1; }
  50%,100% { opacity: 0.2; }
}

/* badge "¡Apuesta ya!" */
.countdown-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  color: white;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  text-decoration: none;
}

.countdown-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(130,71,229,0.4);
}

/* estado: partido iniciado */
.countdown-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-green);
  padding: 8px 16px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 10px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: liveDot 1.2s ease-in-out infinite;
}

@keyframes liveDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.5; }
}

/* grupo badge inline */
.countdown-group-badge {
  font-size: 16px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  color: #c084fc;
}

/* responsive */
@media (max-width: 768px) {
  #next-match-banner { padding: 0 16px; }
  .countdown-banner  { padding: 14px 16px; gap: 12px; }
  .countdown-team-name { font-size: 16px; }
  .countdown-digits  { font-size: 22px; }
  .countdown-meta    { display: none; }
  .countdown-clock   { padding: 8px 12px; }
  .countdown-unit    { min-width: 36px; }
}

/* ═══════════════════════════════════════════════════════════
   MATCH CARD — Monto inline + botón detalle
   ═══════════════════════════════════════════════════════════ */

/* Fila inferior de la card: monto + detalles */
.match-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Selector de monto compacto dentro de la card */
.card-amount-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.card-amount-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-right: 2px;
}

.card-amt-btn {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  line-height: 1.2;
}

.card-amt-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.card-amt-btn.active {
  border-color: var(--accent-blue);
  background: rgba(79,142,247,0.18);
  color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(79,142,247,0.15);
}

/* Botón "Ver detalles" en la card */
.btn-card-share {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,215,0,0.35);
  background: rgba(255,215,0,0.08);
  color: #FFD700;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-card-share:hover {
  background: rgba(255,215,0,0.18);
  border-color: #FFD700;
}

.btn-card-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-card-detail:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: rgba(168,85,247,0.08);
}

/* Pool size badge en la card */
.card-pool-badge {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-yellow);
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 5px;
  padding: 3px 7px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   MODAL DE DETALLE DEL PARTIDO
   ═══════════════════════════════════════════════════════════ */

/* Overlay */
#match-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  backdrop-filter: blur(4px);
  animation: fadeInOverlay 0.2s ease;
}

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

/* Panel lateral deslizante */
.match-modal {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-radius: 24px 0 0 24px;
  width: min(740px, 92vw);
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

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

/* Header del modal */
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.modal-teams {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.modal-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.modal-flag  { font-size: 52px; line-height: 1; }
.modal-tname {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.modal-vs-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
}

.modal-vs-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.modal-score-display {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.modal-close-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.modal-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 24px 0;
}

.modal-meta-item {
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Tabs del modal */
.modal-tabs {
  display: flex;
  gap: 2px;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-tab {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.modal-tab:hover { color: var(--text-primary); }

.modal-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent-blue);
  background: rgba(79,142,247,0.06);
}

/* Cuerpo scrollable del modal */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.modal-panel { display: none; padding: 20px 24px; }
.modal-panel.active { display: block; }

/* ── Tabla Posiciones (Leaderboard) ── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
  padding: 10px 12px;
  font-size: 16px;
  border-bottom: 1px solid rgba(42,45,62,0.5);
}

.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover td { background: rgba(255,255,255,0.02); }

.rank-medal { font-size: 15px; }

.lb-addr {
  font-family: monospace;
  font-size: 15px;
  color: var(--accent-blue);
  cursor: pointer;
}
.lb-addr:hover { text-decoration: underline; }

.lb-pred {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.lb-amount {
  font-weight: 600;
  color: var(--accent-green);
  font-size: 15px;
}

.lb-status-correct {
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 600;
}

.lb-status-pending {
  font-size: 16px;
  color: var(--text-muted);
}

/* ── Top Holders ── */
.top-holders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.holder-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}

.holder-card:hover { border-color: var(--border-hover); }

.holder-card.top-1 { border-color: rgba(234,179,8,0.4); background: rgba(234,179,8,0.04); }
.holder-card.top-2 { border-color: rgba(156,163,175,0.4); }
.holder-card.top-3 { border-color: rgba(180,112,64,0.4); }

.holder-rank {
  font-size: 20px;
  line-height: 1;
}

.holder-addr {
  font-family: monospace;
  font-size: 16px;
  color: var(--accent-blue);
  cursor: pointer;
}
.holder-addr:hover { text-decoration: underline; }

.holder-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-green);
}

.holder-pred {
  font-size: 16px;
  color: var(--text-secondary);
}

.holder-pred strong { color: var(--accent-blue); font-size: 16px; }

/* ── Comentarios ── */
.comments-section { }

.comment-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #fca5a5;
  line-height: 1.5;
}

.comment-warning-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.comment-warning strong { color: #f87171; }

.comment-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-end;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 100px;
  transition: border-color 0.15s;
  line-height: 1.5;
}

.comment-input:focus { border-color: var(--accent-blue); }
.comment-input::placeholder { color: var(--text-muted); }

.btn-comment-send {
  padding: 10px 18px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-comment-send:hover { filter: brightness(1.1); }
.btn-comment-send:disabled { opacity: 0.5; cursor: not-allowed; }

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  display: flex;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8247e5, #4f8ef7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.comment-bubble {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-blue);
  font-family: monospace;
}

.comment-time {
  font-size: 16px;
  color: var(--text-muted);
}

.comment-pred-chip {
  font-size: 16px;
  padding: 2px 7px;
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 20px;
  color: var(--accent-blue);
  font-weight: 600;
}

.comment-text {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.comment-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 5px;
  transition: background 0.12s;
}

.comment-likes:hover {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* ── Actividad / Feed ── */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg-secondary);
  border-radius: 10px;
  font-size: 15px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
  animation: fadeIn 0.3s ease;
}

.activity-item:hover { border-color: var(--border); }

.activity-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.activity-content { flex: 1; }

.activity-addr {
  color: var(--accent-blue);
  font-family: monospace;
  font-weight: 600;
}

.activity-detail { color: var(--text-secondary); }
.activity-detail strong { color: var(--text-primary); }

.activity-time {
  font-size: 16px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Stats rápidas en modal */
.modal-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.modal-stat-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.modal-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.modal-stat-value.green  { color: var(--accent-green); }
.modal-stat-value.yellow { color: var(--accent-yellow); }
.modal-stat-value.blue   { color: var(--accent-blue); }
.modal-stat-value.purple { color: var(--accent-purple); }

.modal-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
}

/* Sección vacía */
.modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.modal-empty-icon { font-size: 36px; margin-bottom: 10px; }

/* Predicciones más populares (barra de votos) */
.pred-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pred-bar-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pred-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
}

.pred-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #8247e5, #4f8ef7);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.pred-bar-count {
  font-size: 16px;
  color: var(--text-muted);
  min-width: 44px;
  text-align: left;
}

/* ══════════════════════════════════════════════════════
   MODAL BIENVENIDA
══════════════════════════════════════════════════════ */
#welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 15, 0.88);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  backdrop-filter: blur(8px);
  animation: fadeInOverlay 0.3s ease;
}

.welcome-modal {
  background: linear-gradient(160deg, #0D2847 0%, #0A1F3D 100%);
  border: none;
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,215,0,0.2);
  max-width: 520px;
  width: 92vw;
  padding: 36px 32px 28px;
  position: relative;
  margin: auto;
  animation: slideUpModal 0.32s cubic-bezier(0.34,1.28,0.64,1);
}

.welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: #6b7280;
  font-size: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.welcome-close:hover { background: rgba(255,255,255,0.12); color: #e8eaf6; }

.welcome-logo {
  font-size: 48px;
  text-align: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(130,71,229,0.5));
}

.welcome-title {
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  color: #FFFFFF;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  font-size: 15px;
  color: #8b8fa8;
  text-align: center;
  line-height: 1.6;
  margin: 0 0 24px;
}

.welcome-rules {
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  color: #c4c7d9;
  line-height: 1.5;
}

.wr-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.welcome-legal {
  font-size: 15px;
  color: #5c6080;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.welcome-link {
  color: #818cf8;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}
.welcome-link:hover { color: #a5b4fc; }

.welcome-btn-accept {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0A1F3D;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.welcome-btn-accept:hover { opacity: 0.9; transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════
   MODAL TÉRMINOS Y CONDICIONES
══════════════════════════════════════════════════════ */
#terms-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 15, 0.92);
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}
#terms-overlay.hidden { display: none; }

.terms-modal {
  background: #0e1020;
  border: none;
  border-radius: 20px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.06);
  max-width: 680px;
  width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpModal 0.28s cubic-bezier(0.34,1.2,0.64,1);
}

.terms-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.terms-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8eaf6;
  margin: 0;
}

.terms-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 16px;
  color: #9ca3b8;
  line-height: 1.75;
  scrollbar-width: thin;
  scrollbar-color: #2a2d3e transparent;
}

.terms-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #c4c7d9;
  margin: 22px 0 8px;
}

.terms-body p, .terms-body ul {
  margin: 0 0 12px;
}

.terms-body ul {
  padding-left: 20px;
}

.terms-body ul li {
  margin-bottom: 5px;
}

.terms-body strong {
  color: #e8eaf6;
}

.terms-effective {
  font-size: 15px;
  color: #5c6080;
  margin-bottom: 20px !important;
}

.terms-footer-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 16px;
  color: #4b5263;
}

.terms-actions {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.terms-btn-close {
  padding: 10px 20px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 10px;
  color: #8b8fa8;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.terms-btn-close:hover { background: rgba(255,255,255,0.1); color: #e8eaf6; }

/* ── Tab Líderes ── */
@media (max-width: 768px) {
  #tab-lideres .card + .card { margin-top: 0; }
  #tab-lideres [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* ── Modal: loading state ── */
.modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Wallet: hint de desconexión ── */
.wallet-disconnect-hint {
  display: none;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  margin-left: 4px;
  color: #fca5a5;
}

#wallet-btn:hover .wallet-disconnect-hint {
  display: inline;
}

#wallet-btn:hover {
  background: #dc2626 !important;
  transition: background 0.2s;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: linear-gradient(180deg, rgba(10,31,61,0.8), rgba(10,31,61,0.95));
  border-top: 1px solid rgba(255,215,0,0.15);
  padding: 40px 24px 20px;
  margin-top: 80px;
  color: var(--text-secondary);
  font-size: 14px;
  width: 100%;
}

.footer-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  box-sizing: border-box;
}

.footer-section h4 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-section p {
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer-column h5 {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--gold);
}

.footer-bottom {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,215,0,0.1);
  text-align: center;
  box-sizing: border-box;
}

.footer-bottom p {
  margin: 6px 0;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Responsive modal ── */
@media (max-width: 768px) {
  .match-modal { width: 100vw; border-radius: 20px 20px 0 0; height: 92vh; }
  .modal-header { padding: 16px 16px 12px; }
  .modal-flag { font-size: 28px; }
  .modal-panel { padding: 16px; }
  .top-holders-grid { grid-template-columns: 1fr 1fr; }
  .modal-tabs { padding: 10px 16px 0; }
  .modal-meta-row { padding: 8px 16px 0; }

  .footer-content { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: 1fr; gap: 30px; }
}

/* ── Scroll to top button ── */
#scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: #FFD700;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 999;
  line-height: 1;
}
#scroll-top-btn:hover {
  background: rgba(255, 215, 0, 0.28);
  transform: translateY(-2px);
}
#scroll-top-btn.visible {
  display: flex;
}
