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

:root {
  --purple-primary: #8B5CF6;
  --purple-light: #A855F7;
  --purple-dark: #6366F1;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-color: rgba(139, 92, 246, 0.2);
  --glow: rgba(139, 92, 246, 0.3);
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 10px var(--glow));
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--purple-light);
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  animation: pulse 4s ease-in-out infinite alternate;
  z-index: -1;
  will-change: opacity;
  transform: translateZ(0); /* Force hardware acceleration */
}

@keyframes pulse {
  0% { opacity: 0.5; }
  100% { opacity: 0.8; }
}

.hero-content {
  width: 100%;
  max-width: 1400px;
  z-index: 1;
  padding: 0 1rem; /* Prevent edge-touching on small screens */
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 30px var(--glow));
  animation: float 6s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--purple-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  background: var(--purple-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--purple-primary);
}

.version-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

.hero-screenshot {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(139, 92, 246, 0.2);
  margin-top: 1rem;
}

/* Features Section */
.features {
  padding: 6rem 0;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.feature-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--purple-light);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  text-wrap: balance;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  text-wrap: pretty;
}

/* Gallery Section */
.gallery {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.03) 50%, transparent 100%);
}

.gallery h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px; /* Signficantly wider for impact */
  margin: 0 auto;
  perspective: 1000px;
  height: 650px; /* Taller to fit the larger image */
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.carousel-item {
  position: absolute;
  width: 90%; 
  max-width: 1100px; /* Massive hookup size */
  aspect-ratio: 16/9.5;
  border-radius: 12px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  z-index: 0;
  opacity: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: visible; /* Allow caption to show below */
  will-change: transform, opacity; /* GPU acceleration */
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px; /* Match parent for clipping */
}

/* Active State (Center) */
.carousel-item.active {
  transform: translateX(0) scale(1) translateZ(0);
  z-index: 20;
  opacity: 1;
  border-color: var(--purple-primary);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.2);
  cursor: zoom-in; /* Explicitly show zoomability */
}

/* Next State (Right) */
.carousel-item.next {
  transform: translateX(65%) scale(0.6) translateZ(-100px) rotateY(-25deg);
  z-index: 10;
  opacity: 0.5;
  filter: brightness(0.5);
  cursor: pointer;
}

.carousel-item.next:hover {
  opacity: 0.8;
  filter: brightness(0.8);
  transform: translateX(60%) scale(0.65) translateZ(-50px) rotateY(-20deg);
}

/* Prev State (Left) */
.carousel-item.prev {
  transform: translateX(-65%) scale(0.6) translateZ(-100px) rotateY(25deg);
  z-index: 10;
  opacity: 0.5;
  filter: brightness(0.5);
  cursor: pointer;
}

.carousel-item.prev:hover {
  opacity: 0.8;
  filter: brightness(0.8);
  transform: translateX(-60%) scale(0.65) translateZ(-50px) rotateY(20deg);
}

/* Hidden States */
.carousel-item.hidden-left {
  transform: translateX(-150%) scale(0.4);
  opacity: 0;
  pointer-events: none;
}

.carousel-item.hidden-right {
  transform: translateX(150%) scale(0.4);
  opacity: 0;
  pointer-events: none;
}

.carousel-overlay {
  position: absolute;
  bottom: -2.5rem; /* Position below the image */
  left: 0;
  right: 0;
  background: transparent;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* Always show caption for active item */
.carousel-item.active .carousel-overlay {
  opacity: 1;
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: rgba(255, 255, 255, 0.4);
  font-size: 4rem; /* Larger font */
  font-weight: 300;
  cursor: pointer;
  z-index: 30; /* Higher than active item */
  padding: 0 1rem;
  transition: all 0.3s ease;
  user-select: none;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.15);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.carousel-nav.prev { 
    left: 10px; /* Give breathing room */
}
.carousel-nav.next { 
    right: 10px; /* Give breathing room */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .carousel-container {
    height: 300px;
  }
  
  .carousel-item {
    width: 85%;
  }
  
  .carousel-item.next,
  .carousel-item.prev {
    opacity: 0; /* Hide side items on mobile for cleaner look */
    pointer-events: none;
  }
  
  /* Reposition arrows outside the image on mobile */
  .carousel-nav {
    font-size: 2.5rem; /* Smaller on mobile */
    width: 50px;
    height: 50px;
    padding: 0;
  }
  
  .carousel-nav.prev {
    left: -5px; /* Push to screen edge */
  }
  
  .carousel-nav.next {
    right: -5px; /* Push to screen edge */
  }
}

/* Comparison Section */
.comparison {
  padding: 6rem 0;
}

.comparison h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.comparison-table {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.comparison-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.comparison-row:last-child {
  border-bottom: none;
}

.comparison-header {
  background: rgba(139, 92, 246, 0.1);
  font-weight: 600;
}

.comparison-feature {
  color: var(--text-primary);
}

.comparison-vanilla,
.comparison-kai {
  text-align: center;
  color: var(--text-secondary);
}

.icon-yes {
  color: #10b981;
}

.icon-no {
  color: #ef4444;
}

/* FAQ Section */
.faq {
  padding: 6rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.03) 50%, transparent 100%);
}

.faq h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.faq-item {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.faq-item h3 {
  color: var(--purple-light);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

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

.footer-brand img {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px var(--glow));
}

.footer-brand p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.footer-disclaimer {
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: var(--purple-light);
}

.footer-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 85%; /* Slightly reduced to make room for caption */
  position: absolute;
  top: 48%; /* Shifted up slightly */
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
}

#lightbox-caption {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  max-width: 80%;
  padding: 0.5rem 1rem;
  background: transparent;
  z-index: 10000;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--purple-light);
}

/* Navigation arrows - glassy text effect without background/borders */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color: rgba(255, 255, 255, 0.4) !important;
  cursor: pointer !important;
  transition: all 0.3s ease-out !important;
  font-size: 40px !important; /* Much larger arrows */
  font-weight: 300 !important;
  width: 70px !important;
  height: 70px !important;
  padding-bottom: 8px !important; /* Added padding for scaling buffer */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10001;
}

.lightbox-nav:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-50%) scale(1.15) !important; /* Reduced scale for better consistency */
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8),
    0 0 25px rgba(255, 255, 255, 0.6), 0 0 35px rgba(255, 255, 255, 0.4),
    2px 2px 3px rgba(0, 0, 0, 0.9) !important;
}

.lightbox-nav.prev {
  left: 2rem;
  padding-right: 30px;
}

.lightbox-nav.next {
  right: 2rem;
  padding-left: 30px;
}

.hero-screenshot {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.hero-screenshot:hover {
  transform: scale(1.01);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

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

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

  .features-grid,
  .gallery-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .comparison-row {
    grid-template-columns: 1.5fr 1fr 1fr;
    font-size: 0.9rem;
    padding: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
  
  /* Hide lightbox arrows on mobile - gestures only */
  .lightbox-nav {
    display: none !important;
  }
}
}