:root {
  --primary-color: #007bff;
  --accent-color: #ff3333; /* Increased contrast for dark mode */
  --background-color: #1e1e1e;
  --text-color: #e0e0e0;
  --border-color: #444;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --gradient: linear-gradient(135deg, #007bff, #ff3333);
  --secondary-gradient: linear-gradient(135deg, #ff3333, #007bff);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.light {
  --background-color: #ffffff;
  --text-color: #1a1a1a;
  --border-color: #e0e0e0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --accent-color: #004080; /* Increased contrast for light mode */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  fill: var(--accent-color);
  transition: var(--transition);
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

body.light .logo-icon {
  fill: var(--primary-color);
}

h1 {
  font-size: 32px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover::after, .nav-link:focus::after {
  width: 100%;
}

.nav-link:hover, .nav-link:focus {
  color: var(--accent-color);
}

body.light .nav-link:hover, body.light .nav-link:focus {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-toggle:hover, .theme-toggle:focus {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(15deg);
}

body.light .theme-toggle:hover, body.light .theme-toggle:focus {
  background: rgba(0, 0, 0, 0.15);
}

.theme-icon {
  width: 24px;
  height: 24px;
  fill: var(--text-color);
  display: none;
}

.theme-icon.sun {
  display: block;
}

body.light .theme-icon.sun {
  display: none;
}

body.light .theme-icon.moon {
  display: block;
}

.hero {
  text-align: center;
  padding: 120px 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.15), rgba(255, 51, 51, 0.15), var(--background-color));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
  animation: gradientAnimation 8s infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"%3E%3Ccircle cx="5" cy="5" r="1" fill="rgba(255,255,255,0.1)" /%3E%3C/svg%3E') repeat;
  opacity: 0.3;
  animation: particleFloat 20s infinite linear;
}

@keyframes gradientAnimation {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100px);
  }
}

.hero h2 {
  font-size: 54px;
  font-weight: 700;
  margin-bottom: 28px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 22px;
  max-width: 800px;
  margin: 0 auto 36px;
  color: #bbb;
}

body.light .hero p {
  color: #555;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--gradient);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover, .btn:focus {
  background: linear-gradient(135deg, #0056b3, #cc3333);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat p {
  font-size: 16px;
  color: #bbb;
}

body.light .stat p {
  color: #555;
}

.features, .screenshots, .faq, .reviews, .cta {
  padding: 100px 0;
}

.features h2, .screenshots h2, .faq h2, .reviews h2, .cta h2 {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 56px;
  position: relative;
}

.features h2::after, .screenshots h2::after, .faq h2::after, .reviews h2::after, .cta h2::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.feature-grid, .faq-grid, .review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature-card, .faq-item, .review-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before, .faq-item::before, .review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.feature-card:hover::before, .faq-item:hover::before, .review-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover, .faq-item:hover, .review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.feature-icon {
  width: 52px;
  height: 52px;
  fill: var(--accent-color);
  margin-bottom: 20px;
  animation: iconBounce 2s infinite;
}

@keyframes iconBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

body.light .feature-icon {
  fill: var(--primary-color);
}

.feature-card h3, .faq-item h3, .review-card p {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

.feature-card p, .faq-item p {
  font-size: 16px;
  color: #bbb;
}

body.light .feature-card p, body.light .faq-item p {
  color: #555;
}

.review-card p {
  font-style: italic;
}

.review-author {
  font-size: 16px;
  color: #bbb;
  margin-top: 16px;
}

body.light .review-author {
  color: #555;
}

.screenshots .carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.carousel-inner {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.carousel-item {
  flex: 0 0 100%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: relative;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.carousel-item:hover img {
  transform: scale(1.02);
}

.carousel-item p {
  font-size: 18px;
  margin-top: 20px;
  color: #bbb;
}

body.light .carousel-item p {
  color: #555;
}

.carousel-prev, .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.carousel-prev:hover, .carousel-next:hover {
  background: var(--gradient);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.indicator {
  width: 12px;
  height: 12px;
  background: #aaa;
  border-radius: 50%;
  transition: var(--transition);
}

.indicator.active {
  background: var(--gradient);
  width: 16px;
  height: 16px;
}

body.light .indicator {
  background: #666;
}

.cta {
  text-align: center;
  padding: 100px 0;
  background: var(--secondary-gradient);
  color: #fff;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
  animation: gradientAnimation 10s infinite;
}

.cta h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 28px;
}

.cta p {
  font-size: 22px;
  max-width: 800px;
  margin: 0 auto 36px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cta .btn-primary:hover {
  background: #f0f0f0;
  color: #0056b3;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.footer {
  padding: 28px 0;
  background: var(--background-color);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: #aaa;
}

body.light .footer p {
  color: #666;
}

.footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  margin: 0 16px;
}

body.light .footer a {
  color: var(--accent-color);
}

.footer a:hover {
  text-decoration: underline;
  color: #cc3333;
}

body.light .footer a:hover {
  color: #003366;
}

.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-section.reveal {
  opacity: 1;
  transform: translateY(0);
}

.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 24px;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .hero {
    padding: 80px 0;
  }

  .hero h2 {
    font-size: 42px;
  }

  .hero p {
    font-size: 20px;
  }

  .stats {
    flex-direction: column;
    gap: 24px;
  }

  .features h2, .screenshots h2, .faq h2, .reviews h2, .cta h2 {
    font-size: 36px;
  }

  .cta h2 {
    font-size: 36px;
  }

  .cta p {
    font-size: 20px;
  }

  .carousel-prev, .carousel-next {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .hero h2 {
    font-size: 32px;
  }

  .hero p {
    font-size: 18px;
  }

  .feature-card, .faq-item, .review-card {
    padding: 20px;
  }

  .feature-card h3, .faq-item h3 {
    font-size: 20px;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .indicator {
    width: 10px;
    height: 10px;
  }

  .indicator.active {
    width: 14px;
    height: 14px;
  }
}