@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Premium Dark Mode Colors */
  --bg-dark: #07090e;
  --surface-main: rgba(255, 255, 255, 0.02);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.08);
  
  /* Neons */
  --neon-purple: #9d4edd;
  --neon-blue: #00f5ff;
  --neon-green: #39ff14;
  --neon-pink: #ff007f;
  
  /* Typography */
  --text-main: #f8f9fa;
  --text-muted: #9ca3af;
  --font-family: 'Outfit', sans-serif;
  
  /* Transitions */
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Glows (Animated) */
body::before, body::after {
  content: '';
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
  animation: pulseGlow 10s infinite alternate ease-in-out;
  will-change: transform, opacity;
}
body::before { top: -20vh; left: -20vw; background: var(--neon-purple); }
body::after { bottom: 10vh; right: -20vw; background: var(--neon-blue); animation-delay: -5s; }

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.1; }
  100% { transform: scale(1.1) translate(5%, 5%); opacity: 0.2; }
}

/* Glassmorphism Utilities with Hover 3D */
.glass-panel {
  background: var(--surface-main);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-20deg); transition: 0.5s;
}

.glass-panel:hover::before { left: 150%; }

.glass-panel:hover {
  background: var(--surface-hover);
  border-color: rgba(0, 245, 255, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 245, 255, 0.1);
}

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
p { color: var(--text-muted); font-size: 1.15rem; }

/* Buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--neon-purple), #7b2cbf);
  color: white;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 25px rgba(157, 78, 221, 0.8), 0 10px 20px rgba(0,0,0,0.3);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-main);
  padding: 0.9rem 2.4rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  border: 2px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.navbar.scrolled { padding: 1rem 5%; background: rgba(7, 9, 14, 0.95); box-shadow: 0 5px 20px rgba(0,0,0,0.4); }
.logo { display:flex; align-items:center; }
.logo img { height: 50px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.4)); transition: var(--transition); }
.logo img:hover { transform: scale(1.05) rotate(-2deg); }
.nav-links a { margin-left: 2rem; color: var(--text-main); text-decoration: none; font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--neon-blue); text-shadow: 0 0 10px rgba(0, 245, 255, 0.5); }

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  padding-top: 80px; 
}
.hero-p { max-width: 600px; margin: 1.5rem auto 3rem; animation: fadeUp 1s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Grid Layouts */
.container { padding: 6rem 5%; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }

/* Pricing Cards */
.pricing-card { text-align: center; padding: 3rem 2.5rem; }
.pricing-card h3 { font-size: 2rem; margin-bottom: 1rem; }
.pricing-amount { font-size: 4rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.5rem; text-shadow: 0 0 20px rgba(255,255,255,0.1); }
.pricing-features { list-style: none; margin: 2rem 0; text-align: left; }
.pricing-features li { margin-bottom: 1.2rem; display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 1.05rem; }
.pricing-features li::before { content: '✓'; color: var(--neon-green); font-weight: bold; background: rgba(57, 255, 20, 0.1); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Premium Card Overrides */
.pricing-card.premium { border-color: rgba(157, 78, 221, 0.5); position: relative; }
.pricing-card.premium::before { display: none; /* Disable default skew glare */ }
.pricing-card.premium { box-shadow: 0 0 30px rgba(157, 78, 221, 0.15); }
.pricing-card.premium:hover { box-shadow: 0 0 40px rgba(157, 78, 221, 0.3); border-color: var(--neon-purple); }
.best-value-badge {
  position: absolute; top: 20px; right: -40px; background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
  color: white; font-size: 0.8rem; font-weight: 800; padding: 5px 40px; transform: rotate(45deg); letter-spacing: 1px; box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

/* Toast Notifications (Live Payouts) */
.toast-container { position: fixed; bottom: 2rem; left: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 1rem; pointer-events: none; }
.toast {
  background: rgba(15, 15, 20, 0.95); backdrop-filter: blur(15px);
  border-left: 4px solid var(--neon-green); border-radius: 8px;
  padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(57, 255, 20, 0.1);
  transform: translateX(-150%);
  animation: slideIn 0.5s forwards cubic-bezier(0.25, 0.8, 0.25, 1), fadeOut 0.5s 6s forwards;
}
.toast-icon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(57, 255, 20, 0.1);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.toast-content { flex: 1; }
.toast-title { color: white; font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.toast-desc { color: var(--text-muted); font-size: 0.85rem; }
.toast-desc strong { color: var(--neon-green); }

@keyframes slideIn { to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(20px); } }

/* ============================================
   CENTERED POPUP / MODAL STYLES
   For JS popups - ensures perfect centering
   ============================================ */
.modal-overlay,
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active,
.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container,
.popup-container {
  background: rgba(15, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  padding: 2rem;
  max-width: 90%;
  width: 450px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(157, 78, 221, 0.2);
  animation: modalFadeIn 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  margin: 0 auto;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
  .modal-container,
  .popup-container {
    width: 90%;
    padding: 1.5rem;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .modal-container,
  .popup-container {
    width: 92%;
    padding: 1.25rem;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-container h3,
.popup-container h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-container p,
.popup-container p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-close,
.popup-close {
  background: linear-gradient(135deg, var(--neon-purple), #7b2cbf);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-size: 1rem;
}

.modal-close:hover,
.popup-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.5);
}

/* Additional utility for any generic centered popup */
.centered-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

/* Footer */
footer { padding: 3rem 5%; text-align: center; border-top: 1px solid var(--border-light); margin-top: 5rem; }
footer p { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Optimized for all devices without lag
   ============================================ */
@media (max-width: 850px) {
  .navbar { 
    flex-direction: column; 
    gap: 0.8rem; 
    padding: 1rem;
  }
  .nav-links { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 0.5rem;
  }
  .nav-links a { 
    margin-left: 0; 
    padding: 0.5rem 1rem; 
    font-size: 0.9rem;
  }
  .hero { 
    padding-top: 140px;
  }
  h1 { 
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }
  .grid-3 { 
    grid-template-columns: 1fr; 
  }
  .glass-panel { 
    padding: 1.5rem;
  }
  .toast-container { 
    left: 1rem; 
    bottom: 1rem; 
    right: auto;
    flex-direction: column;
  }
  .toast { 
    width: calc(100vw - 2rem);
    max-width: 320px;
    align-items: flex-start;
  }
  
  .dashboard-container { 
    padding-top: 140px;
  }
  .stats-grid { 
    grid-template-columns: 1fr;
  }
  .action-panel { 
    flex-direction: column; 
    text-align: center; 
    gap: 1.5rem;
  }
  .matrix-section { 
    padding: 1.5rem 1rem;
  }
  .tree { 
    margin-top: 1.5rem; 
    transform: scale(0.85); 
    transform-origin: top center;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 4rem 1.5rem;
  }
  .section-header {
    margin-bottom: 2.5rem;
  }
  .pricing-card {
    padding: 2rem 1.5rem;
  }
  .pricing-amount {
    font-size: 3rem;
  }
  .best-value-badge {
    top: 15px;
    right: -30px;
    padding: 4px 30px;
    font-size: 0.7rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  p {
    font-size: 1rem;
  }
  .hero-p {
    margin: 1rem auto 2rem;
  }
  .btn-primary, .btn-outline {
    padding: 0.75rem 1.8rem;
    font-size: 1rem;
  }
  .navbar .logo img {
    height: 40px;
  }
}

@media (max-width: 480px) {
  .pricing-amount { 
    font-size: 2.5rem; 
  }
  .timer { 
    font-size: 1.5rem; 
  }
  .hero-actions { 
    flex-direction: column; 
    width: 100%;
    gap: 1rem;
  }
  .btn-primary, .btn-outline { 
    width: 100%; 
    padding: 0.85rem; 
    text-align: center;
  }
  .glass-panel {
    padding: 1.25rem;
  }
  .pricing-features li {
    font-size: 0.95rem;
    gap: 8px;
  }
  .modal-container h3,
  .popup-container h3 {
    font-size: 1.5rem;
  }
  .toast {
    padding: 0.75rem 1rem;
  }
  .toast-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* Performance optimizations: prevent layout shifts and improve rendering */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}