/* BetWise Custom Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f36;
  --bg-card-hover: #232847;
  --accent: #3B82F6;
  --accent-light: #60A5FA;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border: #1F2937;
  --azul: #34B4FF;
  --roxo: #913EF8;
  --rosa: #FF2D78;
  --green: #22C55E;
  --red: #EF4444;
  --yellow: #F59E0B;
  --blue: #3B82F6;
}

/* === GLOBAL RESETS === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

/* Prevent horizontal overflow on content areas */
.filters-bar, .stats-bar, .results-strip, .results-table,
.color-chart, .tab-content {
  max-width: 100%;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

/* === HEADER === */
.header {
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo svg { width: 32px; height: 32px; }
.logo span { background: linear-gradient(135deg, var(--accent), #818CF8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Desktop nav inside header */
.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex-shrink: 1;
  min-width: 0;
}
/* Mobile sidebar nav - hidden off-screen on desktop too */
.nav-links {
  position: fixed;
  top: 0; bottom: 0;
  left: -270px;
  width: 270px;
  height: 100vh;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  z-index: 101;
  overflow-y: auto;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.6);
  border-right: 1px solid var(--border);
}
body.menu-open .nav-links {
  left: 0;
}
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}
.nav-overlay.show { display: block; }
.nav-links .nav-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  flex-shrink: 0;
}
.nav-links .nav-sidebar-header .sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.1rem; color: var(--text-primary);
  text-decoration: none;
}
.nav-links .nav-sidebar-header .sidebar-logo svg { width: 28px; height: 28px; }
.nav-links .nav-sidebar-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
}
.nav-links .nav-link {
  padding: 14px 20px;
  font-size: 0.95rem;
  margin: 0 8px;
  border-radius: 8px;
}
.nav-links .nav-link:hover, .nav-links .nav-link.active { background: rgba(59,130,246,0.1); }
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card); }
.nav-link.active { color: var(--accent-light); }
.nav-link .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.nav-auth { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* === BUTTONS === */
.btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.825rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #2563EB; transform: translateY(-1px); }
.btn-vip { background: linear-gradient(135deg, #F59E0B, #D97706); color: #000; }
.btn-vip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,0.4); }

/* === HERO === */
.hero {
  padding: 60px 20px 50px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 60%);
}
.hero h1 {
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), #818CF8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* === GAME CARDS === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.game-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}
.game-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 14px 14px 0 0; }
.game-card.aviator::before { background: linear-gradient(90deg, var(--azul), var(--roxo), var(--rosa)); }
.game-card.bacbo::before { background: linear-gradient(90deg, var(--blue), var(--red), var(--yellow)); }
.game-card.futebol::before { background: linear-gradient(90deg, var(--blue), var(--green), var(--red)); }
.game-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.game-card-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 1.5rem; }
.game-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.game-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }
.game-card-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; margin-top: 10px; background: rgba(34,197,94,0.15); color: var(--green); }

/* === PAGE LAYOUT === */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title { font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.page-subtitle { color: var(--text-secondary); font-size: 0.85rem; }

/* === STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-value { font-size: 1.3rem; font-weight: 800; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }

/* === FILTER TOGGLES === */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  user-select: none;
  white-space: nowrap;
}
.filter-toggle input { display: none; }
.toggle-switch {
  width: 34px; height: 18px;
  background: var(--bg-primary);
  border-radius: 9px;
  position: relative;
  transition: all 0.2s;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  position: absolute;
  top: 2px; left: 2px;
  transition: all 0.2s;
}
.filter-toggle input:checked + .toggle-switch { background: var(--accent); border-color: var(--accent); }
.filter-toggle input:checked + .toggle-switch::after { background: white; left: 18px; }
.filter-toggle.vip-only { opacity: 0.5; position: relative; }
.filter-toggle.vip-only::after {
  content: 'VIP';
  position: absolute;
  top: -8px; right: -4px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #000;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
}

/* === RESULTS STRIP (Aviator badges) === */
.results-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.result-badge {
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 42px;
  text-align: center;
}
.result-badge:hover { transform: scale(1.08); z-index: 2; }
.badge-wrapper:hover .result-badge { transform: scale(1.08); }
.result-badge.azul { background: var(--azul); color: #000; }
.result-badge.roxo { background: var(--roxo); color: #fff; }
.result-badge.rosa { background: var(--rosa); color: #fff; }

/* === RESULTS TABLE (Bac Bo / Futebol) === */
.results-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.results-table-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.table-row { display: flex; gap: 3px; margin-bottom: 3px; }
.table-col { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.table-cell {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.table-cell.player, .table-cell.home { background: var(--blue); color: #fff; }
.table-cell.banker, .table-cell.away { background: var(--red); color: #fff; }
.table-cell.tie, .table-cell.draw { background: var(--yellow); color: #000; }

/* === COLOR CHART === */
.color-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.color-chart-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; }
.chart-bars { display: flex; flex-direction: column; gap: 8px; }
.chart-bar-row { display: flex; align-items: center; gap: 10px; }
.chart-bar-label { font-size: 0.75rem; font-weight: 600; min-width: 60px; color: var(--text-secondary); flex-shrink: 0; }
.chart-bar {
  height: 26px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.5s ease;
  min-width: 36px;
  white-space: nowrap;
}

/* === PLANS === */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}
.plan-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.plan-card.recommended { border-color: var(--accent); }
.plan-header { padding: 24px; background: linear-gradient(135deg, var(--accent), #6366F1); position: relative; }
.plan-card.gold .plan-header { background: linear-gradient(135deg, #F59E0B, #D97706); }
.plan-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.3); padding: 3px 8px; border-radius: 16px; font-size: 0.65rem; font-weight: 700; color: #fff; }
.plan-name { font-size: 1.2rem; font-weight: 800; color: #fff; }
.plan-price { font-size: 1.8rem; font-weight: 900; color: #fff; margin-top: 6px; }
.plan-price small { font-size: 0.85rem; font-weight: 400; opacity: 0.8; }
.plan-period { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 3px; }
.plan-features { padding: 20px 24px; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.plan-features li svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }
.plan-cta { padding: 0 24px 24px; }

/* === LAYOUT 2 COL === */
.layout-2col {
  display: flex;
  gap: 20px;
  min-width: 0;
  align-items: flex-start;
}
.layout-2col > aside { width: 260px; flex-shrink: 0; }
.layout-2col > main { flex: 1; min-width: 0; overflow: hidden; }

/* === TAB BAR === */
.tab-bar { display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 0; }
.tab-btn { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-bottom: none; color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; cursor: pointer; border-radius: 8px 8px 0 0; transition: all 0.2s; white-space: nowrap; flex-shrink: 0; }
.tab-btn.active { background: var(--bg-secondary); color: var(--accent-light); border-color: var(--accent); }
.tab-content { display: none; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0 8px 8px 8px; padding: 16px; margin-bottom: 20px; overflow: hidden; }
.tab-content.active { display: block; }
.action-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input-field { background: var(--bg-primary); border: 1px solid var(--border); color: var(--text-primary); padding: 7px 12px; border-radius: 6px; font-size: 0.85rem; outline: none; }
.input-field:focus { border-color: var(--accent); }

/* === SIDEBAR === */
.sidebar { min-width: 0; max-height: calc(100vh - 100px); overflow-y: auto; }
@media (min-width: 1025px) { .sidebar { position: sticky; top: 80px; } }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; overflow: hidden; }
.sidebar-title { font-weight: 700; font-size: 0.8rem; margin-bottom: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* === TIME BADGE === */
.time-badge {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 7px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* === MENU TOGGLE === */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

/* === FOOTER === */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 40px;
  background: var(--bg-secondary);
}
.footer svg { width: 28px; height: 28px; }

/* ============================================ */
/* === RESPONSIVE - TABLET (max-width 1024) === */
/* ============================================ */
@media (max-width: 1024px) {
  .layout-2col > aside { width: 220px; }
  .stat-value { font-size: 1.1rem; }
}

/* ========================================== */
/* === RESPONSIVE - MOBILE (max-width 768) === */
/* ========================================== */
@media (max-width: 768px) {
  /* Header */
  .header-inner { padding: 0 12px; height: 54px; }
  /* Hide desktop nav on mobile */
  .nav-links-desktop { display: none; }
  .menu-toggle { display: block; }
  .logo { font-size: 1.1rem; }
  .logo svg { width: 28px; height: 28px; }
  .nav-auth .btn { padding: 5px 10px; font-size: 0.75rem; }

  /* Layout - sidebar DEPOIS do main */
  .layout-2col { flex-direction: column; }
  .layout-2col > aside { width: 100%; order: 2; }
  .layout-2col > main { order: 1; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  /* Sidebar accordion no mobile */
  .sidebar-card { margin-bottom: 0; padding: 0; overflow: hidden; }
  .sidebar-card .sidebar-title {
    padding: 12px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-card .sidebar-title::after {
    content: '\25BC';
    font-size: 0.6rem;
    transition: transform 0.2s;
    color: var(--text-muted);
  }
  .sidebar-card.collapsed .sidebar-title::after { transform: rotate(-90deg); }
  .sidebar-card .sidebar-body { padding: 0 12px 12px; }
  .sidebar-card.collapsed .sidebar-body { display: none; }

  /* Page */
  .page-container { padding: 12px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-title { font-size: 1.15rem; }
  .time-badge { font-size: 0.85rem; padding: 5px 10px; }

  /* Stats */
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat-card { padding: 8px 10px; }
  .stat-label { font-size: 0.6rem; }
  .stat-value { font-size: 0.95rem; }

  /* Filtros - grid 2 colunas com area de toque maior */
  .filters-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 12px;
    gap: 4px 10px;
  }
  .filter-toggle {
    font-size: 0.75rem;
    min-height: 36px;
    padding: 4px 0;
  }
  .toggle-switch { width: 30px; height: 16px; }
  .toggle-switch::after { width: 10px; height: 10px; top: 2px; left: 2px; }
  .filter-toggle input:checked + .toggle-switch::after { left: 16px; }

  /* Tabs - scroll suave sem scrollbar */
  .tab-bar {
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 8px 14px; font-size: 0.75rem; scroll-snap-align: start; white-space: nowrap; }
  .tab-content { padding: 12px; }

  /* Action bar - botoes empilhados */
  .action-bar { flex-direction: column; align-items: stretch; }
  .action-bar .btn { width: 100%; text-align: center; }

  /* Highlight selector - empilhado */
  .highlight-selector { flex-direction: column; align-items: stretch !important; }
  .highlight-selector .input-field { width: 100%; }

  /* Results */
  .results-strip { padding: 8px; gap: 3px; max-height: 500px; overflow-y: auto; }
  .result-badge { padding: 3px 5px; font-size: 0.65rem; min-width: 36px; }
  .table-cell { width: 28px; height: 28px; font-size: 0.6rem; }

  /* Color chart - label em cima da barra */
  .chart-bar-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .chart-bar { width: 100%; }

  /* Plans */
  .plans-grid { grid-template-columns: 1fr; }

  /* Hero */
  .hero { padding: 40px 16px 30px; }

  /* Games */
  .games-grid { grid-template-columns: 1fr; padding: 0 12px; }
}

/* ================================================ */
/* === RESPONSIVE - SMALL MOBILE (max-width 480) === */
/* ================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }

  .sidebar { grid-template-columns: 1fr; }

  /* Stats - 3 colunas compactas */
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .stat-card { padding: 6px 8px; }
  .stat-label { font-size: 0.55rem; }
  .stat-value { font-size: 0.85rem; }

  .page-container { padding: 8px; }

  .tab-btn { padding: 6px 10px; font-size: 0.68rem; }

  /* Filtros - coluna unica no celular pequeno */
  .filters-bar { grid-template-columns: 1fr; gap: 2px 0; padding: 8px 10px; }
  .filter-toggle { font-size: 0.72rem; min-height: 34px; }

  .results-strip { gap: 2px; padding: 6px; max-height: 400px; }
  .result-badge { padding: 2px 3px; font-size: 0.6rem; min-width: 30px; }

  .table-cell { width: 24px; height: 24px; font-size: 0.55rem; }
  .table-col { gap: 2px; }

  .action-bar { gap: 4px; }
  .action-bar .btn { padding: 8px 8px; font-size: 0.75rem; }
  .btn { padding: 6px 12px; font-size: 0.75rem; }

  .chart-bar-label { min-width: auto; font-size: 0.65rem; }
  .chart-bar { font-size: 0.6rem; height: 22px; min-width: 28px; }
}
