:root {
  --primary-color: #4caf50;
  --primary-hover: #388e3c;
  --primary-light: #e8f5e8;
  --secondary-color: #2196f3;
  --secondary-light: #e3f2fd;
  --accent-color: #ff9800;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --dark-text: #1a1a1a;
  --medium-text: #666;
  --light-text: #888;
  --border-light: #e0e0e0;
  --background-light: #f8f9fa;
  --white: #ffffff;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  color: var(--dark-text);
  overflow-x: hidden;
}

/* Enhanced Dark mode styles */
body.dark-mode {
  --dark-text: #e0e0e0;
  --medium-text: #bbb;
  --light-text: #999;
  --background-light: #1a1a1a;
  --border-light: #333;
  --white: #2a2a2a;
  background: #1a1a1a;
  color: var(--dark-text);
}

body.dark-mode .navbar {
  background: rgba(26, 26, 26, 0.95) !important;
  border-bottom: 1px solid #333;
}

body.dark-mode .hero-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

body.dark-mode .feature-card {
  background: #2a2a2a;
  border-color: #333;
}

/* Added dark mode styles for How it Works section */
body.dark-mode .how-it-works {
  background: #1a1a1a;
}

body.dark-mode .step-number {
  background: #388e3c;
}

body.dark-mode .section-title,
body.dark-mode .step-title {
  color: var(--dark-text);
}

body.dark-mode .section-subtitle,
body.dark-mode .step-description {
  color: var(--medium-text);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  padding: 15px 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px var(--shadow-light);
}

.navbar-brand {
  font-weight: 700;
  font-size: 24px;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand:hover {
  color: var(--primary-hover);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--dark-text);
  margin: 0 10px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
  background: var(--primary-light);
}

.btn-signup {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin-left: 10px;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-signup:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  color: white;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--medium-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  margin-left: 15px;
}

.theme-toggle:hover {
  background: var(--background-light);
  transform: scale(1.1);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%23e0e0e0" stroke-width="1" opacity="0.3"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--medium-text);
  margin-bottom: 30px;
  max-width: 600px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn-primary-large {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary-large:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
  color: white;
}

.btn-secondary-large {
  background: transparent;
  color: var(--dark-text);
  border: 2px solid var(--border-light);
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary-large:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.hero-image {
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-dashboard {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: var(--transition);
}

.hero-dashboard:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* Features Section */
.features-section {
  padding: 80px 0;
  background: var(--background-light);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark-text);
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--medium-text);
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.feature-card {
  background: white;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 20px var(--shadow-light);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-light);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: white;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-text);
}

.feature-description {
  color: var(--medium-text);
  line-height: 1.6;
}

/* How it Works Section */
.how-it-works {
  padding: 80px 0;
  background: var(--white); /* Changed from fixed white to variable */
  transition: var(--transition);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.step-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-text);
}

.step-description {
  color: var(--medium-text);
  line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

/* Scroll animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 60px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .navbar-nav {
    text-align: center;
    margin-top: 20px;
  }

  .hero-dashboard {
    transform: none;
  }
}

/* Loading Animation */
.loading {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
