/* ═══════════════════════════════════════════════════════
   QUINIELA APP — CSS GLOBAL
   ═══════════════════════════════════════════════════════ */

:root {
  --red:       #cb1517;
  --red-glow:  rgba(203,21,23,.35);
  --red-soft:  rgba(227,6,19,.05);
  --white:     #ffffff;
  --bg:        #0a0b0d;
  --surface:   #101214;
  --card:      #161819;
  --border:    #222426;
  --muted:     #4a4e54;
  --text:      #f0f0f0;
  --text-dim:  #7a7e86;
  --ok:        #00c853;
  --fail:      #e53935;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,.6);
  --nav-w:     240px;   /* Ancho del sidenav en desktop */
  --topbar-h:  58px;    /* Altura del topbar */
  --bottomnav-h: 60px;  /* Altura del bottom nav (móvil) */
}

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

body {
  background: var(--bg); color: var(--text);
  font-family: 'Barlow', sans-serif;
  min-height: 100vh;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: #0d0e0f;
  border-bottom: 2px solid var(--red);
  padding: 0 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  box-shadow: 0 2px 24px var(--red-glow);
}

.topbar-brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.topbar-logo  { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; }
.topbar-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem; font-weight: 800; letter-spacing: .04em; color: var(--white);
}
.topbar-title span { color: var(--red); }
.topbar-info  { font-size: .8rem; color: var(--text-dim); line-height: 1.4; text-align: right; flex: 1; min-width: 0; }
.topbar-info strong { color: var(--white); font-size: .9rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px; justify-content: center;
  width: 36px; height: 36px; background: transparent; border: none; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--text); border-radius: 2px;
  transition: all .25s;
}

/* ── SIDENAV ────────────────────────────────────────────── */
.sidenav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: var(--nav-w);
  background: #0d0e0f;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.sidenav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1rem .8rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidenav-logo-wrap { display: flex; align-items: center; gap: .6rem; }
.sidenav-logo      { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; }
.sidenav-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; color: var(--white);
}
.sidenav-title em { color: var(--red); font-style: normal; }
.sidenav-sub  { font-size: .68rem; color: var(--text-dim); letter-spacing: .06em; text-transform: uppercase; }
.sidenav-close { display: none; background: transparent; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; padding: 4px; }

/* Menú items */
.sidenav-menu { list-style: none; padding: .75rem 0; flex: 1; overflow-y: auto; }
.sidenav-menu li { padding: 0 .6rem; margin-bottom: .15rem; }

.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .72rem .85rem; border-radius: 10px;
  color: var(--text-dim); text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 700;
  letter-spacing: .03em; transition: all .18s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active { background: var(--red-soft); color: var(--red); }
.nav-item.active .nav-icon { color: var(--red); }

.nav-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-label { flex: 1; }
.nav-active-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}

.sidenav-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidenav-version { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* Overlay */
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 250;
  background: rgba(0,0,0,.6); backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

/* ── BOTTOM NAV (solo móvil) ────────────────────────────── */
.bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--bottomnav-h);
  background: #0d0e0f;
  border-top: 1px solid var(--border);
  align-items: stretch;
  box-shadow: 0 -2px 20px rgba(0,0,0,.5);
}

.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--text-dim);
  font-family: 'Barlow Condensed', sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  transition: color .15s; padding: .4rem 0;
}
.bn-item:hover, .bn-item.active { color: var(--red); }
.bn-item.active svg { stroke: var(--red); }
.bn-item svg { transition: stroke .15s; }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-top: var(--topbar-h);
  margin-left: var(--nav-w);
  min-height: calc(100vh - var(--topbar-h));
  padding-bottom: 2rem;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem 1.1rem; font-size: .82rem; color: var(--text);
  box-shadow: var(--shadow); opacity: 0; transition: all .3s;
  pointer-events: none; white-space: nowrap; z-index: 500;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok   { border-color: var(--ok); color: var(--ok); }
.toast.err  { border-color: var(--fail); color: #ef5350; }
.toast.info { border-color: var(--muted); color: var(--text-dim); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Ocultar sidenav en móvil, mostrar hamburger y bottomnav */
  .sidenav {
    transform: translateX(calc(-1 * var(--nav-w)));
    box-shadow: none;
  }
  .sidenav.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,.7);
  }
  .sidenav-close { display: block; }

  .nav-toggle { display: flex; }

  .bottomnav { display: flex; }

  .main-content {
    margin-left: 0;
    padding-bottom: calc(var(--bottomnav-h) + 1rem);
  }

  .toast { bottom: calc(var(--bottomnav-h) + .75rem); }
}

/* ── UTILIDADES ──────────────────────────────────────────── */
.container { max-width: 700px; margin: 0 auto; padding: 1.2rem 1rem; }

/* Animación parpadeo para puntos "en juego" */
@keyframes pulse { to { opacity: .3; } }
