:root {
  /* Primary colors */
  --primary-purple: #6C63FF;
  --primary-cyan: #00D9FF;
  
  /* Background colors */
  --bg-dark: #0A0E21;
  --bg-card: #1D1E33;
  --bg-card-light: #2D2E43;
  
  /* Practice type colors */
  --color-listening: #00D9FF;
  --color-writing: #FF9F43;
  --color-reading: #26DE81;
  --color-speaking: #FF6B9D;
  
  /* Text colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0C3;
  --text-muted: #6C6C7E;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-purple), var(--primary-cyan));
  --gradient-bg: linear-gradient(180deg, #0A0E21, #1A1F3A);
  
  /* Spacing */
  --section-padding: 80px 20px;
  --container-max: 1200px;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* English subtext for bilingual display */
.english-subtext {
  display: block;
  font-size: 0.75em;
  opacity: 0.7;
  margin-top: 0.25em;
}

/* ==================== Header ==================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 14, 33, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Selector */
.language-selector-wrapper {
  position: relative;
}

.language-selector {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B0B0C3' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.language-selector:focus {
  outline: none;
  border-color: var(--primary-purple);
}

/* ==================== Hero Section ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(108, 99, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 217, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

/* Background particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: float-particle 10s infinite ease-in-out;
}

.particle:nth-child(odd) {
  background: var(--primary-purple);
  box-shadow: 0 0 10px var(--primary-purple);
}

.particle:nth-child(even) {
  background: var(--primary-cyan);
  box-shadow: 0 0 10px var(--primary-cyan);
}

@keyframes float-particle {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
  50% { transform: translateY(-20px) translateX(10px); opacity: 0.8; }
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

/* Uncle Avatar */
.uncle-avatar-container {
  margin-bottom: 40px;
  display: inline-block;
}

.uncle-avatar {
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(108, 99, 255, 0.5))
          drop-shadow(0 0 60px rgba(0, 217, 255, 0.3));
}

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

/* Eye blink animation */
.uncle-avatar .eye-white,
.uncle-avatar .pupil,
.uncle-avatar .eye-highlight {
  animation: blink 4s infinite;
}

@keyframes blink {
  0%, 45%, 55%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.1); opacity: 0; }
}

.uncle-avatar .closed-eye {
  animation: blink-line 4s infinite;
}

@keyframes blink-line {
  0%, 45%, 55%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Glow pulse */
.uncle-avatar .glow-circle {
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.hero-title {
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(108, 99, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: var(--bg-card-light);
  border-color: var(--primary-purple);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary-purple);
}

.btn-outline:hover {
  background: var(--primary-purple);
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* Play Store Badge */
.play-store-badge {
  height: 48px;
  transition: transform 0.3s ease;
}

.play-store-badge:hover {
  transform: scale(1.05);
}

/* ==================== Languages Section ==================== */
.languages-section {
  padding: var(--section-padding);
  background: rgba(29, 30, 51, 0.3);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.language-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.language-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-purple);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.2);
}

.language-native {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.language-english {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==================== Practice Types Section ==================== */
.practice-section {
  padding: var(--section-padding);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.practice-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.practice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color);
}

.practice-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.practice-card.listening { --card-color: var(--color-listening); }
.practice-card.speaking { --card-color: var(--color-speaking); }
.practice-card.reading { --card-color: var(--color-reading); }
.practice-card.writing { --card-color: var(--color-writing); }

.practice-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--card-color);
}

.practice-icon svg {
  width: 32px;
  height: 32px;
}

.practice-card h3 {
  margin-bottom: 12px;
  color: var(--card-color);
}

.practice-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==================== Journey Section ==================== */
.journey-section {
  padding: var(--section-padding);
  background: rgba(29, 30, 51, 0.3);
}

.journey-content {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 48px;
}

.journey-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 24px;
  top: 50px;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary-purple), var(--primary-cyan));
}

.step-dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-dot.beginner {
  background: linear-gradient(135deg, #26DE81, #20C997);
}

.step-dot.intermediate {
  background: linear-gradient(135deg, #FF9F43, #F7931A);
}

.step-dot.advanced {
  background: linear-gradient(135deg, #FF6B9D, #FF4757);
}

.step-info h4 {
  margin-bottom: 4px;
}

.step-info p {
  font-size: 0.9rem;
}

.journey-text {
  flex: 1;
}

.journey-text h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.journey-text p {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

/* ==================== Download Section ==================== */
.download-section {
  padding: var(--section-padding);
  text-align: center;
}

.download-content {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.download-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.download-content h2 {
  margin-bottom: 12px;
}

.download-content .section-subtitle {
  margin-bottom: 32px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ==================== Footer ==================== */
footer {
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-love {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-love .heart {
  color: #FF6B9D;
}

.footer-links {
  display: flex;
  gap: 24px;
}

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

.footer-links a:hover {
  color: var(--primary-purple);
}

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

/* ==================== Install Modal ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal h3 {
  margin-bottom: 16px;
}

.modal ol {
  text-align: left;
  padding-left: 24px;
  margin: 20px 0;
}

.modal li {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

/* ==================== Animations ==================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.4s; }

.stagger-children.animate-in > * {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 16px;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    padding: 100px 16px 60px;
    min-height: auto;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 20px;
  }

  .btn {
    justify-content: center;
  }

  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .language-card {
    padding: 16px;
  }

  .language-native {
    font-size: 1.25rem;
  }

  .practice-grid {
    grid-template-columns: 1fr;
  }

  .journey-content {
    flex-direction: column;
    gap: 40px;
  }

  .journey-visual {
    order: 1;
  }

  .journey-text {
    order: 2;
    text-align: center;
  }

  .download-content {
    padding: 40px 24px;
  }

  .download-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .uncle-avatar-container {
    transform: scale(0.85);
  }

  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .language-native {
    font-size: 1.1rem;
  }

  .language-english {
    font-size: 0.8rem;
  }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  .languages-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}
