/* ═══════════════════════════════════════════════════════════════════════════
   GolPredict — Sistema de diseño
   Estética minimalista, dark, tipografía Inter.
═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:          #0A0A0F;
  --surface:     #111118;
  --surface-2:   #1A1A24;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);
  --text:        #F0F0F8;
  --muted:       rgba(240,240,248,0.45);
  --muted-2:     rgba(240,240,248,0.65);
  --accent:      #6C5CE7;
  --accent-dim:  rgba(108,92,231,0.15);
  --gold:        #F0A500;
  --gold-dim:    rgba(240,165,0,0.12);
  --green:       #00C48C;
  --red:         #FF4D4D;
  --radius:      10px;
  --radius-lg:   14px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7d6ef0; }
.btn-gold { background: var(--gold); color: #0A0A0F; }
.btn-gold:hover { background: #ffb820; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-dim); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Inputs ── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.15s;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input::placeholder { color: var(--muted); }

/* ── Mensajes de error/éxito ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(255,77,77,0.1); color: #ff7a7a; border: 1px solid rgba(255,77,77,0.2); }
.alert-success { background: rgba(0,196,140,0.1); color: var(--green); border: 1px solid rgba(0,196,140,0.2); }

/* ── Logo ── */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.4px; }
.logo-text span { color: var(--accent); }

/* ── Spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.page-loader .spinner { width: 28px; height: 28px; border-width: 3px; border-top-color: var(--accent); }

/* ═══════════════ AUTH PAGES (login / register) ═══════════════ */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.auth-card .logo { margin-bottom: 24px; }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.auth-card .sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-google {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 11px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  transition: border-color 0.15s;
}
.btn-google:hover { border-color: var(--accent); }
.btn-google svg { width: 18px; height: 18px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-foot a { color: var(--accent); font-weight: 500; }

/* ═══════════════ DASHBOARD ═══════════════ */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 0 20px 28px; }
.nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding: 0 20px; margin-bottom: 6px;
}
.nav-section { margin-bottom: 28px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; cursor: pointer;
  color: var(--muted); font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: all 0.15s; margin-bottom: 1px;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--text); border-left-color: var(--accent); background: var(--accent-dim); }
.nav-item svg { width: 16px; height: 16px; opacity: 0.8; flex-shrink: 0; }
.sidebar-bottom { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); }
.user-info { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
  background: var(--surface-2); color: var(--muted-2);
}
.avatar.premium { background: var(--gold-dim); color: var(--gold); }
.user-name { font-size: 13px; font-weight: 500; }
.user-tier { font-size: 11px; color: var(--muted); }
.user-tier.premium { color: var(--gold); }
.logout-link { font-size: 11px; color: var(--muted); margin-top: 8px; cursor: pointer; }
.logout-link:hover { color: var(--red); }

/* Main */
.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10,10,15,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.filters { display: flex; gap: 8px; }
.pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1px solid var(--border-2);
  border-radius: 20px; font-size: 12px; color: var(--muted);
  background: var(--surface); transition: all 0.15s; cursor: pointer;
}
.pill:hover { border-color: var(--accent); color: var(--text); }
.pill.active { border-color: var(--accent); background: var(--accent-dim); color: var(--text); }

.content { padding: 24px 28px; max-width: 920px; }

/* Daily pick */
.daily-pick {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  margin-bottom: 24px; position: relative; overflow: hidden;
}
.daily-pick::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.pick-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.pick-label svg { width: 11px; height: 11px; }
.pick-teams { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.team-block { text-align: center; flex: 1; }
.team-badge {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); overflow: hidden;
}
.team-badge img { width: 100%; height: 100%; object-fit: contain; }
.team-name { font-size: 13px; font-weight: 500; }
.team-league { font-size: 10px; color: var(--muted); margin-top: 2px; }
.vs-block { text-align: center; padding: 0 12px; }
.vs { font-size: 11px; color: var(--muted); font-weight: 500; }
.match-time { font-size: 13px; color: var(--text); font-weight: 600; margin-top: 4px; }
.pick-prediction { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.pred-card { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; text-align: center; }
.pred-score { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; color: var(--accent); }
.pred-pct { font-size: 11px; color: var(--muted); margin-top: 2px; }
.outcome-bars { display: flex; gap: 10px; }
.bar-group { flex: 1; }
.bar-label { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.bar-track { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 2px; }
.bar-val { font-size: 11px; font-weight: 600; margin-top: 3px; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Match card */
.match-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.15s; cursor: pointer; position: relative;
}
.match-card:hover { border-color: var(--border-2); }
.match-comp {
  width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; overflow: hidden;
}
.match-comp img { width: 18px; height: 18px; object-fit: contain; }
.match-teams { flex: 1; min-width: 0; }
.match-teams-row { display: flex; align-items: center; justify-content: space-between; }
.match-team-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-score { font-size: 13.5px; font-weight: 700; color: var(--accent); white-space: nowrap; margin-left: 8px; }
.match-pct { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.match-meta { font-size: 11px; color: var(--muted); display: flex; gap: 8px; margin-top: 4px; }
.match-time-badge { font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; flex-shrink: 0; }
.match-time-badge .h { font-size: 13px; font-weight: 500; color: var(--text); }

/* Premium lock */
.premium-lock {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden;
}
.premium-lock::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 25%, var(--surface) 82%);
  pointer-events: none;
}
.blurred { filter: blur(5px); user-select: none; pointer-events: none; }
.lock-overlay { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); z-index: 2; }
.lock-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--gold-dim); border: 1px solid rgba(240,165,0,0.25);
  color: var(--gold); font-size: 11px; font-weight: 600;
  padding: 5px 11px; border-radius: 20px; cursor: pointer; transition: background 0.15s;
}
.lock-badge:hover { background: rgba(240,165,0,0.2); }
.lock-badge svg { width: 11px; height: 11px; }

/* Upgrade banner */
.upgrade-banner {
  background: var(--surface); border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius-lg); padding: 20px; margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.upgrade-title { font-size: 14px; font-weight: 600; color: var(--gold); margin-bottom: 3px; }
.upgrade-sub { font-size: 12px; color: var(--muted); }

/* Skeleton loaders */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--radius); height: 62px; margin-bottom: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 760px) {
  .sidebar { display: none; }
  .content { padding: 16px; }
  .pick-prediction { gap: 6px; }
  .pred-score { font-size: 18px; }
  .upgrade-banner { flex-direction: column; align-items: flex-start; }
}
