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

:root {
  /* Color Palette */
  --bg-start: #0A0817;
  --bg-end: #04030A;
  --surface: rgba(18, 14, 38, 0.6);
  --surface-light: rgba(30, 24, 61, 0.8);
  --surface-border: rgba(99, 102, 241, 0.15);
  --surface-border-hover: rgba(99, 102, 241, 0.4);
  --primary: #6366F1;
  --primary-light: #818CF8;
  --accent: #06B6D4;
  --accent-light: #22D3EE;
  --gold: #FFB000;
  --orange: #F97316;
  --error: #F43F5E;
  
  /* Text colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B3AFD6;
  --text-muted: #7E7A9C;
  
  /* Fonts */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Glows */
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.5);
  --glow-accent: 0 0 20px rgba(6, 182, 212, 0.5);
  --glow-orange: 0 0 20px rgba(249, 115, 22, 0.5);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-end);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-start);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Background Glowing Blurs */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, var(--bg-start) 0%, var(--bg-end) 100%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: float-orb 20s infinite ease-in-out alternate;
}

.orb-1 {
  top: 10%;
  left: 15%;
  width: 40vw;
  height: 40vw;
  background: var(--primary);
  animation-duration: 25s;
}

.orb-2 {
  bottom: 10%;
  right: 15%;
  width: 45vw;
  height: 45vw;
  background: var(--accent);
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  right: 25%;
  width: 35vw;
  height: 35vw;
  background: var(--orange);
  animation-duration: 22s;
  animation-delay: -10s;
  opacity: 0.1;
}

/* Canvas Particle */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition);
  padding: 1.5rem 0;
}

header.scrolled {
  background: rgba(10, 8, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  padding: 0.8rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-img {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  box-shadow: var(--glow-primary);
  border: 1px solid var(--surface-border-hover);
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFF 30%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.6rem 1.3rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--glow-primary);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.7);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Header specific container style */
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Sections Global */
section {
  padding: 6rem 0;
  position: relative;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFF 50%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--surface-border-hover);
  color: var(--primary-light);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-title {
  font-family: var(--font-title);
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #FFFFFF 40%, var(--primary-light) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 550px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(18, 14, 38, 0.8);
  border: 1px solid var(--surface-border-hover);
  padding: 0.8rem 1.8rem;
  border-radius: 16px;
  text-decoration: none;
  color: white;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.store-btn:hover {
  background: var(--surface-light);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--glow-accent);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.store-btn-text {
  display: flex;
  flex-direction: column;
}

.store-btn-text span:first-child {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.store-btn-text span:last-child {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-title);
}

.play-store-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
}

.play-store-btn:hover {
  box-shadow: var(--glow-primary);
  border: none;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 36px;
  padding: 8px;
  background: #111;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--glow-primary);
  border: 4px solid var(--surface-light);
  overflow: hidden;
}

.mockup-img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
}

.floating-card {
  position: absolute;
  background: var(--surface-light);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  padding: 1rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: float 4s infinite ease-in-out alternate;
}

.card-1 {
  top: 15%;
  left: -15%;
  animation-delay: 0s;
}

.card-2 {
  bottom: 15%;
  right: -15%;
  animation-delay: -2s;
}

.floating-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.floating-card-info h4 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
}

.floating-card-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* How It Works Section */
.how-it-works {
  background: rgba(10, 8, 23, 0.4);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.how-card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.how-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.how-card:hover {
  transform: translateY(-8px);
  border-color: var(--surface-border-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

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

.how-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.8rem;
  color: var(--primary-light);
  border: 1px solid var(--surface-border);
  transition: var(--transition);
}

.how-card:hover .how-icon-wrapper {
  background: rgba(99, 102, 241, 0.2);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
}

.how-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.how-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.step-number {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.how-card:hover .step-number {
  color: rgba(99, 102, 241, 0.15);
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
  flex-shrink: 0;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-light);
  box-shadow: var(--glow-accent);
}

.feature-info h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-info p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Levels Section */
.levels-container {
  overflow-x: auto;
  padding: 1rem 0;
  display: flex;
  gap: 1.5rem;
  mask-image: linear-gradient(to right, transparent, white 5%, white 95%, transparent);
}

.level-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 2rem;
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.level-card:hover {
  transform: scale(1.03);
  border-color: var(--surface-border-hover);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.level-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  align-self: flex-start;
}

.difficulty-easy {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.difficulty-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-hard {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.level-card h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.level-rule {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  min-height: 50px;
}

.level-meta {
  border-top: 1px solid var(--surface-border);
  padding-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.level-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.level-meta strong {
  color: var(--text-primary);
}

/* Categories Section */
.categories-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.category-card:hover {
  border-color: var(--surface-border-hover);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.category-card h4 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.category-tier {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Stats Section */
.stats {
  background: rgba(10, 8, 23, 0.6);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* CTA Section */
.cta {
  text-align: center;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.cta-content {
  max-width: 650px;
  margin: 0 auto;
}

.cta h2 {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: #020105;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--surface-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-links h4 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Privacy Policy Layout */
.privacy-page {
  padding-top: 8rem;
  padding-bottom: 6rem;
}

.privacy-content {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 32px;
  padding: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.privacy-content h1 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.privacy-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: block;
}

.privacy-body {
  color: var(--text-secondary);
}

.privacy-body h2 {
  font-family: var(--font-title);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.privacy-body p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
}

.privacy-body ul {
  list-style-type: square;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.privacy-body li {
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-15px); }
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10%, 15%) scale(1.1); }
}

.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-content {
    align-items: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-visual {
    order: -1;
  }
  .floating-card {
    display: none; /* Hide cards on mobile/tablet to avoid clutter */
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 4rem 0;
  }
  .nav-links, .nav-btn {
    display: none; /* Mobile menu handles this */
  }
  .mobile-menu-btn {
    display: block;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .privacy-content {
    padding: 1.5rem;
  }
}
