/* ═══════════════════════════════════════════════════════════════════════
   GlobalTradeFX — Premium Trading Platform Stylesheet
   Futuristic dark-first design with neon green accents
   ═══════════════════════════════════════════════════════════════════════ */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES — DARK MODE (DEFAULT)
   ========================================================================== */
:root {
  --primary: #00FF66;
  --primary-dark: #00CC44;
  --primary-glow: rgba(0,255,102,0.25);
  --bg: #000000;
  --bg2: #0a0a0a;
  --bg3: #141414;
  --card: #0d0d0d;
  --card2: #141414;
  --border: #1a1a1a;
  --text: #ffffff;
  --muted: #999999;
  --danger: #ff3d57;
  --warning: #ffd600;
  --success: #00FF66;
  --info: #0091ff;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(0,255,102,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 100px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   2. CSS CUSTOM PROPERTIES — LIGHT MODE
   ========================================================================== */
body.light-mode {
  --primary: #00CC44;
  --primary-dark: #009933;
  --primary-glow: rgba(0,204,68,0.15);
  --bg: #f8f9fa;
  --bg2: #f0f1f3;
  --bg3: #e8eaed;
  --card: #ffffff;
  --card2: #f8f9fa;
  --border: #dde0e4;
  --text: #111111;
  --muted: #666666;
  --danger: #e53e3e;
  --warning: #b8860b;
  --success: #00CC44;
  --info: #0077cc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 30px rgba(0,204,68,0.1);
}

/* ==========================================================================
   3. RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--primary);
  color: #000000;
}

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

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   4. NAVBAR STYLES
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  padding: 16px 0;
  transition: background var(--transition-base),
              backdrop-filter var(--transition-base),
              border-color var(--transition-base),
              padding var(--transition-base);
}

.navbar.scrolled {
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
  padding: 12px 0;
}

.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.5px;
  z-index: 1001;
}
.logo span {
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #000000;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-btns {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Navbar Light Mode */
body.light-mode .navbar.scrolled {
  background: rgba(248,249,250,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

body.light-mode .navbar:not(.scrolled) {
  background: transparent;
}

/* ==========================================================================
   5. HERO SECTION STYLES
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 60% 50%, rgba(0,255,102,0.08) 0%, transparent 70%),
    radial-gradient(ellipse at 10% 80%, rgba(0,204,68,0.05) 0%, transparent 60%);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  z-index: 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-image {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero h1 .highlight {
  color: var(--primary);
  text-shadow: 0 0 40px var(--primary-glow);
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
}

.hero-stat {
  border-left: 2px solid var(--primary);
  padding-left: 16px;
}

.hero-stat .value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* Hero Light Mode */
body.light-mode .hero-bg {
  background:
    radial-gradient(ellipse at 60% 50%, rgba(0,204,68,0.06) 0%, transparent 70%),
    radial-gradient(ellipse at 10% 80%, rgba(0,204,68,0.03) 0%, transparent 60%);
}
body.light-mode .hero-grid {
  opacity: 0.08;
}

/* ==========================================================================
   6. SECTION & TITLE STYLES
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: var(--primary-glow);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0,255,102,0.2);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.text-center {
  text-align: center;
}
.text-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  margin-bottom: 32px;
}
.text-center .section-divider {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   7. CARD STYLES
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,255,102,0.15);
  box-shadow: var(--shadow-glow);
}

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  color: var(--primary);
  border: 1px solid rgba(0,255,102,0.1);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card.glow {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
}

.card.glow:hover {
  box-shadow: 0 0 50px var(--primary-glow);
}

/* Card Light Mode */
body.light-mode .card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
body.light-mode .card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0,204,68,0.3);
}
body.light-mode .card-icon {
  border-color: rgba(0,204,68,0.15);
}

/* ==========================================================================
   8. COMMISSION TABLE STYLES
   ========================================================================== */
.comm-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.comm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.comm-table th,
.comm-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comm-table th {
  background: var(--bg3);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.comm-table td.line {
  background: var(--bg3);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
}

.comm-table td.active {
  background: rgba(0,255,102,0.12);
  color: var(--primary);
  font-weight: 700;
}

.comm-table td.inactive {
  background: var(--bg2);
  color: var(--border);
}

.comm-table tr:last-child td {
  border-bottom: none;
}

.comm-table tr:hover td {
  background: rgba(0,255,102,0.04);
}

/* Commission Table Light Mode */
body.light-mode .comm-table th {
  background: var(--bg3);
  color: var(--primary);
}
body.light-mode .comm-table td.line {
  background: var(--bg3);
  color: var(--text);
}
body.light-mode .comm-table td.active {
  background: rgba(0,204,68,0.1);
  color: var(--primary);
}
body.light-mode .comm-table td.inactive {
  background: var(--bg2);
  color: var(--border);
}
body.light-mode .comm-table tr:hover td {
  background: rgba(0,0,0,0.03);
}

/* ==========================================================================
   9. RANK SYSTEM STYLES
   ========================================================================== */
.rank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.rank-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.rank-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  transition: background var(--transition-base);
}

.rank-card:hover {
  transform: translateY(-3px);
}

.rank-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
}

.rank-card.featured::before {
  background: var(--primary);
}

.rank-badge {
  display: inline-block;
  background: var(--primary);
  color: #000000;
  font-weight: 900;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.rank-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.rank-turnover {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.2;
}
.rank-turnover span {
  font-size: 0.9rem;
  color: var(--muted);
}

.rank-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rank-level-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--muted);
}
.rank-level-pill strong {
  color: var(--primary);
}

/* Rank Light Mode */
body.light-mode .rank-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
body.light-mode .rank-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(0,204,68,0.12);
}
body.light-mode .rank-level-pill {
  background: var(--bg3);
  border-color: var(--border);
}

/* ==========================================================================
   10. PLAN CARD STYLES
   ========================================================================== */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: transform var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
  position: relative;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.plan-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
  transform: translateY(-4px);
}

.plan-card .popular-tag {
  background: var(--primary);
  color: #000000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-card .plan-rate {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.plan-card .plan-rate sup {
  font-size: 1.2rem;
}

.plan-card .plan-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.plan-card .plan-features {
  list-style: none;
  text-align: left;
  margin: 20px 0;
}

.plan-card .plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.plan-card .plan-features li:last-child {
  border: none;
}
.plan-card .plan-features li::before {
  content: '\2713 ';
  color: var(--primary);
  font-weight: 700;
  margin-right: 4px;
}

/* Plan Light Mode */
body.light-mode .plan-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
body.light-mode .plan-card:hover,
body.light-mode .plan-card.popular {
  box-shadow: 0 0 30px rgba(0,204,68,0.1);
}

/* ==========================================================================
   11. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #000000;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-glow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Button Light Mode */
body.light-mode .btn-ghost:hover {
  background: rgba(0,0,0,0.05);
}

/* ==========================================================================
   12. DASHBOARD LAYOUT (SIDEBAR + MAIN)
   ========================================================================== */
.dash-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}

.sidebar {
  width: 260px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
  position: fixed;
  top: 72px;
  bottom: 0;
  overflow-y: auto;
  transition: transform var(--transition-base);
  z-index: 999;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover {
  color: var(--primary);
  background: var(--primary-glow);
  border-left-color: var(--primary);
}
.sidebar-menu a.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar-menu a .icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-section {
  padding: 24px 24px 8px;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dash-main {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  background: var(--bg);
  min-height: calc(100vh - 72px);
}

.dash-header {
  margin-bottom: 32px;
}
.dash-header h1 {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.dash-header p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Sidebar Light Mode */
body.light-mode .sidebar {
  background: var(--bg2);
  border-right-color: var(--border);
}
body.light-mode .sidebar-menu a:hover,
body.light-mode .sidebar-menu a.active {
  background: var(--primary-glow);
}
body.light-mode .dash-main {
  background: var(--bg);
}

/* ==========================================================================
   13. STAT CARDS
   ========================================================================== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border-radius: var(--radius-sm);
}

.stat-card .stat-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================================
   14. TABLES
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background: var(--bg3);
  padding: 14px 18px;
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover td {
  background: rgba(0,255,102,0.03);
}

/* Table Light Mode */
body.light-mode table th {
  background: var(--bg3);
  color: var(--muted);
}
body.light-mode table td {
  color: var(--text);
}
body.light-mode table tr:hover td {
  background: rgba(0,0,0,0.03);
}

/* ==========================================================================
   15. FORMS
   ========================================================================== */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(153,153,153,0.5);
}

.form-group .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ===== Password Toggle ===== */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input {
  padding-right: 52px !important;
  flex: 1;
  width: 100%;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 2;
  width: 40px;
  height: 40px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pw-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-fast);
  pointer-events: none;
}
.pw-toggle:active svg,
.pw-toggle:hover svg {
  stroke: var(--primary);
}
.pw-toggle.pw-visible svg {
  stroke: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
  font-weight: 500;
}
.alert-success {
  background: rgba(0,255,102,0.1);
  border: 1px solid rgba(0,255,102,0.3);
  color: var(--primary);
}
.alert-danger {
  background: rgba(255,61,87,0.1);
  border: 1px solid rgba(255,61,87,0.3);
  color: var(--danger);
}
.alert-info {
  background: rgba(0,145,255,0.1);
  border: 1px solid rgba(0,145,255,0.3);
  color: var(--info);
}
.alert-warning {
  background: rgba(255,214,0,0.1);
  border: 1px solid rgba(255,214,0,0.3);
  color: var(--warning);
}

/* Form Light Mode */
body.light-mode .form-group input,
body.light-mode .form-group select,
body.light-mode .form-group textarea {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}
body.light-mode .form-group input:focus,
body.light-mode .form-group select:focus,
body.light-mode .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
body.light-mode .form-group input::placeholder,
body.light-mode .form-group textarea::placeholder {
  color: rgba(102,102,102,0.5);
}
body.light-mode .form-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   16. AUTH PAGES
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: #050e05;
  background-image: url('https://images.unsplash.com/photo-1486325212027-8081e485255e?w=1600&q=80&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 0, 0.55);
  z-index: 0;
}
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, transparent 30%, rgba(0,255,102,0.18) 50%, transparent 70%),
    linear-gradient(45deg,  transparent 20%, rgba(0,255,102,0.12) 45%, transparent 65%),
    linear-gradient(160deg, transparent 40%, rgba(0,200,80,0.10) 55%, transparent 75%);
  animation: laserShift 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes laserShift {
  0%   { opacity: 0.7; transform: scaleX(1) rotate(-1deg); }
  50%  { opacity: 1;   transform: scaleX(1.04) rotate(0.5deg); }
  100% { opacity: 0.8; transform: scaleX(1) rotate(1deg); }
}
.auth-page > * {
  position: relative;
  z-index: 2;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(5, 28, 10, 0.82);
  border: 1px solid rgba(0,255,102,0.2);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,255,102,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo {
  justify-content: center;
  font-size: 2rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Auth Light Mode — keep same background image, slightly different overlay */
body.light-mode .auth-page {
  background: #050e05;
  background-image: url('https://images.unsplash.com/photo-1486325212027-8081e485255e?w=1600&q=80&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
}
body.light-mode .auth-page::before {
  background: rgba(0, 15, 0, 0.50);
}
body.light-mode .auth-card {
  background: rgba(5, 28, 10, 0.80);
  border-color: rgba(0,255,102,0.22);
  box-shadow: 0 8px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,102,0.07);
}
body.light-mode .auth-card label,
body.light-mode .auth-card p,
body.light-mode .auth-card input {
  color: #e0ffe8;
}
body.light-mode .auth-card input {
  background: rgba(0,255,102,0.06);
  border-color: rgba(0,255,102,0.2);
  color: #ffffff;
}

/* ==========================================================================
   17. FOOTER STYLES
   ========================================================================== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--muted);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}
.footer-socials a:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

/* Footer Light Mode */
body.light-mode footer {
  background: var(--bg2);
  border-top-color: var(--border);
}
body.light-mode .footer-socials a {
  background: var(--bg3);
}
body.light-mode .footer-socials a:hover {
  background: var(--primary-glow);
}

/* ==========================================================================
   18. TICKER STYLES
   ========================================================================== */
.ticker {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 40px;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}
.ticker-item .up {
  color: var(--primary);
}
.ticker-item .down {
  color: var(--danger);
}
.ticker-item .symbol {
  color: var(--text);
  font-weight: 600;
}
.ticker-item .price {
  color: var(--muted);
}

/* Ticker Light Mode */
body.light-mode .ticker {
  background: var(--bg2);
  border-bottom-color: var(--border);
}

/* ==========================================================================
   19. THEME TOGGLE SWITCH COMPONENT
   ========================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}

.theme-toggle-btn .tg-track {
  width: 48px;
  height: 26px;
  background: #222222;
  border: 2px solid #333333;
  border-radius: var(--radius-full);
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition-base), border-color var(--transition-base);
  overflow: hidden;
}

.theme-toggle-btn .tg-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #888888;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background var(--transition-base);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  z-index: 2;
}

.theme-toggle-btn .tg-sun,
.theme-toggle-btn .tg-moon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  z-index: 1;
  transition: opacity var(--transition-base);
}

.theme-toggle-btn .tg-moon {
  left: 6px;
  opacity: 0.6;
}
.theme-toggle-btn .tg-sun {
  right: 6px;
  opacity: 0.3;
}

.theme-toggle-btn .tg-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

/* Active = Light mode */
.theme-toggle-btn.active .tg-track {
  background: rgba(0,255,102,0.2);
  border-color: var(--primary);
}
.theme-toggle-btn.active .tg-knob {
  transform: translateX(22px);
  background: var(--primary);
}
.theme-toggle-btn.active .tg-moon {
  opacity: 0.2;
}
.theme-toggle-btn.active .tg-sun {
  opacity: 0.8;
}
.theme-toggle-btn.active .tg-label {
  color: var(--primary);
}

/* Light mode overrides for toggle */
body.light-mode .theme-toggle-btn .tg-track {
  border-color: #bbbbbb;
  background: #dddddd;
}
body.light-mode .theme-toggle-btn .tg-knob {
  background: #888888;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
body.light-mode .theme-toggle-btn .tg-label {
  color: var(--muted);
}
body.light-mode .theme-toggle-btn.active .tg-track {
  background: rgba(0,204,68,0.2);
  border-color: var(--primary);
}
body.light-mode .theme-toggle-btn.active .tg-knob {
  background: var(--primary);
}

/* ==========================================================================
   20. BADGE STYLES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: rgba(0,255,102,0.12);
  color: var(--primary);
}

.badge-yellow {
  background: rgba(255,214,0,0.12);
  color: var(--warning);
}

.badge-red {
  background: rgba(255,61,87,0.12);
  color: var(--danger);
}

.badge-blue {
  background: rgba(0,145,255,0.12);
  color: var(--info);
}

.badge-gray {
  background: rgba(153,153,153,0.12);
  color: var(--muted);
}

/* Badge dot indicator */
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Badge Light Mode */
body.light-mode .badge-green {
  background: rgba(0,204,68,0.1);
  color: var(--primary);
}
body.light-mode .badge-red {
  background: rgba(229,62,62,0.1);
  color: var(--danger);
}
body.light-mode .badge-yellow {
  background: rgba(184,134,11,0.1);
  color: var(--warning);
}

/* ==========================================================================
   21. RANK DISPLAY & PROGRESS
   ========================================================================== */
.rank-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-progress {
  background: var(--bg3);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.rank-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  position: relative;
}

.rank-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  border-radius: var(--radius-full);
}

/* ==========================================================================
   22. TREE PAGE STYLES
   ========================================================================== */
.tree-root-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg3);
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.tree-list {
  list-style: none;
  padding-left: 28px;
  margin: 0;
}
.tree-list:first-child {
  padding-left: 0;
}

.tree-item {
  position: relative;
  margin: 8px 0;
}
.tree-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 26px;
  width: 20px;
  height: 1px;
  background: var(--border);
}
.tree-item::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--border);
}
.tree-item:last-child::after {
  height: 26px;
}

.tree-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #000000;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 900;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 6px;
}
.tree-toggle.open {
  transform: rotate(90deg);
}

.tree-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--muted);
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 6px;
}

.tree-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  max-width: 500px;
  vertical-align: middle;
}
.tree-card:hover {
  border-color: var(--primary);
  background: var(--bg3);
  box-shadow: 0 0 12px var(--primary-glow);
}

.tree-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #000000;
  flex-shrink: 0;
  line-height: 36px;
  text-align: center;
}

.tree-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.tree-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.tree-children {
  padding-left: 32px;
  margin-top: 8px;
}

.tree-item.highlight > .tree-card {
  border-color: #ffd600;
  background: rgba(255,214,0,0.08);
}

/* Tree Page Light Mode */
body.light-mode .tree-root-label {
  background: var(--bg3) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow) !important;
}
body.light-mode .tree-card {
  background: #ffffff !important;
  border-color: var(--border) !important;
}
body.light-mode .tree-card:hover {
  background: var(--bg3) !important;
  border-color: var(--primary) !important;
}
body.light-mode .tree-name {
  color: var(--text) !important;
}
body.light-mode .tree-meta {
  color: var(--muted) !important;
}
body.light-mode .tree-item::before,
body.light-mode .tree-item::after {
  background: var(--border) !important;
}
body.light-mode .tree-item.highlight > .tree-card {
  border-color: #f5a623 !important;
  background: rgba(245,166,35,0.06) !important;
}

/* ==========================================================================
   23. INLINE STYLE LIGHT MODE OVERRIDES (CRITICAL)
   Targets elements with inline style="" using CSS variables
   ========================================================================== */

/* All div/section backgrounds using var(--bg2) in inline styles */
body.light-mode [style*="background:var(--bg2)"],
body.light-mode [style*="background: var(--bg2)"],
body.light-mode [style*="background-color:var(--bg2)"],
body.light-mode [style*="background-color: var(--bg2)"] {
  background: #f0f1f3 !important;
}

/* All div/section backgrounds using var(--bg3) in inline styles */
body.light-mode [style*="background:var(--bg3)"],
body.light-mode [style*="background: var(--bg3)"],
body.light-mode [style*="background-color:var(--bg3)"],
body.light-mode [style*="background-color: var(--bg3)"] {
  background: #e8eaed !important;
  color: #111111 !important;
}

/* All div/section backgrounds using var(--bg) in inline styles */
body.light-mode [style*="background:var(--bg)"],
body.light-mode [style*="background: var(--bg)"],
body.light-mode [style*="background-color:var(--bg)"],
body.light-mode [style*="background-color: var(--bg)"] {
  background: #f8f9fa !important;
  color: #111111 !important;
}

/* All div/section backgrounds using var(--card) in inline styles */
body.light-mode [style*="background:var(--card)"],
body.light-mode [style*="background: var(--card)"],
body.light-mode [style*="background-color:var(--card)"],
body.light-mode [style*="background-color: var(--card)"] {
  background: #ffffff !important;
  color: #111111 !important;
}

/* All inputs using var() backgrounds in inline styles */
body.light-mode input[style*="background:var(--"],
body.light-mode textarea[style*="background:var(--"],
body.light-mode select[style*="background:var(--"] {
  background: #ffffff !important;
  color: #111111 !important;
  border-color: #dde0e4 !important;
}

/* Buttons with var(--bg3) inline backgrounds */
body.light-mode button[style*="background:var(--bg3)"],
body.light-mode button[style*="background: var(--bg3)"] {
  background: #e8eaed !important;
  color: #111111 !important;
  border-color: #dde0e4 !important;
}

/* Buttons with var(--bg2) inline backgrounds */
body.light-mode button[style*="background:var(--bg2)"],
body.light-mode button[style*="background: var(--bg2)"] {
  background: #f0f1f3 !important;
  color: #111111 !important;
  border-color: #dde0e4 !important;
}

/* Step number circles */
body.light-mode div[style*="background:var(--primary);color:#000"],
body.light-mode div[style*="background: var(--primary);color:#000"] {
  color: #000000 !important;
}

/* Info/notice boxes */
body.light-mode div[style*="background:rgba(0,255,102"],
body.light-mode div[style*="background:rgba(0, 255, 102"],
body.light-mode div[style*="background:rgba(0,200,100"],
body.light-mode div[style*="background:rgba(0, 200, 100"],
body.light-mode div[style*="background:rgba(0,204,68"],
body.light-mode div[style*="background:rgba(0, 204, 68"] {
  background: rgba(0,204,68,0.06) !important;
}

/* Border color inline overrides */
body.light-mode [style*="border-color:var(--border)"],
body.light-mode [style*="border-color: var(--border)"] {
  border-color: #dde0e4 !important;
}

body.light-mode [style*="border:1px solid var(--border)"],
body.light-mode [style*="border: 1px solid var(--border)"] {
  border-color: #dde0e4 !important;
}

/* ==========================================================================
   24. HARDCODED DARK COLOR LIGHT MODE OVERRIDES
   Targets elements with inline hardcoded dark color values
   ========================================================================== */

/* #0a0a0a backgrounds */
body.light-mode div[style*="background:#0a0a0a"],
body.light-mode section[style*="background:#0a0a0a"],
body.light-mode th[style*="background:#0a0a0a"],
body.light-mode td[style*="background:#0a0a0a"] {
  background: #f0f1f3 !important;
  color: #111111 !important;
}

/* #0d0d0d backgrounds */
body.light-mode div[style*="background:#0d0d0d"],
body.light-mode section[style*="background:#0d0d0d"],
body.light-mode th[style*="background:#0d0d0d"],
body.light-mode td[style*="background:#0d0d0d"] {
  background: #ffffff !important;
  color: #111111 !important;
}

/* #111 backgrounds */
body.light-mode div[style*="background:#111"],
body.light-mode div[style*="background:#111111"],
body.light-mode section[style*="background:#111"],
body.light-mode section[style*="background:#111111"],
body.light-mode th[style*="background:#111"],
body.light-mode th[style*="background:#111111"] {
  background: #f0f1f3 !important;
  color: #111111 !important;
}

/* #141414 backgrounds */
body.light-mode div[style*="background:#141414"],
body.light-mode section[style*="background:#141414"],
body.light-mode th[style*="background:#141414"] {
  background: #e8eaed !important;
  color: #111111 !important;
}

/* #181818 backgrounds */
body.light-mode div[style*="background:#181818"],
body.light-mode section[style*="background:#181818"] {
  background: #e8eaed !important;
  color: #111111 !important;
}

/* #1e1e1e and #1a1a1a borders/backgrounds */
body.light-mode div[style*="background:#1e1e1e"],
body.light-mode div[style*="background:#1a1a1a"] {
  background: #e8eaed !important;
  color: #111111 !important;
}

/* Dark gradient backgrounds */
body.light-mode div[style*="background:rgba(0,0,0"],
body.light-mode div[style*="background:rgba(0, 0, 0"],
body.light-mode section[style*="background:rgba(0,0,0"],
body.light-mode section[style*="background:rgba(0, 0, 0"] {
  background: #f0f1f3 !important;
  color: #111111 !important;
}

/* Specific dark themed backgrounds */
body.light-mode div[style*="background:#0d1f15"],
body.light-mode div[style*="background:#0a1628"],
body.light-mode div[style*="background:#0a1a0f"],
body.light-mode div[style*="background:#0f1923"] {
  background: #e8eaed !important;
  color: #111111 !important;
}

/* Linear gradients with dark colors */
body.light-mode div[style*="background:linear-gradient(135deg,var(--bg2)"],
body.light-mode div[style*="background:linear-gradient(135deg, var(--bg2)"],
body.light-mode div[style*="background:linear-gradient(135deg,#0a1628"],
body.light-mode div[style*="background:linear-gradient(135deg, #0a1628"],
body.light-mode .card[style*="background:linear-gradient(135deg,var(--bg2)"],
body.light-mode .card[style*="background:linear-gradient(135deg, var(--bg2)"] {
  background: linear-gradient(135deg, #f0f1f3, #e8eaed) !important;
  color: #111111 !important;
}

body.light-mode div[style*="background:linear-gradient(135deg,#0a0a0a"],
body.light-mode div[style*="background:linear-gradient(135deg, #0a0a0a"],
body.light-mode div[style*="background:linear-gradient(135deg,#0d0d0d"],
body.light-mode div[style*="background:linear-gradient(135deg, #0d0d0d"],
body.light-mode div[style*="background:linear-gradient(135deg,#111"],
body.light-mode div[style*="background:linear-gradient(135deg, #111"] {
  background: linear-gradient(135deg, #f8f9fa, #f0f1f3) !important;
  color: #111111 !important;
}

/* ==========================================================================
   25. SCROLLBAR STYLES
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg2);
}

/* Custom scrollable areas */
.scrollable {
  overflow-y: auto;
  max-height: 400px;
}

.scrollable::-webkit-scrollbar {
  width: 4px;
}

.scrollable::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ==========================================================================
   26. ANIMATIONS
   ========================================================================== */

/* Fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up-delay-1 {
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}
.fade-in-up-delay-2 {
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}
.fade-in-up-delay-3 {
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}
.fade-in-up-delay-4 {
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

/* Pulse glow */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Ticker scroll */
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Shimmer / loading effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg3) 25%,
    var(--border) 50%,
    var(--bg3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(0,255,102,0.1);
  }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* Float */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Rotate */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   27. MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Sidebar Toggle Button (Dashboard) */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1002;
}
.sidebar-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}
@media (max-width: 768px) {
  .sidebar-toggle {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }
  .sidebar-toggle span {
    width: 24px;
    height: 2.5px;
  }
}
.sidebar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.sidebar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.active {
  display: block;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  backdrop-filter: blur(4px);
}
.nav-mobile-overlay.active {
  display: block;
}

/* Mobile nav panel */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 1000;
  padding: 80px 24px 24px;
  transition: right var(--transition-base);
  overflow-y: auto;
}
.nav-mobile.active {
  right: 0;
}
.nav-mobile a {
  display: block;
  padding: 14px 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-fast);
}
.nav-mobile a:hover {
  color: var(--primary);
}

/* Responsive breakpoints */
/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 6px 0;
  padding-bottom: env(safe-area-inset-bottom, 6px);
  justify-content: space-around;
  align-items: center;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
  min-width: 56px;
}
.mobile-nav-item:hover {
  color: var(--primary);
}
.mobile-nav-item.active {
  color: var(--primary);
}
.mobile-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.mobile-nav-label {
  font-size: 0.6rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 700;
}
body.light-mode .mobile-bottom-nav {
  background: var(--bg2);
  border-top-color: var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
body.light-mode .mobile-nav-item {
  color: var(--muted);
}
body.light-mode .mobile-nav-item.active,
body.light-mode .mobile-nav-item:hover {
  color: var(--primary);
}

@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar-toggle {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0;
  }
  .dash-main {
    padding-bottom: 20px;
  }
  .dash-logout-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .nav-mobile {
    display: block;
  }
  .sidebar-toggle {
    display: flex;
  }

  .hero {
    padding-top: 100px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-stats {
    gap: 24px;
  }
  .hero-stat .value {
    font-size: 1.4rem;
  }

  .section {
    padding: 60px 0;
  }
  .section-title {
    font-size: 1.8rem;
  }

  .card-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dash-layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    top: 0;
    z-index: 1001;
    padding-top: 72px;
  }
  .dash-main {
    margin-left: 0;
    padding: 20px;
  }

  .stat-cards {
    grid-template-columns: 1fr 1fr;
  }

  .rank-cards {
    grid-template-columns: 1fr;
  }

  .plan-cards {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .hero-badge {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 0.9rem;
  }

  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .hero-btns .btn {
    width: 100%;
    justify-content: center;
  }

  .plan-card {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-medium { font-weight: 500; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.relative { position: relative; }
.absolute { position: absolute; }

.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   26. AD EARNINGS SYSTEM
   ========================================================================== */

/* Grid Layout */
.ad-earnings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .ad-earnings-grid {
    grid-template-columns: 1fr;
  }
}

/* Watch Ad Button */
.ad-watch-btn {
  width: 100%;
  padding: 18px !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  position: relative;
  overflow: hidden;
}
.ad-watch-btn:active {
  transform: scale(0.97);
}
.ad-watch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Locked State */
.ad-locked-state {
  text-align: center;
  padding: 40px 20px;
}
.ad-locked-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}
.ad-locked-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

/* Countdown Overlay */
.ad-countdown-overlay {
  margin-top: 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
}
.ad-countdown-inner {
  max-width: 260px;
  margin: 0 auto;
}
.ad-countdown-anim {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}
.ad-countdown-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}
.ad-countdown-bg {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 6;
}
.ad-countdown-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
.ad-countdown-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
}
.ad-countdown-label {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.ad-countdown-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}
.ad-countdown-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: 4px;
  width: 0%;
  transition: width 1s linear;
}

/* Earning Popup */
.ad-earning-popup {
  margin-top: 20px;
  background: var(--primary-glow);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  animation: adEarningPulse 0.6s ease;
}
.ad-earning-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}
.ad-earning-label {
  font-size: .85rem;
  color: var(--muted);
}
@keyframes adEarningPulse {
  0% { opacity: 0; transform: scale(0.8); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* Task Items */
.ad-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: border-color var(--transition-fast);
}
.ad-task-item:last-child {
  margin-bottom: 0;
}
.ad-task-item:hover {
  border-color: rgba(0,255,102,0.2);
}
.ad-task-item.ad-task-done {
  opacity: 0.65;
}
.ad-task-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}
.ad-task-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.ad-task-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: 2px;
}
.ad-task-desc {
  font-size: .78rem;
  color: var(--muted);
}
.ad-task-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ad-task-bonus {
  font-weight: 800;
  color: var(--primary);
  font-size: .88rem;
}
.ad-task-progress-wrap {
  width: 100%;
  max-width: 140px;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.ad-task-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.ad-task-progress-text {
  font-size: .7rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Package Cards */
.adpkg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .adpkg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .adpkg-grid { grid-template-columns: 1fr; }
}
.adpkg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}
.adpkg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,255,102,0.2);
  box-shadow: var(--shadow-glow);
}
.adpkg-card.adpkg-popular {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
}
.adpkg-card.adpkg-active-pkg {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.adpkg-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.adpkg-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.adpkg-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.adpkg-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}
.adpkg-price small {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
}
.adpkg-features {
  list-style: none;
  text-align: left;
  margin: 16px 0;
}
.adpkg-features li {
  padding: 6px 0;
  font-size: .82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.adpkg-features li:last-child { border: none; }
.adpkg-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
}

/* Light Mode Ad Earnings */
body.light-mode .ad-countdown-overlay {
  background: var(--bg2);
  border-color: var(--border);
}
body.light-mode .ad-task-item {
  background: var(--bg2);
  border-color: var(--border);
}
body.light-mode .adpkg-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
body.light-mode .adpkg-card:hover {
  box-shadow: var(--shadow-md);
}
body.light-mode .adpkg-card.adpkg-popular {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0,204,68,0.1);
}

/* Admin Toggle Switch */
.admin-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.admin-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.admin-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #333;
  border-radius: 28px;
  transition: all 0.3s;
}
.admin-toggle-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: #888;
  border-radius: 50%;
  transition: all 0.3s;
}
.admin-toggle input:checked + .admin-toggle-slider {
  background: var(--primary);
}
.admin-toggle input:checked + .admin-toggle-slider::before {
  transform: translateX(24px);
  background: #fff;
}
body.light-mode .admin-toggle-slider {
  background: #ccc;
}
body.light-mode .admin-toggle-slider::before {
  background: #888;
}
