/* ===== ROOT & RESET ===== */
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #0f0f2a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(138,92,246,0.4);
  --purple: #8a5cf6;
  --purple-light: #a78bfa;
  --purple-dark: #6d28d9;
  --gold: #f0a500;
  --gold-light: #fbbf24;
  --green: #10b981;
  --red: #ef4444;
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --gradient-purple: linear-gradient(135deg, #8a5cf6, #6d28d9);
  --gradient-gold: linear-gradient(135deg, #f0a500, #fbbf24);
  --gradient-bg: linear-gradient(135deg, #0a0a1a 0%, #0f0f2a 50%, #1a0a2e 100%);
  --shadow-purple: 0 0 30px rgba(138,92,246,0.3);
  --shadow-gold: 0 0 30px rgba(240,165,0,0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { line-height: 1.7; color: var(--text-secondary); }

.gradient-text {
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-text { color: var(--gold); }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(138,92,246,0.15);
  border: 1px solid rgba(138,92,246,0.3);
  border-radius: 100px;
  font-size: 0.85rem; font-weight: 500;
  color: var(--purple-light);
}
.badge-gold {
  background: rgba(240,165,0,0.1);
  border-color: rgba(240,165,0,0.3);
  color: var(--gold);
}
.badge svg { width: 14px; height: 14px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-purple);
  color: #fff;
  box-shadow: 0 4px 20px rgba(138,92,246,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(138,92,246,0.5); }

.btn-gold {
  background: var(--gradient-gold);
  color: #000;
  box-shadow: 0 4px 20px rgba(240,165,0,0.3);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(240,165,0,0.5); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--purple); background: rgba(138,92,246,0.1); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(240,165,0,0.4);
}
.btn-outline-gold:hover { background: rgba(240,165,0,0.1); }

.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-glow); background: var(--bg-card-hover); }
.card-glow { box-shadow: var(--shadow-purple); }

/* ===== STAT CARD ===== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; }
.stat-card .stat-change { font-size: 0.8rem; margin-top: 6px; color: var(--green); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(10,10,26,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar .nav-inner { display: flex; align-items: center; justify-content: space-between; }
.navbar .logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; }
.navbar .logo img { height: 40px; }
.navbar .nav-links { display: flex; align-items: center; gap: 32px; }
.navbar .nav-links a { font-size: 0.9rem; color: var(--text-secondary); transition: var(--transition); }
.navbar .nav-links a:hover, .navbar .nav-links a.active { color: var(--text-primary); }
.navbar .nav-actions { display: flex; align-items: center; gap: 12px; }
.navbar .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.navbar .hamburger span { width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* ===== SIDEBAR (Dashboard) ===== */
.layout-dashboard { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed; top: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 50;
  transition: var(--transition);
}
.sidebar .sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  font-size: 1.1rem; font-weight: 700;
}
.sidebar .sidebar-logo img { height: 36px; }
.sidebar-nav { flex: 1; padding: 0 12px; }
.sidebar-nav .nav-section-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 12px 8px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 0.9rem; color: var(--text-secondary);
  transition: var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-nav a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sidebar-nav a.active { background: rgba(138,92,246,0.15); color: var(--purple-light); border: 1px solid rgba(138,92,246,0.2); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gradient-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600;
}
.sidebar-user .user-info .user-name { font-size: 0.9rem; font-weight: 600; }
.sidebar-user .user-info .user-id { font-size: 0.75rem; color: var(--text-muted); }

.main-content { margin-left: 260px; flex: 1; padding: 24px; min-height: 100vh; }
.page-header { margin-bottom: 28px; }
.page-header h2 { font-size: 1.6rem; }
.page-header p { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ===== TOP BAR (Dashboard) ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  margin-bottom: 24px;
}
.topbar .topbar-title { font-size: 1.1rem; font-weight: 600; }
.topbar .topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .wallet-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(138,92,246,0.1);
  border: 1px solid rgba(138,92,246,0.2);
  border-radius: 100px;
  font-size: 0.8rem; color: var(--purple-light);
}
.topbar .wallet-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 8px; color: var(--text-secondary); }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(138,92,246,0.15); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.input-icon { position: relative; }
.input-icon .form-control { padding-left: 44px; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(138,92,246,0.08); }
thead th { padding: 14px 16px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
tbody tr { border-top: 1px solid var(--border); transition: var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 14px 16px; font-size: 0.9rem; color: var(--text-secondary); }
tbody td strong { color: var(--text-primary); }

/* ===== PILLS/STATUS ===== */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600;
}
.pill-green { background: rgba(16,185,129,0.15); color: var(--green); }
.pill-gold { background: rgba(240,165,0,0.15); color: var(--gold); }
.pill-purple { background: rgba(138,92,246,0.15); color: var(--purple-light); }
.pill-red { background: rgba(239,68,68,0.15); color: var(--red); }

/* ===== PLAN CARDS ===== */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.plan-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-purple);
}
.plan-card.featured::before { background: var(--gradient-gold); }
.plan-card.featured { border-color: rgba(240,165,0,0.3); }
.plan-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-purple); }
.plan-card.featured:hover { box-shadow: var(--shadow-gold); }
.plan-card .plan-name { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 8px; }
.plan-card .plan-rate { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.plan-card .plan-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.plan-card .plan-divider { height: 1px; background: var(--border); margin: 20px 0; }
.plan-card .plan-feature { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 0.875rem; }
.plan-card .plan-feature span:first-child { color: var(--text-muted); }
.plan-card .plan-feature span:last-child { font-weight: 600; }

/* ===== PROGRESS BAR ===== */
.progress-wrap { background: rgba(255,255,255,0.06); border-radius: 100px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 100px; background: var(--gradient-purple); transition: width 0.6s ease; }
.progress-bar-gold { background: var(--gradient-gold); }

/* ===== HERO ===== */
.hero {
  padding: 140px 0 80px;
  background: var(--gradient-bg);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(138,92,246,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -200px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(240,165,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-content .badge { margin-bottom: 24px; }
.hero-content h1 { margin-bottom: 20px; }
.hero-content p { font-size: 1.1rem; margin-bottom: 36px; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero-stat .value { font-size: 1.8rem; font-weight: 800; }
.hero-stat .label { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ===== MARQUEE ===== */
.marquee-section { padding: 16px 0; background: rgba(138,92,246,0.08); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; animation: marquee 25s linear infinite; white-space: nowrap; }
.marquee-track span { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.marquee-track .dot { color: var(--purple); font-size: 1.2rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== FEATURES GRID ===== */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-glow); transform: translateY(-3px); }
.feature-card .icon {
  width: 52px; height: 52px;
  background: rgba(138,92,246,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--purple-light);
}
.feature-card .icon svg { width: 26px; height: 26px; }
.feature-card h3 { margin-bottom: 10px; }

/* ===== REFERRAL LEVELS ===== */
.level-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.level-row:last-child { border-bottom: none; }
.level-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { font-size: 0.9rem; max-width: 280px; margin-top: 12px; }
.footer-col h4 { margin-bottom: 16px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 10px; transition: var(--transition); }
.footer-col a:hover { color: var(--purple-light); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: gap; }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== ALERT / NOTICE ===== */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 0.875rem; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 20px;
}
.alert-warning { background: rgba(240,165,0,0.1); border: 1px solid rgba(240,165,0,0.25); color: var(--gold); }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: var(--green); }
.alert-info { background: rgba(138,92,246,0.1); border: 1px solid rgba(138,92,246,0.25); color: var(--purple-light); }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ===== COPY BOX ===== */
.copy-box {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.copy-box input {
  flex: 1; padding: 12px 16px;
  background: transparent; border: none;
  color: var(--text-secondary); font-size: 0.875rem;
  outline: none;
}
.copy-box button {
  padding: 12px 16px;
  background: rgba(138,92,246,0.2);
  border: none; border-left: 1px solid var(--border);
  color: var(--purple-light); cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem; font-weight: 600;
}
.copy-box button:hover { background: rgba(138,92,246,0.4); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 460px;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.2rem; transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }
.modal h3 { margin-bottom: 20px; }

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,26,0.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0;
}
.mobile-nav .mobile-nav-inner { display: flex; justify-content: space-around; }
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 12px;
  font-size: 0.7rem; color: var(--text-muted);
  border-radius: var(--radius); transition: var(--transition);
}
.mobile-nav a svg { width: 22px; height: 22px; }
.mobile-nav a.active, .mobile-nav a:hover { color: var(--purple-light); }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ===== SECTION HEADER ===== */
.section-header { margin-bottom: 48px; }
.section-header .badge { margin-bottom: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .navbar .nav-links { display: none; }
  .navbar .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .hero { padding: 100px 0 60px; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  h1 { font-size: 2rem; }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
