/* Common CSS - Styles shared between themes */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* Base animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Layout */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
}

.left-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  height: 40px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.loginBtn, .demo-btn, .sign-up-btn {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.loginBtn {
  padding: 0.6rem 1.4rem;
}

.loginBtn:hover, .demo-btn:hover, .sign-up-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.25);
}

.loginBtn:active, .demo-btn:active, .sign-up-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Theme Toggle Switch */
.theme-toggle {
  position: relative;
  display: inline-block;
}

.theme-switch {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 30px;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  padding: 0 5px;
  transition: background-color 0.3s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}

.switch-ball {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-switch:checked + .switch-label .switch-ball {
  transform: translateX(30px);
}

.sun-icon, .moon-icon {
  font-size: 16px;
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 7rem 1rem 5rem;
  animation: fadeIn 0.8s ease-out forwards;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.3;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.demo-btn {
  padding: 0.9rem 2.2rem;
  font-size: 1.1rem;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 5rem 0;
}

.feature-card {
  padding: 2.2rem;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.5s ease forwards;
  animation-fill-mode: both;
  animation-delay: calc(var(--card-index) * 0.1s);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary-color);
  transition: height 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
  height: 40%;
}

.feature-icon {
  width: 65px;
  height: 65px;
  border-radius: 16px;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.15);
}

.feature-icon i {
  font-size: 28px;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.2);
}

.feature-card:hover .feature-icon i {
  transform: scale(1.1);
}

.feature-card h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

/* App Highlights */
.app-highlights {
  text-align: center;
  padding: 5rem 2rem;
  border-radius: 24px;
  margin: 4rem 0;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.app-highlights h2 {
  margin-bottom: 3.5rem;
  font-size: 2.2rem;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-align: left;
  transition: transform 0.3s ease;
  animation: slideInRight 0.5s ease forwards;
  animation-fill-mode: both;
  animation-delay: calc(var(--item-index) * 0.1s);
}

.highlight-item:hover {
  transform: translateX(5px);
}

.highlight-icon {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

.highlight-icon i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.highlight-item:hover .highlight-icon {
  transform: scale(1.1) rotate(5deg);
}

/* CTA Section */
.cta {
  text-align: center;
  padding: 6rem 1rem;
  margin: 2rem 0;
  position: relative;
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.cta h2 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
}

.cta p {
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

.sign-up-btn {
  padding: 1rem 2.8rem;
  font-size: 1.1rem;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Footer */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0;
  gap: 1.5rem;
  margin-top: 4rem;
  transition: all 0.4s ease;
}

.footer-links {
  display: flex;
  gap: 2.5rem;
}

.footer-links a {
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.footer-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-copyright {
  font-size: 0.9rem;
}

/* Improved alignment for theme toggle and logo */
.left-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .left-nav {
    gap: 12px;
  }
  
  .feature-icon {
    width: 55px;
    height: 55px;
  }
  
  .feature-icon i {
    font-size: 24px;
  }
  
  .highlight-icon {
    width: 38px;
    height: 38px;
  }
  
  .highlight-icon i {
    font-size: 18px;
  }
}

/* Intersection Observer classes for scroll animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-scale-in.visible {
  opacity: 1;
  transform: scale(1);
}