:root {
  --bg-abyss: #040208;
  --bg-primary: #0a0612;
  --bg-elevated: #0d0717;
  --bg-card: #150d2a;
  --bg-card-deep: #090514;
  --bg-card-hover: #1c1138;
  --border-color: #2d1b54;
  --border-subtle: #1f123b;
  --border-glow: #8b5cf6;
  --accent-deep: #3b0764;
  --accent-royal: #581c87;
  --accent-primary: #8b5cf6;
  --accent-secondary: #a855f7;
  --accent-bright: #c084fc;
  --text-main: #f8f5ff;
  --text-muted: #9d8ec4;
  --text-silver: #d4c8f0;
  --tg-viewport-height: 100vh;
  --tg-viewport-stable-height: 100vh;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
}

html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
}

.font-display {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono-num {
  font-family: 'JetBrains Mono', monospace;
}

/* Pitch-Black Deep Dark Luxury Purple & Obsidian Ambient Background */
.bg-cosmic-grid {
  background-color: #0a0612;
  background-image: 
    radial-gradient(circle at 12% 8%, rgba(59, 7, 100, 0.22) 0%, rgba(30, 10, 60, 0.10) 28%, transparent 52%),
    radial-gradient(circle at 88% 18%, rgba(76, 29, 149, 0.18) 0%, rgba(30, 8, 55, 0.08) 32%, transparent 55%),
    radial-gradient(circle at 50% 55%, rgba(45, 27, 84, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 50% 95%, rgba(59, 7, 100, 0.18) 0%, transparent 50%),
    linear-gradient(rgba(45, 27, 84, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 27, 84, 0.18) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 38px 38px, 38px 38px;
  background-attachment: fixed;
}

/* Deep Dark Purple Luxury Surface Cards */
.mining-card {
  background: linear-gradient(165deg, rgba(21, 13, 42, 0.98) 0%, rgba(13, 7, 23, 0.99) 60%, rgba(10, 6, 18, 1) 100%);
  border: 1px solid var(--border-color);
  box-shadow: 
    0 16px 38px -12px rgba(2, 0, 8, 0.92),
    0 0 24px -8px rgba(76, 29, 149, 0.20),
    inset 0 1px 0 0 rgba(192, 132, 252, 0.10);
  backdrop-filter: blur(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.mining-card-interactive:hover {
  transform: translateY(-2px);
  background: linear-gradient(165deg, rgba(28, 17, 56, 0.98) 0%, rgba(18, 10, 38, 0.99) 60%, rgba(13, 8, 26, 1) 100%);
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 
    0 18px 42px -10px rgba(59, 7, 100, 0.50),
    0 0 28px -6px rgba(139, 92, 246, 0.25),
    inset 0 1px 0 0 rgba(192, 132, 252, 0.20);
}

/* Deep Royal Amethyst Hero Balance & Vault Cards */
.hero-balance-card {
  background: 
    radial-gradient(125% 125% at 92% 8%, rgba(139, 92, 246, 0.28) 0%, rgba(59, 7, 100, 0.18) 45%, rgba(10, 6, 18, 0.99) 100%),
    linear-gradient(135deg, #150d2a 0%, #0d0717 65%, #0a0612 100%);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 
    0 24px 56px -12px rgba(10, 3, 20, 0.85),
    0 0 36px -8px rgba(91, 33, 182, 0.25),
    inset 0 1px 1px rgba(216, 180, 254, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-balance-card::before {
  content: '';
  position: absolute;
  top: -45%;
  right: -15%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.30) 0%, rgba(76, 29, 149, 0.12) 45%, transparent 72%);
  pointer-events: none;
}

.hero-balance-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(88, 28, 135, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Touch-Friendly Horizontal Swipeable Mining Tiers Carousel */
.tier-carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0.15rem 0.85rem 0.15rem;
  cursor: grab;
  user-select: none;
  scrollbar-width: none;
}

.tier-carousel-track::-webkit-scrollbar {
  display: none;
}

.tier-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.tier-carousel-card {
  flex: 0 0 288px;
  scroll-snap-align: start;
  background: 
    radial-gradient(95% 95% at 100% 0%, rgba(91, 33, 182, 0.24) 0%, transparent 60%),
    linear-gradient(165deg, rgba(23, 11, 46, 0.98) 0%, rgba(13, 6, 28, 0.99) 65%, rgba(7, 3, 16, 1) 100%);
  border: 1px solid #28154c;
  border-radius: 1.25rem;
  box-shadow: 
    0 14px 36px -10px rgba(2, 0, 8, 0.85),
    0 0 20px -6px rgba(76, 29, 149, 0.25),
    inset 0 1px 0 rgba(192, 132, 252, 0.12);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .tier-carousel-card {
    flex: 0 0 315px;
  }
}

.tier-carousel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.72);
  box-shadow: 
    0 20px 44px -8px rgba(76, 29, 149, 0.52),
    0 0 26px -4px rgba(124, 58, 237, 0.32),
    inset 0 1px 0 rgba(216, 180, 254, 0.26);
}

.tier-carousel-card.is-active-tier {
  border-color: rgba(52, 211, 153, 0.55);
  background: 
    radial-gradient(95% 95% at 100% 0%, rgba(16, 185, 129, 0.14) 0%, rgba(91, 33, 182, 0.20) 55%, transparent 80%),
    linear-gradient(165deg, rgba(22, 12, 45, 0.98) 0%, rgba(12, 6, 26, 0.99) 100%);
  box-shadow: 0 16px 38px -10px rgba(16, 185, 129, 0.24), inset 0 1px 0 rgba(52, 211, 153, 0.22);
}

/* Futuristic Circular 24H Countdown Ring */
.cycle-ring-container {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cycle-ring-svg {
  transform: rotate(-90deg);
  width: 210px;
  height: 210px;
  filter: drop-shadow(0 0 18px rgba(124, 58, 237, 0.48));
}

.cycle-ring-track {
  fill: none;
  stroke: rgba(38, 20, 71, 0.8);
  stroke-width: 10;
}

.cycle-ring-progress {
  fill: none;
  stroke: url(#cycleRingGradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glowing Headset Customer Support Button */
@keyframes headset-halo {
  0%, 100% {
    box-shadow: 0 8px 30px rgba(109, 40, 217, 0.65), 0 0 0 0 rgba(139, 92, 246, 0.5);
  }
  50% {
    box-shadow: 0 12px 38px rgba(124, 58, 237, 0.88), 0 0 0 9px rgba(139, 92, 246, 0);
  }
}

.support-headset-btn {
  animation: headset-halo 3s ease-in-out infinite;
}

/* Deepened Royal & Neon Purple Buttons */
.btn-neon {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #6d28d9 100%);
  color: #ffffff;
  border: 1px solid rgba(192, 132, 252, 0.28);
  box-shadow: 
    0 6px 22px -2px rgba(91, 33, 182, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: all 0.22s ease;
}

.btn-neon:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #9333ea 100%);
  border-color: rgba(216, 180, 254, 0.45);
  box-shadow: 
    0 8px 28px 0 rgba(124, 58, 237, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.btn-neon:active:not(:disabled) {
  transform: translateY(0);
}

.btn-neon:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-surface {
  background: linear-gradient(160deg, rgba(24, 12, 48, 0.88) 0%, rgba(15, 7, 32, 0.94) 100%);
  border: 1px solid #2d1857;
  color: #e9d5ff;
  transition: all 0.2s ease;
}

.btn-surface:hover {
  background: linear-gradient(160deg, rgba(38, 19, 74, 0.95) 0%, rgba(24, 12, 48, 0.98) 100%);
  border-color: #7c3aed;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(109, 40, 217, 0.35);
}

/* Glowing Badges */
.badge-active {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.22);
}

.badge-purple {
  background: rgba(109, 40, 217, 0.26);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #e9d5ff;
  box-shadow: 0 0 16px rgba(109, 40, 217, 0.35);
}

/* Pulse Animations */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  }
  50% {
    opacity: 0.75;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
}

.dot-live {
  animation: pulse-glow 2s infinite;
}

@keyframes float-vault {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float-vault {
  animation: float-vault 4s ease-in-out infinite;
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 14s linear infinite;
}

/* Persistent Downbar Navigation Styling (NexaVault Luxury Obsidian & Purple Theme) */
#persistentBottomNav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  z-index: 99999 !important;
  background: rgba(13, 7, 23, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid rgba(139, 92, 246, 0.35) !important;
  padding-top: 6px !important;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.85) !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.nav-item-bottom {
  position: relative;
  transition: all 0.2s ease-in-out;
  padding-left: 2px;
  padding-right: 2px;
  min-width: 0;
  color: #9d8ec4;
}

.nav-item-bottom svg {
  color: #9d8ec4;
  transition: all 0.2s ease;
}

.nav-item-bottom span {
  font-size: 10px;
  font-weight: 600;
  line-height: 13px;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

@media (min-width: 640px) {
  .nav-item-bottom span {
    font-size: 11px;
    line-height: 15px;
    letter-spacing: 0;
  }
}

.nav-item-bottom .nav-indicator-bar {
  display: none !important;
}

.nav-item-bottom.active {
  color: #c084fc !important;
}

.nav-item-bottom.active .bottom-nav-icon-wrap {
  transform: translateY(-1px);
}

.nav-item-bottom.active svg {
  color: #c084fc !important;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.65));
}

.nav-item-bottom:not(.active):hover {
  color: #f8f5ff;
}

.nav-item-bottom:not(.active):hover svg {
  color: #f8f5ff;
}

/* App content container with perfect bottom spacing for persistent nav */
.app-content-container {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
}

/* Floating Customer Support Pill (Gift Box 0 + Headset) positioned on right edge */
#supportWidgetWrapper {
  right: 0 !important;
  top: 52% !important;
  transform: translateY(-50%) !important;
  bottom: auto !important;
  z-index: 998 !important;
}

#supportWidgetPopup {
  max-width: calc(100vw - 1.5rem) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #06030d;
}

::-webkit-scrollbar-thumb {
  background: #28154c;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7c3aed;
}

/* View Transition Animation */
.view-section {
  animation: fadeSlideIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Input styling */
.mining-input {
  background: rgba(7, 3, 16, 0.9);
  border: 1px solid #28154c;
  color: #ffffff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mining-input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.7);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Filter pills */
.filter-pill-active {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #ffffff;
  border: 1px solid #c084fc;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.filter-pill-inactive {
  background: #0d071b;
  color: #9d8ec4;
  border: 1px solid #2d1b54;
}

.filter-pill-inactive:hover {
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  background: #150d2a;
}

.mining-input:focus {
  outline: none;
  background: rgba(11, 5, 24, 0.96);
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.28), inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Institutional & Cyber Web3 Glass Utilities */
.glass-panel-deep {
  background: linear-gradient(145deg, rgba(16, 9, 32, 0.95) 0%, rgba(10, 5, 20, 0.98) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 20px 45px -15px rgba(3, 1, 9, 0.85), inset 0 1px 0 rgba(192, 132, 252, 0.12);
  backdrop-filter: blur(24px);
}

.glass-panel-verified {
  background: linear-gradient(145deg, rgba(6, 32, 24, 0.92) 0%, rgba(4, 18, 14, 0.97) 100%);
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 18px 40px -12px rgba(6, 78, 59, 0.4), inset 0 1px 0 rgba(110, 231, 183, 0.2);
  backdrop-filter: blur(24px);
}

.osapay-terminal {
  background: radial-gradient(circle at 10% 10%, rgba(20, 10, 42, 0.95) 0%, rgba(8, 4, 18, 0.99) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.12);
}

/* ==========================================================
   INSTANT-LOAD CRITICAL LAYOUT UTILITIES & PERFORMANCE BOOSTS
   Ensures zero layout shift or blank flashes on mobile devices
   ========================================================== */
.hidden {
  display: none !important;
}

.flex {
  display: flex !important;
}

.items-center {
  align-items: center;
}

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

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.text-white {
  color: #ffffff;
}

/* GPU Hardware Acceleration for Ambient Backgrounds */
.ambient-glow {
  transform: translateZ(0);
  will-change: transform;
  pointer-events: none;
}

.view-section.hidden {
  display: none !important;
}

.view-section:not(.hidden) {
  display: block !important;
}

/* ==========================================================
   EXECUTIVE HOME PAGE BEAUTIFICATION & LUXURY ACCENTS
   ========================================================== */
.text-gradient-gold-purple {
  background: linear-gradient(135deg, #ffffff 0%, #e9d5ff 45%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-quick-action {
  background: linear-gradient(160deg, rgba(26, 15, 52, 0.92) 0%, rgba(13, 7, 26, 0.96) 100%);
  border: 1px solid rgba(139, 92, 246, 0.32);
  box-shadow: 0 10px 26px -8px rgba(5, 2, 12, 0.85), inset 0 1px 0 rgba(216, 180, 254, 0.14);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-quick-action:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.75);
  background: linear-gradient(160deg, rgba(36, 20, 72, 0.96) 0%, rgba(19, 10, 38, 0.98) 100%);
  box-shadow: 0 16px 34px -8px rgba(88, 28, 135, 0.55), 0 0 20px -4px rgba(139, 92, 246, 0.3), inset 0 1px 0 rgba(233, 213, 255, 0.25);
}

.pillar-card-glow {
  background: radial-gradient(120% 120% at 100% 0%, rgba(139, 92, 246, 0.14) 0%, rgba(14, 7, 30, 0.95) 65%);
  border: 1px solid rgba(76, 29, 149, 0.55);
  box-shadow: 0 12px 30px -10px rgba(2, 0, 8, 0.8), inset 0 1px 0 rgba(192, 132, 252, 0.1);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillar-card-glow:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 18px 38px -10px rgba(76, 29, 149, 0.45), 0 0 24px -6px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(216, 180, 254, 0.22);
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.animate-float-slow {
  animation: float-slow 5s ease-in-out infinite;
}


