@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
  --bg-base: #030303;
  --bg-surface: #0a0a0a;
  --bg-glass: rgba(15, 15, 15, 0.7);
  --accent-primary: #D4AF37; /* Premium Gold */
  --gold-primary: #D4AF37; /* Legacy alias */
  --gold-dark: #8B6B1A;
  --gold-gradient: linear-gradient(135deg, #8B6B1A 0%, #D4AF37 45%, #FFD700 100%);
  --gold-gradient-soft: linear-gradient(135deg, rgba(139, 107, 26, 0.2) 0%, rgba(212, 175, 55, 0.2) 100%);
  --gold-glow: 0 0 15px rgba(212, 175, 55, 0.3);
  --border-gold: rgba(212, 175, 55, 0.3);
  --accent-light: #FFD700;
  --accent-dark: #8B6B1A;
  --accent-gradient: linear-gradient(135deg, #8B6B1A 0%, #D4AF37 45%, #FFD700 100%);
  --accent-gradient-soft: linear-gradient(135deg, rgba(139, 107, 26, 0.2) 0%, rgba(212, 175, 55, 0.2) 100%);
  --accent-glow: 0 0 15px rgba(212, 175, 55, 0.3);
  --accent-glow-intense: 0 0 30px rgba(212, 175, 55, 0.5);
  
  --text-main: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(212, 175, 55, 0.3);
  --border-accent-faint: rgba(212, 175, 55, 0.1);
  
  --success: #00E676;
  --danger: #FF1744;
  --warning: #FFC107;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 10% 40%, rgba(212, 175, 55, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Mobile App Container Constraint for Desktop view */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: #000;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 90px; /* Space for bottom nav */
  border: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 80px rgba(0,0,0,1);
}

/*
 * Public pages use <body class="app-container"> with <header> + <div> as direct siblings.
 * Global body { display:flex } defaults to row — that put the header beside content (broken layout).
 */
body.app-container {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-left: auto;
  margin-right: auto;
}

body.app-container > .public-top-header,
body.app-container > .p-3 {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
}

/* Horizontal scroll areas: keep swipe/scroll, hide visible scrollbar */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Typography & Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.accent-text, .shimmer-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  background-size: 200% auto;
  animation: shine 3s linear infinite;
  font-weight: 800;
}

.gold-text { /* Mapping old class to new accent for compatibility */
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 800;
}

.text-muted {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Glassmorphism Panels */
.glass-panel, .glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.1);
}

.card-premium {
  background: linear-gradient(135deg, rgba(25, 25, 25, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
  border: 1px solid var(--border-accent-faint);
  border-radius: 32px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(212, 175, 55, 0.03);
  overflow: hidden;
}

.card-premium::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.2rem;
  border-radius: 18px;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  gap: 10px;
}

.btn-gold, .btn-accent {
  background: var(--accent-gradient);
  color: #000;
  box-shadow: var(--accent-glow);
  background-size: 200% auto;
}

.btn-gold:hover, .btn-accent:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: var(--accent-glow-intense);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border: 1.5px solid var(--border-glass);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Form Inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 1.2rem 1.5rem;
  border-radius: 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.02);
}

/* Floating Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: 440px;
  height: 75px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold-faint);
  border-radius: 38px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item i {
  font-size: 1.3rem;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-item.active {
  color: var(--gold-primary);
}

.nav-item.active i {
  transform: translateY(-4px);
  text-shadow: var(--gold-glow);
}

.nav-item.active span {
  opacity: 1;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--gold-primary);
  border-radius: 50%;
  box-shadow: var(--gold-glow);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(15px);
  z-index: 100;
  border-bottom: 1px solid var(--border-glass);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger span:nth-child(2) { width: 18px; }

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  padding: 2px;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #000;
}

/* Balance Card */
.balance-card {
  margin: 0 1.5rem;
  padding: 1.5rem;
  border-radius: 24px;
  background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'), linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.05);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(212, 175, 55, 0.1) 25%, transparent 50%);
  animation: rotate 10s linear infinite;
  pointer-events: none;
}

.balance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  position: relative;
  z-index: 2;
  letter-spacing: -1px;
}

.balance-currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold-primary);
  vertical-align: super;
}

.card-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #e5e4e2, #b0b0b0);
  border-radius: 6px;
  position: relative;
  z-index: 2;
  opacity: 0.8;
}

/* Animations */
@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* Platinum Ticket UI */
.ticket-premium {
  background: url('https://www.transparenttextures.com/patterns/brushed-alum.png'), var(--platinum-gradient);
  border-radius: 16px;
  padding: 2px;
  position: relative;
  box-shadow: var(--platinum-glow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ticket-inner {
  background: rgba(10, 10, 12, 0.95);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.ticket-logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.ticket-price {
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.ticket-body {
  display: flex;
  justify-content: space-between;
}

.ticket-barcode {
  width: 100%;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #fff,
    #fff 2px,
    transparent 2px,
    transparent 4px,
    #fff 4px,
    #fff 5px,
    transparent 5px,
    transparent 8px
  );
  opacity: 0.5;
  margin-top: 1rem;
}

/* Bottom Sheet */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  padding: 2rem;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  border-top: 1px solid var(--border-gold);
}

.bottom-sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 1.5rem auto;
}

.sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Dashboard Sections */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 1.5rem 1rem 1.5rem;
}

.section-title h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.view-all {
  color: var(--gold-primary);
  font-size: 0.85rem;
  text-decoration: none;
}

/* Active Lottery Card */
.active-lottery-card {
  margin: 0 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.active-lottery-card img {
  width: 100%;
  height: auto;
  display: block;
}

.lottery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.countdown-timer {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.time-box {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px;
  border-radius: 8px;
  text-align: center;
  min-width: 50px;
  backdrop-filter: blur(5px);
}

.time-box span {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(212,175,55,0.5);
}

.time-box label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Country Select */
.country-select-wrapper {
  display: flex;
  gap: 10px;
}

.country-select {
  width: 100px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-radius: 12px;
  padding: 0 10px;
  outline: none;
}

/* Referral Tree */
.tree-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  position: relative;
  margin: 0 auto;
  width: fit-content;
  min-width: 120px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.tree-node.root {
  border-color: var(--gold-primary);
  box-shadow: var(--gold-glow);
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}

.tree-level::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: 50%;
  width: 2px;
  height: 2rem;
  background: rgba(255,255,255,0.1);
}

.tree-level .tree-node::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  width: 2px;
  height: 1rem;
  background: rgba(255,255,255,0.1);
}

.tree-line-horizontal {
  position: absolute;
  top: -1rem;
  left: 25%;
  width: 50%;
  height: 2px;
  background: rgba(255,255,255,0.1);
}

/* Wallet History */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-glass);
}

.tx-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.tx-icon.income { background: var(--success-bg); color: var(--success); }
.tx-icon.expense { background: var(--danger-bg); color: var(--danger); }

.tx-amount.income { color: var(--success); }
.tx-amount.expense { color: var(--text-main); }

/* Sidebar Navigation */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 32, 51, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active,
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  z-index: 3000;
  transition: left 0.3s ease;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(18, 32, 51, 0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 8px 0 24px rgba(18, 32, 51, 0.12);
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.sidebar-close {
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

/* Scrollable link list; keeps header/footer fixed inside drawer */
.sidebar-nav--scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
  margin-right: -2px;
}

.sidebar-nav--scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav--scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.28);
  border-radius: 99px;
}

.sidebar-nav--scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-height: 48px;
  box-sizing: border-box;
}

.sidebar-footer a:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
}

.sidebar-footer a.sidebar-footer__danger {
  color: var(--danger);
}

.sidebar-footer a.sidebar-footer__danger:hover {
  background: rgba(255, 82, 82, 0.1);
  color: #ff8a80;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(192, 138, 27, 0.12);
  color: var(--gold-primary);
}

/* Admin Desktop Layout */
.admin-layout {
  justify-content: flex-start;
}

.admin-layout .app-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding-left: 280px;
  padding-bottom: 0;
  box-shadow: none;
}

.admin-layout .sidebar {
  left: 0 !important;
  box-shadow: none;
  border-right: 1px solid var(--border-glass);
}

.admin-layout .sidebar-overlay {
  display: none;
}

.admin-layout .sidebar-close {
  display: none;
}

.admin-layout .hamburger {
  display: none;
}

/* Mobile adjustments for Admin */
@media (max-width: 991px) {
  .admin-layout .app-container {
    padding-left: 0;
  }
  .admin-layout .sidebar {
    left: -280px !important;
  }
  .admin-layout .sidebar.open {
    left: 0 !important;
  }
  .admin-layout .sidebar-overlay {
    display: block;
  }
  .admin-layout .sidebar-close {
    display: block;
  }
  .admin-layout .hamburger {
    display: flex;
  }
}

/* -------- Public pages: back + brand row, then 3-up nav (mobile-first) -------- */
.public-top-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid rgba(18, 32, 51, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-base);
  position: relative;
  z-index: 4;
}

.public-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
}

.public-back {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  text-decoration: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.public-back:active {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
}

/* Stats strip (landing + transparency + anywhere) */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
  align-items: stretch;
}

.stat {
  flex: 1 1 min(140px, 100%);
  border: 1px solid var(--border-glass);
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  box-sizing: border-box;
  min-width: 0;
}

.stat small {
  display: block;
  margin-bottom: 6px;
}

.stat b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1.2;
  word-break: break-word;
}

.public-brand {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
  color: var(--gold-light);
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  animation: none !important;
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.35);
  font-size: clamp(1rem, 4vw, 1.15rem);
}

.public-nav-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.public-nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: clamp(0.62rem, 3.2vw, 0.78rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.9);
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  hyphens: auto;
  word-break: break-word;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.public-nav-pill:hover {
  color: var(--gold-primary);
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}

.public-nav-pill.is-active {
  color: var(--bg-base);
  background: linear-gradient(135deg, #aa771c 0%, #d4af37 50%, #f3e5ab 100%);
  border-color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
}

@media (min-width: 480px) {
  .public-nav-pill {
    font-size: clamp(0.72rem, 1.8vw, 0.85rem);
    padding: 10px 12px;
  }
}

/* Sidebar: section label + tighter wrap on small phones */
.sidebar-nav-group {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  padding: 0 12px 10px;
  opacity: 0.85;
}

.sidebar-nav a {
  min-height: 48px;
  box-sizing: border-box;
}

.sidebar-nav a i {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

@media (max-width: 360px) {
  .sidebar {
    width: min(280px, 92vw);
    padding: 1.5rem 1rem;
  }

  .sidebar-nav a {
    font-size: 1rem;
    padding: 11px 12px;
    gap: 12px;
  }
}


/* Premium Black and Gold Overrides */
.quick-action-btn,
.settings-group,
.history-panel,
.wallet-earn,
.winners-list,
.auth-card,
.team-card,
.rw-stat,
.rw-card,
.vip-hero,
.ticket-paper,
.tblock,
.detail-tabs {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-gold) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
  color: var(--text-main) !important;
}

.settings-item,
.history-item,
.winner-item,
.transaction-item {
  border-bottom-color: rgba(212, 175, 55, 0.1) !important;
  color: var(--text-main) !important;
}

.profile-card,
.super-card-content,
.tickets-dash-gold,
.lottery-empty-gold {
  background: linear-gradient(145deg, #121212 0%, #000000 100%) !important;
  border: 1px solid var(--border-gold) !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8) !important;
  color: var(--text-main) !important;
}

.lottery-draw-card.ticket-lux,
.draw-ticket.ticket-lux {
  background: linear-gradient(145deg, #AA771C 0%, #D4AF37 50%, #6b4e0a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7) !important;
}

.lottery-draw-card .ticket-lux__body,
.draw-ticket .ticket-lux__body {
  background: linear-gradient(180deg, #121212 0%, #000000 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.15) !important;
  color: #fff !important;
}

.draw-ticket__pool {
  color: var(--gold-light) !important;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5) !important;
}

.super-card,
.super-card-content {
  background: #000 !important;
  border: 1px solid var(--border-gold) !important;
}

.super-card-bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%) !important;
}

.stat {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-gold) !important;
}

.public-top-header {
  background: #000 !important;
  border-bottom: 1px solid var(--border-gold) !important;
}

.public-back {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-gold) !important;
  color: var(--gold-primary) !important;
}

.public-nav-pill {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-glass) !important;
}

.public-nav-pill.is-active {
  background: var(--gold-gradient) !important;
  color: #000 !important;
}

.form-control, 
.country-select {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #fff !important;
  border-color: var(--border-glass) !important;
}

