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

html {
  scroll-behavior: initial !important;
}

html, body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

:root {
  --bg-dark: #020617;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.6);
}

body {
  font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
  background-color: var(--bg-dark);
  color: white;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Light Mode Support */
:root {
    --bg-light: #f4f7ff;
    --text-primary-light: #0f172a;
    --text-secondary-light: #475569;
    --glass-light: rgba(255, 255, 255, 0.7);
    --border-light: rgba(0, 0, 0, 0.08);
}

.light-mode {
    --bg-dark: var(--bg-light);
    color: var(--text-primary-light) !important;
}

.light-mode body {
    background-color: var(--bg-light);
}

.light-mode #bg-canvas {
    background: radial-gradient(circle at 50% -20%, #dbeafe 0%, #f4f7ff 80%);
}

.light-mode .glass {
    background: var(--glass-light);
    border-color: var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.light-mode .text-gray-400, 
.light-mode .text-gray-500, 
.light-mode .text-gray-600 {
    color: var(--text-secondary-light) !important;
}

.light-mode .text-white {
    color: var(--text-primary-light) !important;
}

.light-mode .fancy-button {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.light-mode #main-nav {
    background: rgba(255, 255, 255, 0.8) !important;
}

.light-mode .icon-box {
    background: rgba(59, 130, 246, 0.1) !important;
}

.footer-bg-sync {
    background-color: #01040a;
}

/* Light Mode Overrides for Specific Elements */
.light-mode #main-nav {
    background: rgba(255, 255, 255, 0.9) !important;
}

.light-mode #main-nav span {
    color: #0f172a !important;
    background: none !important;
    -webkit-text-fill-color: currentcolor !important;
}

.light-mode #main-nav .nav-link {
    color: #64748b !important;
}

.light-mode #main-nav .nav-link:hover,
.light-mode #main-nav .nav-link.active {
    color: #2563eb !important;
}

.light-mode #main-nav button i {
    color: #64748b !important;
}

.light-mode #main-nav button:hover i {
    color: #2563eb !important;
}

/* Sync Profile Tab and Other Elements */
.light-mode .tab-btn {
    color: #64748b !important;
}

.light-mode .tab-btn.active {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}

.light-mode .theme-card span {
    color: #0f172a !important;
}

.light-mode #profile-name-input {
    color: #0f172a !important;
}

.light-mode label {
    color: #64748b !important;
}

.light-mode .icon-box i {
    color: #2563eb !important;
}

.light-mode #bg-canvas {
    background: radial-gradient(circle at 50% -20%, #eff6ff 0%, #f4f7ff 80%) !important;
}

.light-mode .bg-overlay {
    opacity: 0.05 !important;
}

.light-mode footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}

.light-mode footer span,
.light-mode footer p,
.light-mode footer h4,
.light-mode footer a {
    color: #475569 !important;
}

.light-mode footer h4 {
    color: #0f172a !important;
}

.light-mode footer .text-blue-500,
.light-mode footer .status-dot + span {
    color: #2563eb !important;
}

.light-mode footer .glass {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% -20%, #1e3a8a 0%, #020617 80%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
  opacity: 0.15;
  pointer-events: none;
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.fancy-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 10px 20px var(--accent-glow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.fancy-button:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px var(--accent-glow);
}

.page-transition {
  animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.page-section {
  display: none;
}
.page-section.active {
  display: block;
}

.nav-link {
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  color: #60a5fa;
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  transition: transform 0.4s ease;
}

.nav-link:hover::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
  color: #3b82f6;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 8px #3b82f6;
}

.download-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  display: none;
}
.download-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 15px var(--accent-glow);
  transition: width 0.1s linear;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
}

/* Footer & Extra Styles */
footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-glass {
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

/* Feature Card Icon Glow */
.icon-box {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(59, 130, 246, 0.02) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.2);
}
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #3b82f6, #60a5fa);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s ease;
  will-change: width;
}

/* Language Switcher */
.lang-btn {
  transition: all 0.3s;
}
.lang-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 5px 15px var(--accent-glow);
  color: white;
}
.lang-btn:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
}
.lang-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile Menu Support */
@media (max-width: 768px) {
  /* Fix navbar grid for Android/small screens */
  #main-nav {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    gap: 0.5rem;
  }

  /* Make sure the navbar doesn't overflow */
  nav {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Adjust links for mobile when open */
  #nav-links.flex-col {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    gap: 0.75rem;
  }

  /* Navbar Container when open */
  #main-nav.menu-open {
    background: rgba(2, 6, 23, 0.98);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  }

  /* Links styling */
  .nav-link {
    width: 100%;
    text-align: center;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background: linear-gradient(
      90deg,
      rgba(59, 130, 246, 0.15),
      rgba(59, 130, 246, 0.05)
    );
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
  }

  /* Ensure main content doesn't get hidden under fixed nav */
  main {
    padding-top: 130px !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  #toast-container {
    width: 90%;
    right: 5%;
    bottom: 20px;
    top: auto;
  }

  /* Android-specific smooth scroll feel */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* Download Page Button Animations */
@keyframes sweep {
  0% {
    transform: translateX(-100%) skewX(-30deg);
  }
  100% {
    transform: translateX(200%) skewX(-30deg);
  }
}

@keyframes pulse-border {
  0%,
  100% {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0px rgba(59, 130, 246, 0);
  }
  50% {
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
}

.btn-free {
  position: relative;
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: all 0.3s ease;
}
.btn-free:hover {
  background: rgba(255, 255, 255, 1) !important;
  color: #000 !important;
  border-color: #fff !important;
  transform: translateY(-2px);
}

.btn-pro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  animation: pulse-border 3s infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-pro:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
  filter: brightness(1.1);
}
.btn-pro::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-30deg);
  animation: sweep 4s infinite;
}

/* Footer Animations */
@keyframes footerShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
.footer-nav-link {
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  padding-left: 0;
}
.footer-nav-link:hover {
  color: #60a5fa !important;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
  padding-left: 12px;
}
.footer-nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: all 0.3s ease;
  transform: translateY(-50%);
  opacity: 0;
}
.footer-nav-link:hover::before {
  width: 8px;
  opacity: 1;
}
.footer-title-anim {
  background: linear-gradient(90deg, #fff, #3b82f6, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  transition: 0.5s;
  cursor: default;
}
.footer-title-anim:hover {
  background-position: right center;
  color: transparent;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Docs Page - Starfield Effect */
#starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: none; /* Hidden by default */
}

/* Show starfield only on docs page */
.docs-page #starfield-canvas {
  display: block !important;
}

/* Hide default particle background on docs page */
.docs-page #bg-canvas {
  display: none !important;
}

/* Cursor Follower Sparkle (Radiant Style) */
.sparkle-card {
  position: relative;
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.sparkle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 3;
}

.sparkle-card:hover::before {
  opacity: 1;
}

.sparkle-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s;
}

.sparkle-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}
/* Random Reward - Spinning Wheel Styles */
.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.1);
    background: conic-gradient(
        #3b82f6 0deg 90deg, 
        #10b981 90deg 180deg, 
        #a855f7 180deg 270deg, 
        #fbbf24 270deg 360deg
    );
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 5s cubic-bezier(0.15, 0, 0.15, 1);
    overflow: hidden;
}

.wheel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: #020617;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.wheel-inner-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 5;
    pointer-events: none;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 20;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

.wheel-segment-label {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Light mode overrides for wheel */
.light-mode .wheel {
    border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .wheel::after {
    background: white;
    border-color: rgba(0, 0, 0, 0.05);
}


/* --- Global Top Loading Bar --- */
#top-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    z-index: 10000;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    pointer-events: none;
}

#top-loading-bar.loading {
    animation: loading-bar-auto 10s cubic-bezier(0.1, 0.05, 0, 1) forwards;
}

@keyframes loading-bar-auto {
    0% { width: 0; }
    30% { width: 50%; }
    70% { width: 85%; }
    100% { width: 95%; }
}

#top-loading-bar.finish {
    width: 100% !important;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.5s ease 0.2s;
}

/* Base navigation tweaks */
.page-transition {
    animation: fade-up 0.4s ease-out;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

