/* ============================================================================
   MILLIONAIRE'S CLUB (BCLUB24.COM) — VIBRANT COLOURFUL WEB3 THEME
   - All numbers (ID numbers, USDT balances, draw numbers, sold counts, ticket values, etc.)
     use crisp PURE WHITE (#ffffff) as the major colour.
   - Every lottery package & game has its own unique signature colour theme.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* Deep Cosmic Web3 Dark Palette */
  --dark: #050814;
  --dark-secondary: #0a1024;
  --dark-surface: #0f1734;
  --bg-deep: #040711;
  --bg-panel: rgba(12, 20, 44, 0.88);
  --bg-panel-solid: #0b132b;
  --bg-input: #060b19;

  /* Vibrant Web3 Accent Colours */
  --hash-gold: #fbbf24;
  --hash-gold-light: #fde047;
  --hash-gold-dark: #d97706;
  --medora-blue: #38bdf8;
  --medora-blue-light: #7dd3fc;
  --medora-blue-dark: #0284c7;

  /* Mapped Theme Tokens */
  --gold: #f59e0b;
  --gold-light: #fde047;
  --gold-dark: #d97706;
  --emerald: #10b981;
  --emerald-light: #34d399;
  --purple: #8b5cf6;
  --sky: #06b6d4;
  --amber: #f97316;
  --danger: #f43f5e;
  --bronze: #f97316;
  --silver: #38bdf8;

  /* Text Hierarchy (Numbers always #ffffff) */
  --text-primary: #ffffff;
  --text-main: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  /* Colourful Glowing Borders */
  --border-subtle: rgba(148, 163, 184, 0.2);
  --border-gold: rgba(251, 191, 36, 0.38);
  --border-gold-strong: rgba(251, 191, 36, 0.72);
  --border-blue: rgba(56, 189, 248, 0.38);
  --border-emerald: rgba(16, 185, 129, 0.42);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Exo 2', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Exo 2', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-card: 0 14px 40px rgba(2, 6, 23, 0.78);
  --shadow-gold-glow: 0 0 24px rgba(245, 158, 11, 0.22);
  --shadow-blue-glow: 0 0 24px rgba(56, 189, 248, 0.22);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 12% 15%, rgba(139, 92, 246, 0.18), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.16), transparent 36%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.12), transparent 42%),
    linear-gradient(180deg, #040711 0%, #09122c 50%, #040711 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: -1;
}

/* ============================================================================
   WHITE AS MAJOR COLOUR FOR ALL NUMBERS (IDs, USDT BALANCES, DRAWS, SOLD, ETC.)
   ============================================================================ */
.mono-num,
code,
.stat-mini-value,
.pkg-price-num,
.time-box-num,
.ticket-num,
.hm-level-count,
.split-item-val,
.h24-rule-val,
.num-white,
#dashUserIdBadge,
#dashTotalCombinedBalance,
#dashMainWalletBalance,
#dashBonusWalletBalance,
#dashRewardWalletBalance,
#dashH24TokenBalance,
#navWalletBalance,
#withdrawAvailableMainBalance,
#p2pAvailableMainBalance,
#h24TotalPoolDisplay,
#megaArenaWinningPoolDisplay,
#heroTotalMembers,
#heroActivePackages,
#heroH24Pool,
#heroTotalDraws {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: #ffffff !important;
}

/* ============================================================================
   COLOURFUL HEADINGS & TEXT GRADIENTS
   ============================================================================ */
.gold-gradient-text,
.hm-word-gold {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 55%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blue-gradient-text,
.hm-word-blue {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 55%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Keep numbers white even when .text-hash-gold or .text-medora-blue is used */
.text-hash-gold,
.text-medora-blue {
  color: #ffffff !important;
}

.text-shadow-gold {
  text-shadow: 0 2px 16px rgba(245, 158, 11, 0.35);
}

.text-shadow-blue {
  text-shadow: 0 2px 16px rgba(56, 189, 248, 0.35);
}

.glow-separator {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(251, 191, 36, 0.6) 50%, transparent 100%);
}

/* ============================================================================
   TOP STICKY NAVBAR (Colourful Web3 Glass)
   ============================================================================ */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 11, 26, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  padding: 5px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(56, 189, 248, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.brand-domain {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bsc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
}

/* Workspace Navigation Tabs */
.mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 52, 0.85);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.mode-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  text-decoration: none;
}

.mode-tab:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}

.mode-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: rgba(167, 139, 250, 0.65);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

/* Right Navbar Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 52, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 12px;
  border-radius: 10px;
}

.user-pill-label {
  font-size: 0.72rem;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.user-switcher-select {
  background: #060b19;
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 8px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.wallet-balance-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.18));
  border: 1px solid rgba(16, 185, 129, 0.5);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
}

/* ============================================================================
   COLOURFUL BUTTONS & PILL BADGES
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  font-weight: 800;
  border: 1px solid rgba(253, 224, 71, 0.55) !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.5);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  font-weight: 800;
  border: 1px solid rgba(52, 211, 153, 0.55) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.32);
}

.btn-emerald:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.48);
}

.btn-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%) !important;
  color: #ffffff !important;
  font-weight: 800;
  border: 1px solid rgba(192, 132, 252, 0.55) !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-purple:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-outline {
  background: rgba(15, 23, 52, 0.75);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.42);
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-gold {
  background: rgba(245, 158, 11, 0.18);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.5);
}

.pill-emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.pill-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.55);
}

.pill-blue {
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.5);
}

.pill-rose {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.55);
}

/* ============================================================================
   MAIN CONTAINER & VIEW SWITCHING
   ============================================================================ */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.view-panel {
  display: none;
  animation: viewFade 0.2s ease-out;
}

.view-panel.active {
  display: block;
}

@keyframes viewFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   HERO SECTION & REGISTRATION PORTAL
   ============================================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-showcase {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 52, 0.92), rgba(10, 16, 36, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.hero-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981, #38bdf8, #8b5cf6);
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.1vw, 2.75rem);
  font-weight: 800;
  line-height: 1.14;
  margin-bottom: 14px;
  color: #ffffff;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 64ch;
  margin-bottom: 24px;
}

.hero-subtitle strong {
  color: #ffffff;
}

/* Stat Boxes (.stat-mini) */
.hero-QuickStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.stat-mini {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(17, 27, 60, 0.9), rgba(10, 16, 36, 0.92));
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 12px;
  padding: 15px 16px;
  transition: var(--transition);
}

.stat-mini::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #8b5cf6);
}

.stat-mini:nth-child(4n+1)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-mini:nth-child(4n+2)::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.stat-mini:nth-child(4n+3)::before { background: linear-gradient(90deg, #f59e0b, #fde047); }
.stat-mini:nth-child(4n+4)::before { background: linear-gradient(90deg, #8b5cf6, #ec4899); }

.stat-mini:hover {
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-2px);
}

.stat-mini-label {
  font-size: 0.72rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-mini-value {
  font-family: var(--font-mono);
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums;
}

/* Right Auth / Referral Portal Card */
.auth-portal-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(16, 24, 56, 0.94), rgba(9, 14, 32, 0.96));
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #8b5cf6);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.portal-logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.5);
  flex-shrink: 0;
}

.portal-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  background: #060b19;
  border: 1px solid rgba(99, 102, 241, 0.42);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 10px;
  outline: none;
  transition: var(--transition);
}

.form-input::placeholder {
  color: #64748b;
}

.form-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.divider-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #93c5fd;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.divider-line::before,
.divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
}

/* ============================================================================
   HOW IT WORKS 4-STEP BOXES (Colourful)
   ============================================================================ */
.hm-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.hm-step-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 52, 0.9), rgba(9, 15, 34, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.hm-step-box:nth-child(1) { border-color: rgba(16, 185, 129, 0.45); }
.hm-step-box:nth-child(2) { border-color: rgba(56, 189, 248, 0.45); }
.hm-step-box:nth-child(3) { border-color: rgba(139, 92, 246, 0.45); }
.hm-step-box:nth-child(4) { border-color: rgba(245, 158, 11, 0.45); }

.hm-step-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.hm-step-icon {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.hm-step-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hm-step-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.hm-step-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ============================================================================
   SECTION HEADERS & COLOURFUL PANEL CARDS
   ============================================================================ */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-top: 3px;
}

.panel-card,
.glass-card-gold-border,
.panel-card-blue,
.glass-card-blue-border {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(13, 21, 48, 0.92), rgba(8, 13, 30, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.glass-card-gold-border {
  border-color: rgba(251, 191, 36, 0.45);
}

.panel-card:hover,
.glass-card-gold-border:hover {
  border-color: rgba(56, 189, 248, 0.58);
}

.panel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.panel-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 26px;
}

/* ============================================================================
   AFFILIATE & WALLET KPI BOXES (Colourful Accents + Pure White Numbers)
   ============================================================================ */
.hm-id-highlight-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.22));
  border: 1px solid rgba(129, 140, 248, 0.55);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

.hm-referral-copy-box {
  background: rgba(6, 11, 25, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  padding: 15px;
}

.hm-referral-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #040711;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
}

.hm-wallet-hero-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(37, 99, 235, 0.16), rgba(124, 58, 237, 0.16));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.hm-subwallet-pill {
  background: rgba(6, 11, 25, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 175px;
}

.hm-subwallet-pill.blue-pill {
  border-color: rgba(56, 189, 248, 0.5);
}

.hm-subwallet-pill:nth-child(3) {
  border-color: rgba(16, 185, 129, 0.5);
}

.hm-subwallet-pill:nth-child(4) {
  border-color: rgba(168, 85, 247, 0.55);
}

.hm-highlight-strip {
  background: rgba(15, 23, 52, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================================================
   USER DASHBOARD SMALL GAME BLOCKS (#dashQuickGamesGrid) — UNIQUE COLOURS PER GAME
   ============================================================================ */
.quick-game-block {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.quick-game-block:hover {
  transform: translateY(-3px);
}

.quick-game-title {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.quick-game-title .game-bracket-name {
  font-weight: 700;
  font-size: 0.82rem;
  opacity: 0.92;
}

.quick-game-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 7, 17, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.quick-game-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.quick-game-label {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.quick-game-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
  color: #ffffff !important;
}

/* ============================================================================
   UNIQUE PACKAGE COLOUR THEMES (For Both User Dashboard Small Blocks & Gaming Cards)
   ============================================================================ */

/* Theme 1: Emerald Cyber Green (Package #1 — 10 Tickets Package) */
.pkg-theme-emerald {
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.55) 0%, rgba(9, 18, 40, 0.95) 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.65) !important;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.16) !important;
}
.pkg-theme-emerald::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #10b981, #34d399, #059669) !important;
}
.pkg-theme-emerald .pkg-progress-fill {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
}
.pkg-theme-emerald .pkg-theme-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(52, 211, 153, 0.65) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

/* Theme 2: Electric Cyan / Ocean Blue (Package #2 — 25 Tickets Package) */
.pkg-theme-cyan {
  background: linear-gradient(155deg, rgba(12, 74, 110, 0.6) 0%, rgba(9, 18, 40, 0.95) 100%) !important;
  border: 1px solid rgba(6, 182, 212, 0.65) !important;
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.16) !important;
}
.pkg-theme-cyan::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #06b6d4, #38bdf8, #0284c7) !important;
}
.pkg-theme-cyan .pkg-progress-fill {
  background: linear-gradient(90deg, #06b6d4, #38bdf8) !important;
}
.pkg-theme-cyan .pkg-theme-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(103, 232, 249, 0.65) !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

/* Theme 3: Royal Violet / Purple (Package #3 — 50 Tickets Package) */
.pkg-theme-purple {
  background: linear-gradient(155deg, rgba(76, 29, 149, 0.58) 0%, rgba(9, 18, 40, 0.95) 100%) !important;
  border: 1px solid rgba(139, 92, 246, 0.68) !important;
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.18) !important;
}
.pkg-theme-purple::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #c084fc, #6d28d9) !important;
}
.pkg-theme-purple .pkg-progress-fill {
  background: linear-gradient(90deg, #8b5cf6, #c084fc) !important;
}
.pkg-theme-purple .pkg-theme-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(196, 181, 253, 0.65) !important;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.38);
}

/* Theme 4: Sunset Crimson / Rose Pink (Package #4 — 100 Tickets Package) */
.pkg-theme-rose {
  background: linear-gradient(155deg, rgba(136, 19, 55, 0.58) 0%, rgba(9, 18, 40, 0.95) 100%) !important;
  border: 1px solid rgba(244, 63, 94, 0.68) !important;
  box-shadow: 0 12px 32px rgba(244, 63, 94, 0.18) !important;
}
.pkg-theme-rose::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #f43f5e, #fb7185, #e11d48) !important;
}
.pkg-theme-rose .pkg-progress-fill {
  background: linear-gradient(90deg, #f43f5e, #fb7185) !important;
}
.pkg-theme-rose .pkg-theme-btn {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(253, 164, 175, 0.65) !important;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.38);
}

/* Theme 5: Imperial Gold / Amber (Package #5 — 100,000 Tickets Package) */
.pkg-theme-gold {
  background: linear-gradient(155deg, rgba(120, 53, 15, 0.58) 0%, rgba(9, 18, 40, 0.95) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.72) !important;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.2) !important;
}
.pkg-theme-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fde047, #ea580c) !important;
}
.pkg-theme-gold .pkg-progress-fill {
  background: linear-gradient(90deg, #f59e0b, #fde047) !important;
}
.pkg-theme-gold .pkg-theme-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(253, 224, 71, 0.68) !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Theme 6: Neon Magenta & Electric Indigo (H24 24-Hour Mega Jackpot) */
.pkg-theme-magenta {
  background: linear-gradient(155deg, rgba(112, 26, 117, 0.58) 0%, rgba(30, 27, 75, 0.95) 100%) !important;
  border: 1px solid rgba(217, 70, 239, 0.7) !important;
  box-shadow: 0 12px 32px rgba(217, 70, 239, 0.2) !important;
}
.pkg-theme-magenta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #d946ef, #8b5cf6, #38bdf8) !important;
}
.pkg-theme-magenta .pkg-progress-fill {
  background: linear-gradient(90deg, #d946ef, #8b5cf6) !important;
}
.pkg-theme-magenta .pkg-theme-btn {
  background: linear-gradient(135deg, #d946ef 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(240, 171, 252, 0.65) !important;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
}

/* Highlight pulse when redirected from User Dashboard Buy Ticket button */
@keyframes targetPickerPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85), 0 0 30px rgba(56, 189, 248, 0.8); }
  50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 0 45px rgba(245, 158, 11, 0.9); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.highlight-ticket-picker {
  animation: targetPickerPulse 2.2s ease-out 2;
  outline: 2px solid #ffffff !important;
}

/* ============================================================================
   5-LEVEL PLAN PROGRESS CARDS (Colourful Tiers + White Numbers)
   ============================================================================ */
.hm-level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.hm-level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  padding: 13px 12px;
  transition: var(--transition);
  overflow: hidden;
  background: rgba(15, 23, 52, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.hm-level-card:hover {
  transform: translateY(-2px);
}

.hm-level-card.tier-bronze {
  border-color: rgba(249, 115, 22, 0.5);
  background: linear-gradient(145deg, rgba(124, 45, 18, 0.35), rgba(10, 16, 36, 0.9));
}

.hm-level-card.tier-silver {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(145deg, rgba(12, 74, 110, 0.4), rgba(10, 16, 36, 0.9));
}

.hm-level-card.tier-gold {
  border-color: rgba(245, 158, 11, 0.65);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.42), rgba(10, 16, 36, 0.9));
}

.hm-level-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.hm-level-tag {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
}

.hm-level-pct {
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.66rem;
  font-weight: 800;
  background: rgba(4, 7, 17, 0.8);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-mono);
}

.hm-level-count {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.hm-level-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
  margin-bottom: 8px;
}

.hm-level-bar-bg {
  margin-top: auto;
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(4, 7, 17, 0.85);
  overflow: hidden;
}

.hm-level-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #8b5cf6);
}

.tier-bronze .hm-level-bar-fill { background: linear-gradient(90deg, #f97316, #fbbf24); }
.tier-silver .hm-level-bar-fill { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.tier-gold .hm-level-bar-fill { background: linear-gradient(90deg, #f59e0b, #fde047); }

/* ============================================================================
   SPLIT BREAKDOWN & REFERRAL ROWS
   ============================================================================ */
.split-breakdown-list {
  background: rgba(6, 11, 25, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
}

.split-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
  font-size: 0.81rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.split-item:last-child {
  border-bottom: none;
}

.split-item-label {
  color: var(--text-secondary);
}

.split-item-val {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #ffffff !important;
  word-break: break-word;
}

.level-row {
  display: grid;
  grid-template-columns: 110px 145px 1fr 135px;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 52, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 9px;
  transition: var(--transition);
}

.level-row:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(23, 37, 84, 0.85);
}

/* ============================================================================
   LOTTERY PACKAGE CARDS & INTERACTIVE NUMBER GRID
   ============================================================================ */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 22px;
  margin-bottom: 30px;
}

.package-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  background: linear-gradient(155deg, rgba(15, 23, 52, 0.94), rgba(8, 13, 30, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

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

.pkg-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.pkg-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 200px;
}

.pkg-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 7, 17, 0.85);
  padding: 4px;
  flex-shrink: 0;
}

.pkg-name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
}

.pkg-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.pkg-price-tag {
  text-align: right;
  background: rgba(4, 7, 17, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px;
  border-radius: 10px;
  flex-shrink: 0;
}

.pkg-price-num {
  font-family: var(--font-mono);
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff !important;
}

/* Progress Bar */
.pkg-progress-wrap {
  margin-bottom: 14px;
}

.pkg-progress-labels {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.pkg-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(4, 7, 17, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.pkg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Winner Prize Chips */
.prize-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 96px;
  overflow-y: auto;
}

.prize-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(4, 7, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}

.prize-chip.rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(234, 88, 12, 0.35));
  border-color: #fbbf24;
  color: #ffffff !important;
  font-weight: 800;
}

/* Ticket Number Grid (White Numbers + Colourful Interactive States) */
.ticket-matrix-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-matrix {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(4, 7, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ticket-cell {
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 52, 0.9);
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ticket-cell:hover:not(.sold) {
  border-color: #38bdf8;
  background: rgba(37, 99, 235, 0.38);
  transform: translateY(-1px);
}

/* Picked Number Tile Style */
.ticket-cell.selected {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2px solid #ffffff;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.55);
}

.ticket-cell.sold {
  background: rgba(4, 7, 17, 0.9);
  border: 1px dashed rgba(244, 63, 94, 0.45);
  cursor: not-allowed;
  opacity: 0.72;
}

.ticket-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-cell.selected .ticket-num {
  color: #ffffff !important;
}

.ticket-owner {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #cbd5e1;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-cell.sold .ticket-owner {
  color: #fda4af;
  font-weight: 700;
}

.ticket-cell.selected .ticket-owner {
  color: #ffffff;
  font-weight: 800;
}

/* Ticket Pagination Bar */
.ticket-pagination-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(4, 7, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 14px;
}

.ticket-pagination-info {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
}

.ticket-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-page-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.ticket-page-nav,
.ticket-page-btn {
  background: rgba(15, 23, 52, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
}

.ticket-page-nav:hover:not(:disabled),
.ticket-page-btn:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.25);
}

.ticket-page-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ticket-page-btn.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 800;
}

/* ============================================================================
   H24 MEGA 24-HOUR DYNAMIC LOTTERY & 100K MEGA ARENA BANNERS
   ============================================================================ */
.h24-mega-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(46, 16, 101, 0.65), rgba(10, 16, 38, 0.96));
  border: 1px solid rgba(192, 132, 252, 0.55);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.h24-mega-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d946ef, #8b5cf6, #38bdf8);
}

#megaArena100kBanner {
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.52), rgba(10, 16, 38, 0.96)) !important;
  border: 1px solid rgba(251, 191, 36, 0.65) !important;
}

#megaArena100kBanner::before {
  background: linear-gradient(90deg, #f59e0b, #fde047, #10b981) !important;
}

.h24-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
}

.h24-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.h24-rule-box {
  background: rgba(6, 11, 25, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 13px 15px;
  transition: var(--transition);
}

.h24-rule-box:nth-child(1) { border-color: rgba(251, 191, 36, 0.5); }
.h24-rule-box:nth-child(2) { border-color: rgba(56, 189, 248, 0.5); }
.h24-rule-box:nth-child(3) { border-color: rgba(16, 185, 129, 0.5); }
.h24-rule-box:nth-child(4) { border-color: rgba(168, 85, 247, 0.5); }

.h24-rule-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #93c5fd;
  margin-bottom: 4px;
  font-weight: 700;
}

.h24-rule-val {
  font-family: var(--font-mono);
  font-size: 1.04rem;
  font-weight: 800;
  color: #ffffff !important;
}

.countdown-boxes {
  display: flex;
  gap: 10px;
  margin: 12px 0 18px;
}

.time-box {
  background: rgba(4, 7, 17, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 78px;
  text-align: center;
}

.time-box-num {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff !important;
}

.time-box-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  color: #7dd3fc;
}

/* ============================================================================
   ADMIN DYNAMIC WINNER PRIZE BOXES
   ============================================================================ */
.dynamic-prize-boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(4, 7, 17, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  margin-top: 8px;
}

.prize-box-item {
  background: rgba(15, 23, 52, 0.88);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 10px;
  padding: 9px 11px;
}

.prize-box-item label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

/* ============================================================================
   TABLES & WINNER RESULT ROWS
   ============================================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(6, 11, 25, 0.85);
}

.bclub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.bclub-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7dd3fc;
  background: rgba(15, 23, 52, 0.95);
  border-bottom: 1px solid rgba(56, 189, 248, 0.28);
}

.bclub-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: middle;
  color: #ffffff;
}

.bclub-table tr:hover td {
  background: rgba(56, 189, 248, 0.08);
}

.winner-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff !important;
  padding: 3px 9px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  margin: 2px;
}

/* ============================================================================
   CODE VIEWER & MODALS & TOAST NOTIFICATIONS
   ============================================================================ */
.code-viewer {
  background: rgba(4, 7, 17, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #ffffff;
  overflow-x: auto;
  max-height: 460px;
  line-height: 1.6;
  white-space: pre;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0d1636, #070c1f);
  border: 1px solid rgba(251, 191, 36, 0.6);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
}

.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
}

.toast,
.toast-item {
  background: linear-gradient(145deg, rgba(15, 23, 52, 0.96), rgba(8, 13, 30, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-left: 4px solid #fbbf24;
  color: #ffffff;
  padding: 13px 16px;
  border-radius: 10px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.85);
  font-size: 0.83rem;
  animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================================
   PHASE 1 GROUP (PACKAGES 1 TO 5) & PHASE 2 / PHASE 3 COMING SOON CARDS
   ============================================================================ */
.phase-group-container {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 52, 0.88) 45%, rgba(8, 13, 30, 0.96) 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 32px rgba(16, 185, 129, 0.14);
}

.phase-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.28);
}

.phase-soon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.phase-soon-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.phase-soon-card.phase-2-theme {
  background: linear-gradient(155deg, rgba(6, 182, 212, 0.18) 0%, rgba(15, 23, 52, 0.94) 55%, rgba(8, 13, 30, 0.98) 100%);
  border: 1.5px solid rgba(34, 211, 238, 0.55);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), 0 0 28px rgba(6, 182, 212, 0.18);
}

.phase-soon-card.phase-3-theme {
  background: linear-gradient(155deg, rgba(168, 85, 247, 0.2) 0%, rgba(245, 158, 11, 0.12) 50%, rgba(8, 13, 30, 0.98) 100%);
  border: 1.5px solid rgba(192, 132, 252, 0.6);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), 0 0 28px rgba(168, 85, 247, 0.22);
}

.phase-price-box {
  background: rgba(4, 7, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: right;
}

.phase-price-num {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.25);
}

.phase-pkg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phase-pkg-pill {
  background: rgba(4, 7, 18, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #cbd5e1;
}

/* ============================================================================
   GLOBAL GRID CHILD MIN-WIDTH SAFETY & RESPONSIVE BREAKPOINTS
   ============================================================================ */
.hero-grid > *,
.h24-grid > *,
.dashboard-cards-grid > *,
.grid-2 > *,
.grid-3 > *,
.packages-grid > *,
.phase-soon-grid > *,
.panel-card,
.glass-card-gold-border,
.panel-card-blue,
.glass-card-blue-border,
.h24-mega-banner,
.phase-group-container,
.phase-soon-card,
.quick-game-block,
.auth-portal-card,
.hero-showcase {
  min-width: 0;
  max-width: 100%;
}

.mobile-2col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-inline-form {
  display: flex;
  gap: 10px;
}

@media (max-width: 1120px) {
  .hero-grid,
  .h24-grid,
  .grid-3,
  .grid-2,
  .phase-soon-grid,
  .dashboard-cards-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-QuickStats,
  .hm-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hm-level-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .app-container {
    padding: 16px 12px 60px;
  }

  /* Compact Sticky Navbar on Mobile */
  .navbar-inner {
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .brand-lockup {
    justify-content: space-between;
  }

  .brand-logo-wrap {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .mode-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    overflow-x: visible;
  }

  .mode-tab {
    justify-content: center;
    padding: 7px 6px;
    font-size: 0.74rem;
    gap: 4px;
    text-align: center;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .user-pill-bar {
    flex: 1 1 auto;
    justify-content: space-between;
    padding: 5px 9px;
  }

  .wallet-balance-chip {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  /* Cards, Banners & Phase Groups Padding on Mobile */
  .hero-showcase,
  .auth-portal-card,
  .panel-card,
  .glass-card-gold-border,
  .panel-card-blue,
  .glass-card-blue-border,
  .h24-mega-banner,
  .phase-group-container,
  .phase-soon-card,
  .package-card {
    padding: 16px 14px !important;
    border-radius: 14px;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .section-title {
    font-size: 1.18rem;
    flex-wrap: wrap;
  }

  .panel-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .panel-card-title {
    font-size: 0.96rem;
  }

  /* User Dashboard Wallet & Subwallet Boxes on Mobile */
  .hm-wallet-hero-box {
    padding: 16px 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .hm-subwallet-pill {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
    width: 100%;
    padding: 10px 12px;
  }

  .hm-referral-input-row {
    flex-wrap: wrap;
  }

  .hm-referral-input-row code {
    width: 100%;
    flex: 1 1 100%;
  }

  .hm-referral-input-row .btn {
    width: 100%;
  }

  .hm-highlight-strip {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* 5-Level Rows & Grids on Mobile */
  .level-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .level-row > div:last-child {
    text-align: left !important;
  }

  .hm-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hm-steps-grid {
    grid-template-columns: 1fr;
  }

  /* H24 & 100k Mega Arena Banners on Mobile */
  .h24-rules-grid,
  .mobile-2col-grid {
    grid-template-columns: 1fr !important;
  }

  .countdown-boxes {
    gap: 8px;
  }

  .time-box {
    flex: 1;
    min-width: 0;
    padding: 8px 6px;
  }

  .time-box-num {
    font-size: 1.2rem;
  }

  .mobile-inline-form {
    flex-direction: column;
  }

  .mobile-inline-form .form-input,
  .mobile-inline-form .btn {
    width: 100% !important;
  }

  /* Packages & Ticket Matrix on Mobile */
  .packages-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .pkg-top-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pkg-identity {
    flex: 1 1 auto;
    width: 100%;
  }

  .pkg-price-tag,
  .phase-price-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .ticket-matrix {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 8px 6px;
  }

  .ticket-cell {
    padding: 6px 2px;
  }

  .ticket-num {
    font-size: 0.78rem;
  }

  .ticket-owner {
    font-size: 0.55rem;
  }

  .ticket-pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ticket-page-numbers {
    order: -1;
    margin-bottom: 4px;
  }

  /* Tables & Toasts on Mobile */
  .bclub-table th,
  .bclub-table td {
    padding: 9px 10px;
    font-size: 0.76rem;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .mode-tab span:first-child {
    display: none;
  }

  .mode-tab {
    font-size: 0.71rem;
    padding: 7px 4px;
  }

  .hero-QuickStats,
  .hm-level-grid {
    grid-template-columns: 1fr;
  }

  .hm-subwallet-pill {
    flex: 1 1 100%;
  }

  #dashTotalCombinedBalance,
  #dashUserIdBadge,
  #h24TotalPoolDisplay,
  #megaArenaWinningPoolDisplay {
    font-size: 1.65rem !important;
  }

  /* For 5-digit ticket numbers on very narrow phones, use 2 columns so numbers are never clipped */
  #megaArenaTicketsMatrixContainer.ticket-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
