@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=satoshi@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

/* ============================================================
   JAG PLAY — Shared Design System
   Single source of truth for all site pages
   ============================================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --bg: #0f1117;
  --bg2: #161b24;
  --surface: #1a1f2e;
  --surface2: #222836;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.15);

  /* Primary action color — JAG Play brand cyan. Use this everywhere: active nav, primary buttons, links, progress fills. */
  --accent: #22d3ee;
  --accent-dim: rgba(34,211,238,0.10);
  --accent-glow: rgba(34,211,238,0.25);
  --accent-light: #67e8f9;

  --gold: #f1c40f;
  --gold-dim: rgba(241,196,15,0.12);
  --gold-glow: rgba(241,196,15,0.25);

  --green: #10b981;
  --green-dim: rgba(16,185,129,0.12);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.12);
  --purple: #8b5cf6;

  --text: #f4f6f9;
  --muted: #9aa3b0;
  --muted2: #5a6370;

  --font-display: 'Clash Display', system-ui, sans-serif;
  --font-body: 'Satoshi', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);

  /* Legacy aliases for compatibility */
  --panel: rgba(26,31,46,0.95);
  --border-hover: rgba(255,255,255,0.15);
  --blue: #3b82f6;           /* Keep as a distinct color for tier tags / info states — not the primary action */
  --blue-dim: rgba(59,130,246,0.12);
  --purple-dim: rgba(139,92,246,0.12);
}

/* ---- GLOBAL RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Sticky footer: short pages keep copyright / links at bottom of viewport */
  display: flex;
  flex-direction: column;
}

/* ---- GRID BACKGROUND ---- */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(59,130,246,0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ---- SITE NAV ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10,12,18,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* Home / marketing: logo | centered links | auth locked to true top-right */
.site-nav.site-nav-marketing {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 12px 20px;
}
.site-nav.site-nav-marketing .nav-links {
  justify-content: center;
  flex-wrap: wrap;
}
.site-nav.site-nav-marketing .nav-right {
  justify-self: end;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-links a.cta {
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  color: var(--accent);
}
.nav-links a.cta:hover { background: var(--accent-dim); border-color: var(--accent); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Log in — text link, not a nav “tab” (use beside primary CTA in .nav-right) */
.nav-login {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-login:hover {
  color: var(--text);
  background: transparent;
}
/* Looks like a real “Log in” control, not a ghost nav item */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-login-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: rgba(255,255,255,0.08);
}

/* ---- PAGE WRAPPERS ---- */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}
.page-wrap-wide {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.18s;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); border-color: var(--border2); }
.btn-gold-outline { background: transparent; border: 1px solid var(--gold-glow); color: var(--gold); }
.btn-gold-outline:hover { background: var(--gold-dim); border-color: var(--gold); }
.btn-accent-outline { background: transparent; border: 1px solid var(--accent-glow); color: var(--accent); }
.btn-accent-outline:hover { background: var(--accent-dim); border-color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ---- CARDS ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.card-accent:hover { border-color: var(--accent-glow); box-shadow: 0 16px 40px var(--accent-dim); }

/* ---- SECTION HEADERS ---- */
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}
.section-sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 560px;
}

/* ---- STAT/PILL BADGES ---- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-gold { background: var(--gold-dim); border: 1px solid var(--gold-glow); color: var(--gold); }
.badge-green { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.3); color: var(--green); }
.badge-blue { background: var(--accent-dim); border: 1px solid rgba(59,130,246,0.3); color: var(--accent); }
.badge-red { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }
.badge-purple { background: var(--purple-dim); border: 1px solid rgba(139,92,246,0.3); color: var(--purple); }

/* ---- PROGRESS BAR ---- */
.progress-bar { height: 6px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--gold); transition: width 0.5s ease; }
.progress-fill-green { background: var(--green); }
.progress-fill-blue { background: var(--accent); }

/* ---- XP BAR ---- */
.xp-bar-wrap {
  position: relative;
  height: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffd500);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.xp-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* ---- ACCOUNT MENU DROPDOWN ---- */
.account-menu { position: relative; z-index: 101; }
.account-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-display);
}
.account-menu-btn [data-account-name] {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.account-menu-btn:hover { border-color: var(--accent-glow); background: var(--accent-dim); }
.account-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.account-menu-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
}
.account-menu-pop[hidden] { display: none; }
.account-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.account-menu-name { font-size: 13px; font-weight: 700; color: var(--text); }
.account-menu-sub { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.account-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.account-menu-item:hover { background: rgba(255,255,255,0.05); }
.account-menu-item.danger { color: var(--red); }

/* ---- FOOTER ---- */
.site-footer {
  position: relative; z-index: 1;
  margin-top: auto;
  flex-shrink: 0;
  padding: 28px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(10,12,18,0.6);
}
.site-footer-copy {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: 0.02em;
}
.site-footer-links a:hover { color: var(--text); }
.site-footer-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
  display: inline-block;
}

/* ---- INPUTS ---- */
.jag-input {
  width: 100%; padding: 11px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  font-family: var(--font-body);
  outline: none; transition: border-color .15s;
}
.jag-input:focus { border-color: var(--accent); }
.jag-input::placeholder { color: var(--muted2); }
.input-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 12px; padding: 12px 24px;
  font-size: 13px; z-index: 9999; transition: transform 0.3s ease;
  pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(16,185,129,0.4); color: var(--green); }
.toast.error { border-color: rgba(239,68,68,0.4); color: var(--red); }

/* ---- PROFILE SIDEBAR LAYOUT ---- */
.profile-layout { display:grid; grid-template-columns: 240px 1fr; gap:24px; align-items:start; }
.profile-sidebar { position:sticky; top:90px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:8px; }
.sidebar-item { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:var(--radius); color:var(--muted); font-size:14px; font-weight:500; text-decoration:none; transition:all 0.15s; }
.sidebar-item:hover { color:var(--text); background:var(--surface2); }
.sidebar-item.active { color:var(--accent); background:var(--accent-dim); font-weight:600; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .site-nav { padding: 12px 16px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .page-wrap, .page-wrap-wide { padding: 90px 16px 48px; }
  .profile-layout { grid-template-columns:1fr; }
  .profile-sidebar { position:static; }
}
@media (max-width: 480px) {
  .nav-links .hide-mobile { display: none; }
  /* Show the mobile More button */
  .nav-more-btn { display: flex !important; }
}

/* ---- MOBILE MORE MENU ---- */
.nav-more-btn {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nav-more-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.nav-more-menu {
  position: fixed;
  top: 60px;
  right: 12px;
  min-width: 180px;
  background: rgba(10,12,18,0.98);
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  padding: 6px;
  z-index: 200;
  backdrop-filter: blur(12px);
}
.nav-more-menu[hidden] { display: none; }
.nav-more-menu a {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s;
}
.nav-more-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-more-menu a.active { color: var(--accent); }

/* ---- LIGHT THEME (toggle via html[data-theme="light"] + localStorage jag-theme) ---- */
html[data-theme="light"] {
  --bg: #eef1f8;
  --bg2: #e2e8f4;
  --surface: #ffffff;
  --surface2: #f1f4fb;
  --border: rgba(15, 23, 42, 0.1);
  --border2: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --muted: #475569;
  --muted2: #64748b;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --panel: rgba(255, 255, 255, 0.96);
}
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}
html[data-theme="light"] body::after {
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(59, 130, 246, 0.08), transparent 55%);
}
html[data-theme="light"] .site-nav {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border);
}
html[data-theme="light"] .site-footer {
  border-top-color: var(--border);
  background: rgba(255, 255, 255, 0.88);
}
html[data-theme="light"] .player-bar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border);
}
