:root {
  --font: 'Jost', system-ui, sans-serif;
  --primary: #6C63FF;
  --primary-dark: #554fd8;
  --secondary: #00E5FF;
  --accent: #FF3CAC;
  --bg: #0a0e14;
  --bg-elevated: #121820;
  --card: rgba(255, 255, 255, 0.06);
  --card-hover: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e6edf3;
  --text-muted: #8b949e;
  --success: #3fb950;
  --danger: #f85149;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
}

* { box-sizing: border-box; }

body.site-body {
  font-family: 'Jost', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 76px;
  overflow-x: hidden;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(108, 99, 255, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(0, 229, 255, 0.12), transparent),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(255, 60, 172, 0.08), transparent);
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}

/* Top bar */
.site-topbar {
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 6px 0;
}
.site-topbar .sep { margin: 0 10px; opacity: 0.4; }
.site-topbar a { color: var(--secondary); text-decoration: none; }
.site-topbar a:hover { color: #fff; }
.badge-18 {
  background: rgba(255, 60, 172, 0.2);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
}

/* Header */
.site-header {
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1030;
}
.site-header .navbar { padding: 0.65rem 0; }
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff !important;
}
.brand-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  font-size: 1.35rem;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.05rem; font-weight: 700; }
.brand-text small { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }

.site-header .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}

.site-header .navbar-nav .nav-item {
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .site-header .navbar-nav {
    flex-wrap: nowrap;
  }
}

.site-header .nav-link .nav-label {
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
}

.site-header .nav-link.nav-link-bids {
  padding-left: 0.65rem !important;
  padding-right: 0.65rem !important;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: #fff !important;
  background: rgba(108, 99, 255, 0.15);
}
.site-header .nav-link.active { color: var(--secondary) !important; }

.btn-nav-outline {
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.45rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-nav-outline:hover { border-color: var(--primary); color: #fff; background: rgba(108,99,255,.1); }

.btn-nav-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  padding: 0.45rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}
.btn-nav-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45); }

.btn-wallet-pill {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--secondary) !important;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  align-items: center;
  gap: 6px;
}
.btn-session {
  background: var(--card);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-session::after { margin-left: 4px; }
.session-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.session-name { font-weight: 600; font-size: 0.875rem; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 220px;
  box-shadow: var(--shadow);
}
.session-menu .dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
}
.session-menu .dropdown-item:hover { background: rgba(108,99,255,.2); color: #fff; }
.session-menu .dropdown-header { color: var(--text-muted); font-size: 0.8rem; }

.navbar-toggler {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--secondary);
  font-size: 1.15rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.25); }

/* Font Awesome icon styling */
.site-topbar i,
.footer-heading i { margin-right: 6px; color: var(--secondary); font-size: 0.85em; }
.nav-link .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(108, 99, 255, 0.12);
  margin-right: 6px;
  font-size: 0.8rem;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.site-header .nav-link i:not(.nav-icon i) { margin-right: 0; }

.btn-nav-outline i,
.btn-nav-primary i,
.btn-gradient i,
.btn-wallet-pill i { margin-right: 4px; }

.dropdown-item i {
  width: 20px;
  text-align: center;
  margin-right: 8px;
  color: var(--secondary);
  opacity: 0.9;
}
.dropdown-item.text-danger i { color: var(--danger); }

.footer-links a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-links a i {
  width: 18px;
  color: var(--primary);
  font-size: 0.85rem;
  opacity: 0.85;
}
.footer-links a:hover i { color: var(--secondary); }

.social-btn.social-telegram:hover { background: rgba(0, 136, 204, 0.25); border-color: #0088cc; color: #0088cc; }
.social-btn.social-whatsapp:hover { background: rgba(37, 211, 102, 0.2); border-color: #25d366; color: #25d366; }
.social-btn.social-email:hover { background: rgba(108, 99, 255, 0.25); color: var(--secondary); }
.social-btn.social-instagram:hover { background: rgba(225, 48, 108, 0.2); border-color: #e1306c; color: #e1306c; }

.pay-badge i { margin-right: 5px; color: var(--secondary); font-size: 0.75rem; }

.section-title i {
  color: var(--accent);
  margin-right: 4px;
}
.badge-neon i { margin-right: 6px; }

.step-num {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 1rem;
  margin-bottom: 10px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}
.step-card:hover { transform: translateY(-4px); transition: transform 0.25s; }

.hero-mini-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1rem;
}

.auth-icon i { font-size: 1.75rem; }
.form-label i {
  margin-right: 6px;
  color: var(--secondary);
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 2;
  pointer-events: none;
}
.input-icon-wrap .has-icon { padding-left: 42px !important; }

.input-group-icon {
  background: rgba(108, 99, 255, 0.15) !important;
  border: 1px solid var(--border) !important;
  color: var(--secondary) !important;
}

.mobile-bottom-nav a i {
  font-size: 1.2rem;
  margin-bottom: 3px;
  display: block;
  transition: transform 0.2s;
}
.mobile-bottom-nav a.active i { transform: scale(1.15); color: var(--secondary); }

.brand-text small i { margin-right: 2px; }

/* Cards & UI */
.glass-card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}
.glass-card:hover { border-color: rgba(108, 99, 255, 0.25); }

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: #fff !important;
  font-weight: 600;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(108, 99, 255, 0.45);
  color: #fff;
}

.btn-outline-accent {
  border: 1px solid rgba(108, 99, 255, 0.5);
  color: var(--secondary);
  background: rgba(108, 99, 255, 0.08);
}
.btn-outline-accent:hover { background: rgba(108, 99, 255, 0.2); color: #fff; border-color: var(--primary); }

.form-dark, .form-select.form-dark {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
}
.form-dark:focus, .form-select.form-dark:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}
.form-label { font-weight: 500; font-size: 0.875rem; color: #c9d1d9; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); }

/* Password show/hide */
.password-field-wrap {
  position: relative;
}
.password-field-wrap input {
  padding-right: 48px !important;
}
.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: calc(100% - 8px);
  max-height: 40px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.password-toggle-btn:hover {
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.06);
}
.password-toggle-btn.active { color: var(--secondary); }

.input-group-merge .form-dark {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group-merge .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Auth pages */
.auth-page {
  padding: 2.5rem 0 4rem;
  min-height: calc(100vh - var(--header-h) - 120px);
  display: flex;
  align-items: center;
}
.auth-card { padding: 2rem 2rem 2.25rem; }
.auth-card-head h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.35rem; }
.auth-card-head p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.auth-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108,99,255,.3), rgba(255,60,172,.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--secondary);
}
.auth-footer a { color: var(--secondary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { color: #fff; }

/* Hero & sections */
.hero-section {
  padding: 3.5rem 0 2.5rem;
  position: relative;
}
.hero-section h1 { font-weight: 800; letter-spacing: -0.02em; }
.hero-section .lead { color: var(--text-muted); }
.section-title {
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.badge-neon {
  background: rgba(0, 229, 255, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.live-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 8px var(--success);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.ticker-wrap { overflow: hidden; }
.ticker-track { display: inline-flex; animation: ticker 25s linear infinite; }
.ticker-item { padding-right: 3rem; color: var(--text-muted); font-size: 0.9rem; }
.ticker-item strong { color: var(--secondary); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.market-card {
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  height: 100%;
}
.market-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(108, 99, 255, 0.15);
}

.market-open { color: var(--success); }
.market-closed { color: var(--danger); }

.stat-card h3 { font-weight: 700; font-size: 1.75rem; }
.stat-icon {
  width: 56px; height: 56px; margin: 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(255, 60, 172, 0.15));
  border: 1px solid rgba(108, 99, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--secondary);
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover .stat-icon {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}
h1, h2, h3, h4, h5, h6, .navbar-brand, .btn { font-family: var(--font); }
.hero-stats-card { border: 1px solid rgba(108, 99, 255, 0.2); }
.hero-mini-stat small { color: var(--text-muted); font-size: 0.75rem; }

.result-reveal .digit {
  display: inline-block;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: revealPop 0.6s ease;
}
@keyframes revealPop { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.text-muted-custom { color: var(--text-muted); }
.text-secondary-custom { color: var(--secondary); }

.main-content { min-height: 50vh; }
.page-section { padding-top: 1rem; padding-bottom: 3rem; }
.dash-stat-card small i { color: var(--secondary); margin-right: 4px; }
.dash-stat-card h4 { font-weight: 700; color: #fff; }
.referral-code-box {
  background: rgba(108, 99, 255, 0.12) !important;
  border: 1px dashed rgba(108, 99, 255, 0.4);
  color: var(--secondary);
  font-size: 1rem;
}

/* Legal & content pages */
.legal-content h5 { margin-top: 1.5rem; color: var(--secondary); font-weight: 600; }
.legal-content p, .legal-content li { color: #c9d1d9; line-height: 1.7; }
.legal-content a { color: var(--secondary); }
.bet-type-item, .about-feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 1rem; border-radius: 12px;
  background: rgba(0,0,0,.2); border: 1px solid var(--border);
}
.bet-type-item i, .about-feature i {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(108,99,255,.2); border-radius: 10px;
  color: var(--secondary);
}
.rate-chart-list .rate-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  text-transform: capitalize;
}
.rate-chart-list .rate-row strong { color: var(--secondary); }
.potential-win-box {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}
.notification-item.unread { border-left: 3px solid var(--secondary); }
.notif-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(108,99,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--secondary);
}
.dash-notif-item {
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.dash-notif-item:last-child { border: none; }
.alert-box { border: 1px solid rgba(255, 193, 7, 0.3) !important; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}
.footer-main { padding: 3.5rem 0 2.5rem; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.footer-brand .brand-icon {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
}
.footer-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; max-width: 320px; }
.footer-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: #c9d1d9;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }
.footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-trust i { color: var(--success); margin-right: 4px; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.15rem;
  transition: all 0.2s;
}
.social-btn:hover {
  background: rgba(108, 99, 255, 0.25);
  color: var(--secondary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.pay-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 6px;
}
.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-disclaimer { font-size: 0.75rem; opacity: 0.85; }

/* Mobile nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 1040;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
}
.mobile-bottom-nav a {
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 10px;
  transition: color 0.2s;
  flex: 1;
}
.mobile-bottom-nav a i { display: block; font-size: 1.25rem; margin-bottom: 2px; }
.mobile-bottom-nav a.active {
  color: var(--secondary);
  background: rgba(0, 229, 255, 0.08);
}

.accordion-button {
  background: rgba(0,0,0,.25) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  background: rgba(108,99,255,.15) !important;
  color: var(--secondary) !important;
}
.accordion-button::after { filter: invert(1); }

.z-toast { z-index: 1100; }

@media (min-width: 992px) {
  body.site-body { padding-bottom: 0; }
  .site-header .navbar-collapse { justify-content: space-between; }
}

@media (max-width: 991px) {
  .navbar-actions { width: 100%; justify-content: stretch; }
  .auth-guest { width: 100%; }
  .auth-guest .btn { flex: 1; text-align: center; }
}
