/* ── shared.css ───────────────────────────────────────────────────────────────
   Design tokens + nav + card components used across all pages.
   Extends the base style.css (same dark theme, same accent cyan).
   ─────────────────────────────────────────────────────────────────────────── */

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

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

:root {
  --bg:           #12121a;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover:rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(0,198,198,0.35);
  --text:         #f0f0f5;
  --text-muted:   #808095;
  --accent:       #00c6c6;
  --accent-dim:   rgba(0,198,198,0.15);
  --red:          #ff4d6d;
  --green:        #00e87b;
  --yellow:       #ffd060;
  --nav-h:        64px;
}

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

/* ── Background canvas (topographic, same as index) ─────────────────────── */
#bgCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  background: rgba(18,18,26,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text);
}
.nav-brand .brand-icon { font-size: 1.4rem; }
.nav-brand .accent     { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-link {
  padding: 0.42rem 0.9rem;
  border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-link.active { color: var(--accent); }

.nav-right { display: flex; align-items: center; gap: 0.75rem; }

/* Nav Actions Cluster */
.btn-deposit {
  padding: 0.48rem 1.2rem;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; border: none;
  background: var(--accent); color: #0a0a0a;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-deposit:hover { opacity: 0.9; transform: translateY(-1px); }

.interest-badge {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: default;
}
.interest-badge svg { opacity: 0.5; }

.nav-gift-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: not-allowed;
  opacity: 0.4;
  border: 1px solid rgba(255,255,255,0.05);
}

.nav-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7f85ff);
  color: #0a0a0a;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
  overflow: hidden;
}
.nav-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.nav-avatar:hover { border-color: rgba(255,255,255,0.8); transform: scale(1.05); }
.nav-avatar svg { width: 18px; height: 18px; }

/* ── PAGE SHELL ──────────────────────────────────────────────────────────── */
.page {
  position: relative; z-index: 1;
  padding-top: calc(var(--nav-h) + 2rem);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────── */
.page-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900; letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
}
.page-sub {
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── TABS ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.3rem;
  width: fit-content;
  margin-bottom: 1.75rem;
}
.tab {
  padding: 0.45rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 500;
  cursor: pointer; border: none;
  background: transparent; color: var(--text-muted);
  transition: all 0.2s;
}
.tab.active {
  background: var(--accent);
  color: #0a0a0a;
}

/* ── GLASS CARD ──────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* ── MATCH CARD ──────────────────────────────────────────────────────────── */
.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.25s, background 0.25s;
  cursor: default;
}
.match-card:hover {
  border-color: rgba(255,255,255,0.14);
  background: var(--bg-card-hover);
}
.match-card.live { border-color: rgba(255,77,109,0.3); }

.team-block {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.team-flag { font-size: 2.5rem; line-height: 1; }
.team-name { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

.score-block { text-align: center; }
.score-nums {
  font-size: 2.5rem; font-weight: 900; letter-spacing: -0.04em;
  color: var(--text);
}
.score-sep { color: var(--text-muted); margin: 0 0.15rem; }
.score-status {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 600; margin-top: 0.2rem;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1);   }
  50%      { opacity: 0.4; transform: scale(0.6); }
}

.match-meta {
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem;
  gap: 0.15rem;
}

/* ── BADGE ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.7rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.badge-live   { background: rgba(255,77,109,0.12); color: var(--red);    border: 1px solid rgba(255,77,109,0.25); }
.badge-open   { background: rgba(0,198,198,0.10);  color: var(--accent); border: 1px solid rgba(0,198,198,0.25); }
.badge-closed { background: rgba(255,255,255,0.05);color: var(--text-muted); border: 1px solid var(--border); }
.badge-win    { background: rgba(0,232,123,0.10);  color: var(--green);  border: 1px solid rgba(0,232,123,0.25); }

/* ── ODDS BUTTONS ────────────────────────────────────────────────────────── */
.odds-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem;
  margin-top: 1rem;
}
.odds-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.65rem 0.5rem; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--text);
  cursor: pointer; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.odds-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.odds-btn.selected {
  border-color: var(--accent);
  background: rgba(0,198,198,0.18);
}
.odds-label { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.odds-value { font-size: 1.25rem; font-weight: 800; color: var(--accent); margin-top: 0.1rem; }

/* ── AMOUNT INPUT ────────────────────────────────────────────────────────── */
.amount-row {
  display: flex; gap: 0.5rem; align-items: center;
  margin-top: 0.9rem;
}
.amount-input {
  flex: 1; padding: 0.65rem 1rem; border-radius: 10px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  outline: none; transition: border-color 0.2s;
}
.amount-input:focus  { border-color: var(--accent); }
.amount-unit { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }

/* ── PRIMARY BUTTON ──────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%; padding: 0.75rem; border-radius: 10px;
  border: none; cursor: pointer;
  background: var(--accent); color: #0a0a0a;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  margin-top: 0.9rem;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-outline {
  padding: 0.55rem 1.2rem; border-radius: 8px;
  border: 1.5px solid var(--border); cursor: pointer;
  background: transparent; color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── GRID LAYOUTS ────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── SCORE LIST ──────────────────────────────────────────────────────────── */
.match-list { display: flex; flex-direction: column; gap: 0.75rem; }

/* ── STAT BAR ────────────────────────────────────────────────────────────── */
.stat-bar-wrap { margin-top: 0.5rem; }
.stat-bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem;
}
.stat-bar-track {
  height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.stat-bar-fill {
  height: 100%; border-radius: 999px;
  background: var(--accent);
  transition: width 0.6s ease;
}

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: rgba(30,30,40,0.95); border: 1px solid var(--border);
  color: var(--text); font-size: 0.88rem; font-weight: 500;
  padding: 0.75rem 1.5rem; border-radius: 12px;
  backdrop-filter: blur(12px); z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s;
  opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── ANALYSIS PANEL ──────────────────────────────────────────────────────── */
.analysis-panel {
  margin-top: 1rem;
  background: rgba(0,198,198,0.04);
  border: 1px solid rgba(0,198,198,0.2);
  border-radius: 14px; padding: 1.2rem 1.4rem;
  display: none;
  animation: fadeIn 0.4s ease;
}
.analysis-panel.visible { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.analysis-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.9rem;
}
.analysis-prediction {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 0.9rem;
}
.pred-winner {
  font-size: 1.4rem; font-weight: 900;
  letter-spacing: -0.03em;
}
.pred-score { font-size: 1.1rem; color: var(--text-muted); }
.confidence-pill {
  padding: 0.25rem 0.7rem; border-radius: 999px;
  background: rgba(0,232,123,0.12); color: var(--green);
  font-size: 0.72rem; font-weight: 700;
}
.analysis-summary { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.9rem; }
.factor-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.factor-item {
  display: flex; gap: 0.5rem; align-items: flex-start;
  font-size: 0.82rem; color: var(--text-muted);
}
.factor-item::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* ── MODAL ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #1a1a24; border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; width: min(480px, 92vw);
  animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes slideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.modal-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.35rem; }
.modal-sub   { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.modal-close {
  float: right; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.25rem; line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ── PAYMENT STEP UI ─────────────────────────────────────────────────────── */
.payment-step {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem; border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.03);
  margin-bottom: 0.75rem;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent);
  font-size: 0.8rem; font-weight: 800; flex-shrink: 0;
}
.step-text { font-size: 0.85rem; }
.step-sub  { font-size: 0.75rem; color: var(--text-muted); }

/* ── COUNTDOWN TIMER ─────────────────────────────────────────────────────── */
.countdown { font-size: 0.82rem; color: var(--accent); font-weight: 600; }

/* ── GAME CARD ───────────────────────────────────────────────────────────── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color 0.25s, transform 0.2s;
}
.game-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.game-icon { font-size: 2.5rem; }
.game-title { font-size: 1.1rem; font-weight: 800; }
.game-desc  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.55; }
.game-prize {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: var(--yellow);
  font-weight: 600;
}

/* ── SPINNER ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(0,198,198,0.2);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }

/* ── LEAGUE FILTER BAR ───────────────────────────────────────────────────── */
.league-filter {
  display: flex;
  justify-content: center;   /* keeps the whole bar centred, never cut off */
  width: 100%;
  margin: 0 0 2rem;
}
.league-filter-track {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.4rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.league-filter-track::-webkit-scrollbar { display: none; }

.league-tab {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.league-tab:hover { color: var(--text); background: var(--bg-card-hover); }
.league-tab.active { color: var(--text); background: var(--accent-dim); }

.league-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.league-tab.active .league-icon { color: var(--accent); }
.league-icon svg { width: 20px; height: 20px; }
.league-icon img {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

/* Stack icon above label on narrow screens, row layout on wider screens */
@media (max-width: 640px) {
  .league-filter-track { gap: 0.15rem; padding: 0.4rem; }
  .league-tab {
    flex-direction: column;
    gap: 0.3rem;
    width: 64px;
    padding: 0.55rem 0.3rem;
    font-size: 0.68rem;
  }
  .league-label {
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }
}
/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
:root {
  --sidebar-w: 260px;
}

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(12, 12, 18, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-header {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-close, .mobile-menu-open {
  background: none; border: none; color: var(--text); cursor: pointer;
  display: none;
}

.sidebar-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* tight gap between BOX 1 and BOX 2 */
}

/* Portfolio Widget */
.sidebar-widget {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.sw-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.4rem; display: flex; justify-content: space-between; }
.sw-sub { font-size: 0.7rem; font-weight: 400; opacity: 0.7; }
.sw-val { font-size: 1.6rem; font-weight: 900; color: var(--text); margin-bottom: 0.2rem; }
.sw-change { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

/* Sidebar Card (Box 2) */
.sidebar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-divider {
  border-bottom: 1px solid var(--border);
  margin: 0.25rem 0.6rem;
}

/* Live Matches Pill (Restructured as a flat nav item) */
.sidebar-pill {
  display: flex; align-items: center; gap: 0.6rem;
  background: transparent;
  color: var(--text);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 0.88rem;
  text-decoration: none;
  border: none;
  transition: background 0.2s, color 0.2s;
}
.sidebar-pill:hover, .sidebar-pill.active {
  background: rgba(255,255,255,0.05);
}
.sidebar-pill.active {
  color: var(--accent);
}
.sidebar-pill svg {
  color: var(--text-muted);
  transition: color 0.2s;
}
.sidebar-pill:hover svg, .sidebar-pill.active svg {
  color: var(--accent);
}

/* Sections */
.sidebar-section {
  display: flex; flex-direction: column; gap: 0.6rem;
  margin-top: 0.25rem;
}
.ss-header {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem; font-weight: 800; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: color 0.2s;
  user-select: none;
  padding: 0.25rem 0.6rem;
}
.ss-header:hover { color: var(--text); }
.ss-chevron { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted); }
.ss-header.collapsed .ss-chevron { transform: rotate(-90deg); }

.ss-links {
  display: flex; flex-direction: column; gap: 0.3rem;
  overflow: hidden; max-height: 500px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
}
.ss-links.collapsed {
  max-height: 0; opacity: 0; margin-top: -0.5rem; pointer-events: none;
}

.ss-link {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--text); text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.ss-link:hover, .ss-link.active { background: rgba(255,255,255,0.05); }
.ss-link.active { color: var(--accent); }
.ss-icon {
  width: 20px; height: 20px; object-fit: contain;
}

/* Disabled Section & Tooltip */
.ss-tooltip-wrap {
  position: relative;
  cursor: not-allowed;
}
.ss-tooltip-wrap.ss-disabled {
  opacity: 1; pointer-events: auto; /* Re-enable pointer to catch hover */
}
.ss-tooltip-wrap.ss-disabled > .ss-header {
  opacity: 0.4; pointer-events: none;
}

.ss-tooltip {
  position: absolute; bottom: 100%; left: 0.5rem;
  background: #1e1e24; color: #fff; padding: 0.35rem 0.75rem; border-radius: 6px;
  font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 100;
}
.ss-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 14px;
  border-width: 5px; border-style: solid;
  border-color: #1e1e24 transparent transparent transparent;
}
.ss-tooltip-wrap:hover .ss-tooltip {
  opacity: 1; transform: translateY(-6px);
}

/* Desktop layout adjustments */
@media (min-width: 993px) {
  .nav { left: var(--sidebar-w); justify-content: flex-end; padding: 0 2rem; }
  .page { margin-left: var(--sidebar-w); padding: calc(var(--nav-h) + 2rem) 2rem 2rem 2rem; }
  .mobile-only { display: none !important; }
}

/* Mobile layout adjustments */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-close, .mobile-menu-open { display: block; }
  .nav-left { display: flex; align-items: center; gap: 1rem; }
}

/* ── BANNERS (homepage promo cards) ─────────────────────────────────────── */
.banners-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-bottom: 2rem;
}
.banner-card {
  padding: 1.5rem; border-radius: 16px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  min-height: 160px;
}
.banner-card.b-purple { background: #1c1c22; border: 1px solid rgba(255,255,255,0.05); }
.banner-card.b-blue   { background: linear-gradient(135deg, #1b3a6b, #0d1e3a); }
.banner-card.b-green  { background: linear-gradient(135deg, #2a6b4b, #123522); }
.banner-bg-img {
  position: absolute; right: 0; top: 0; bottom: 0; height: 100%; width: 50%;
  object-fit: cover; object-position: right center; z-index: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 0 16px 16px 0;
}
.banner-card:hover .banner-bg-img { transform: scale(1.05) translateX(-2%); }
.banner-tag {
  background: rgba(0,0,0,0.3); padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; color: #fff; margin-bottom: 1rem;
}
.banner-card h3 { font-size: 1.3rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; z-index: 2; }
.btn-banner {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; padding: 0.4rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; z-index: 2;
}
@media (max-width: 700px) { .banners-row { grid-template-columns: 1fr; } }

/* ── LEAGUES HEADER ─────────────────────────────────────────────────────── */
.leagues-header-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}
.lh-left { display: flex; align-items: center; gap: 0.5rem; }
.lh-left h3 { font-size: 1.1rem; font-weight: 700; }
.lh-select {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; padding: 0.4rem 0.8rem; border-radius: 6px; font-family: 'Inter'; outline: none;
}

/* ── LEAGUE BLOCK ───────────────────────────────────────────────────────── */
.league-block {
  background: rgba(30, 30, 36, 0.6); border-radius: 12px; margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.league-title {
  display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.5rem;
  font-weight: 700; font-size: 0.95rem; border-bottom: 1px solid var(--border);
}
.league-title .icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }
.league-title .icon svg, .league-title .icon img { width: 100%; height: 100%; object-fit: contain; }
.expand-icon { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }
.match-date-group {
  padding: 0.8rem 1.5rem; font-size: 0.8rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.match-row {
  display: grid; grid-template-columns: 1fr 300px 40px; align-items: center;
  padding: 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.02); gap: 1rem;
}
.match-full-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}
.match-row:hover { background: rgba(255,255,255,0.02); }
.match-time { font-size: 0.8rem; color: var(--text-muted); }
.team-line { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 0.9rem; margin: 0.4rem 0; }
.team-line .flag {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); flex-shrink: 0;
}
.team-line .flag img { width: 100%; height: 100%; object-fit: cover; }
.match-odds { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; }
.odds-col {
  background: rgba(42,42,50,0.6); padding: 0.5rem; border-radius: 6px;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.odds-col:hover { background: rgba(51,51,61,0.8); }
.odds-lbl { font-size: 0.75rem; color: var(--text-muted); }
.odds-val { font-size: 0.85rem; font-weight: 700; color: var(--accent); }
.match-plus { font-size: 0.85rem; color: var(--text-muted); text-align: right; cursor: pointer; }

/* ── LIVE PILL & MINUTE ──────────────────────────────────────────────────── */
.live-badge {
  background: var(--red);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  display: inline-block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.live-minute {
  font-weight: 500;
  color: var(--red);
  font-size: 12px;
  margin-left: 7px;
  font-family: 'Inter', sans-serif;
  display: inline-block;
  line-height: 1;
}

/* ── DASH MODALS (deposit, gift) ────────────────────────────────────────── */
.dash-modal {
  background: #1c1c22; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 1.5rem; width: 420px; position: relative;
}
.dash-modal-title { font-size: 1.2rem; font-weight: 700; }
.dash-modal-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

.modal-tabs { display: flex; background: #111; border-radius: 8px; padding: 0.2rem; }
.m-tab {
  background: transparent; border: none; color: var(--text-muted);
  padding: 0.3rem 0.8rem; border-radius: 6px; font-weight: 600; font-size: 0.8rem; cursor: pointer;
}
.m-tab.active { background: #333; color: #fff; }
.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

.deposit-option {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: rgba(35,35,43,0.6); border-radius: 10px; margin-bottom: 0.6rem; cursor: pointer;
  border: 1px solid transparent; transition: 0.2s;
}
.deposit-option:hover { border-color: rgba(255,255,255,0.15); background: rgba(42,42,50,0.7); }
.d-opt-icon { font-size: 1.4rem; }
.d-opt-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.2rem; }
.d-opt-sub { font-size: 0.75rem; color: var(--text-muted); }
.d-opt-right { margin-left: auto; font-size: 0.85rem; color: #7f85ff; font-weight: 600; }

.powered-by { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 1rem; }
.powered-by .accent { color: #fff; font-weight: 600; }

.gift-modal { text-align: center; padding: 2.5rem; }
.gift-title { font-size: 1.6rem; font-weight: 900; background: linear-gradient(90deg, #b37dff, #ff7de2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1rem; }
.gift-sub { font-size: 0.95rem; margin-bottom: 2rem; color: #e0e0e0; }
.btn-explore-10k {
  width: 100%; background: var(--accent); color: #0a0a0a; border: none;
  padding: 0.8rem; border-radius: 10px; font-weight: 800; font-size: 1rem; cursor: pointer;
}
.btn-explore-10k:hover { opacity: 0.9; }

/* AI Analysis Styles */
.analysis-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}
.analysis-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.analysis-badge {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.analysis-vol {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}
.analysis-teams-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.analysis-team {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.analysis-team .flag {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.analysis-team .flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3-way Probability Bar */
.prob-bar-container {
  margin: 1.5rem 0;
}
.prob-bar {
  display: flex;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  margin-bottom: 1rem;
}
.prob-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.5s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.prob-seg-home {
  background: var(--home-color, var(--accent));
}
.prob-seg-draw {
  background: #4A4A5A;
}
.prob-seg-away {
  background: var(--away-color, var(--accent-dim));
}

/* Legend styling */
.legend-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 1.5rem 0;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Graph container */
.graph-card {
  background: rgba(20,20,25,0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}
.graph-canvas {
  width: 100%;
  height: 250px;
  display: block;
}

/* AI written analysis section */
.ai-insights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .ai-insights-grid {
    grid-template-columns: 1fr;
  }
}
.insight-block {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.insight-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.insight-block p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.prediction-summary-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 198, 198, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
  border: 1px solid var(--accent-dim);
}
.prediction-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.5rem 0;
  font-family: 'Outfit', sans-serif;
}
.prediction-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.risk-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.risk-low { background: rgba(0, 200, 100, 0.2); color: rgb(0, 200, 100); }
.risk-medium { background: rgba(255, 170, 0, 0.2); color: rgb(255, 170, 0); }
.risk-high { background: rgba(255, 50, 50, 0.2); color: rgb(255, 50, 50); }

.key-players-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.player-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
.player-team {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.player-impact {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── CCTP Bridge Flow ─────────────────────────────────────────────────────── */
.cctp-preset {
  flex: 1; padding: 0.45rem; border-radius: 8px;
  border: 1.5px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: Inter, sans-serif;
}
.cctp-preset:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.bridge-step {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.7rem 0.9rem; border-radius: 10px;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  opacity: 0.5; transition: all 0.3s;
}
.bridge-step.active { opacity: 1; border-color: var(--accent); background: rgba(0,198,198,0.05); }
.bridge-step.done { opacity: 0.7; border-color: #2ecc71; }
.bridge-step-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 3px;
  background: var(--border); flex-shrink: 0; transition: all 0.3s;
}
.bridge-step.active .bridge-step-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.bridge-step.done .bridge-step-dot { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }

/* ── x402 Payment Gate (Analysis Page) ─────────────────────────────────── */
.x402-gate {
  background: rgba(20,20,26,0.85); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; text-align: center;
  margin-top: 1.5rem; position: relative; overflow: hidden;
}
.x402-gate::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,198,198,0.03), transparent 60%);
  pointer-events: none;
}
.x402-lock-icon {
  font-size: 2.5rem; margin-bottom: 0.8rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.x402-title {
  font-size: 1.1rem; font-weight: 800; margin-bottom: 0.4rem;
  background: linear-gradient(90deg, var(--accent), #00e6e6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.x402-sub {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.2rem;
  line-height: 1.5;
}
.x402-price-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem; margin-bottom: 1rem;
}
.x402-price {
  font-size: 1.6rem; font-weight: 900; color: var(--text);
}
.x402-currency {
  font-size: 0.8rem; color: var(--accent); font-weight: 700;
  background: var(--accent-dim); padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.btn-x402 {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #0a0a0a; border: none;
  padding: 0.75rem 2rem; border-radius: 12px;
  font-weight: 800; font-size: 0.95rem; cursor: pointer;
  transition: all 0.2s; font-family: Inter, sans-serif;
}
.btn-x402:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,198,198,0.3); }
.x402-features {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-top: 1.2rem; flex-wrap: wrap;
}
.x402-feat {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.3rem;
}
.x402-feat .feat-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* x402 Analysis Results (after unlock) */
.x402-result {
  margin-top: 1.5rem;
}
.analysis-card {
  background: rgba(20,20,26,0.7); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.3rem; margin-bottom: 0.8rem;
}
.analysis-card-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.6rem;
}
.analysis-card p, .analysis-card li {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.6;
}
.analysis-card li { margin-bottom: 0.3rem; }
.predicted-score {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; font-size: 2.2rem; font-weight: 900; color: var(--text);
  padding: 1rem; margin: 0.5rem 0;
}
.predicted-score .vs { font-size: 1rem; color: var(--text-muted); font-weight: 300; }
.confidence-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06);
  overflow: hidden; margin-top: 0.5rem;
}
.confidence-fill {
  height: 100%; border-radius: 3px; background: var(--accent);
  transition: width 1s ease;
}

/* Profile Dropdown */
.nav-avatar-wrapper { position: relative; }
.avatar-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 240px;
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 1000;
}
.nav-avatar-wrapper:hover .avatar-dropdown {
  display: flex;
}
.dropdown-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.dropdown-info {
  display: flex;
  flex-direction: column;
}
.dropdown-primary-address {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.dropdown-secondary-address {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 2px;
}
.dropdown-links {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}
.dropdown-links a {
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s;
}
.dropdown-links a:hover {
  background: rgba(255,255,255,0.05);
}
