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

:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --green-950: #052e16;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-950);
  color: var(--gray-100);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--green-500);
  color: #fff;
}

/* ─── Navigation ─── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(3, 7, 18, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  z-index: 1001;
}

.logo-icon {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.3));
  transition: transform 0.4s ease;
}

.nav-logo:hover .logo-icon {
  transform: rotate(-10deg) scale(1.05);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--green-500);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gray-50);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-100);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Hero ─── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(34, 197, 94, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(74, 222, 128, 0.06) 0%, transparent 50%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridShift 8s linear infinite;
}

@keyframes gridShift {
  0% { transform: translateY(0); }
  100% { transform: translateY(40px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-400);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  animation: fadeUp 1s ease-out 0.15s both;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.title-line {
  display: block;
  color: var(--gray-50);
  animation: fadeUp 1s ease-out 0.25s both;
}

.title-line.green {
  background: linear-gradient(135deg, #22c55e, #4ade80, #22c55e);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 1s ease-out 0.35s both, shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 560px;
  margin: 0 auto 36px;
  animation: fadeUp 1s ease-out 0.45s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 1s ease-out 0.55s both;
}

/* ─── Buttons ─── */

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

.btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: #fff;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gray-200);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.download-btn {
  flex-direction: column;
  gap: 2px;
  padding: 20px 40px;
  font-size: 1.1rem;
  min-width: 280px;
}

.btn-sub {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.8;
}

/* ─── Scroll Indicator ─── */

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ─── Section Common ─── */

section {
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-400);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--gray-50);
}

.section-header p {
  color: var(--gray-400);
  font-size: 1.05rem;
}

/* ─── Features ─── */

.features {
  background: var(--gray-900);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
}

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

.feature-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-500), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feature-icon.ghost { background: rgba(99, 102, 241, 0.1); color: #818cf8; }
.feature-icon.sparkles { background: rgba(251, 191, 36, 0.1); color: #fbbf24; }
.feature-icon.zap { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.feature-icon.shield { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.feature-icon.puzzle { background: rgba(236, 72, 153, 0.1); color: #f472b6; }
.feature-icon.refresh { background: rgba(52, 211, 153, 0.1); color: #34d399; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--gray-50);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ─── Download ─── */

.download {
  position: relative;
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.download-card {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  position: relative;
}

.download-version {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.version-badge {
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--green-600);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.version-info {
  color: var(--gray-400);
  font-size: 0.9rem;
}

.download-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.detail-item svg {
  color: var(--green-500);
}

.download-note {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ─── About / Stats ─── */

.about {
  background: var(--gray-900);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.stat:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ─── Footer ─── */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 60px 24px 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col a {
  display: block;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--green-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--gray-600);
}

/* ─── Animations on scroll ─── */

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(3, 7, 18, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 90px 24px 32px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .download-card {
    padding: 32px 24px;
  }

  .footer-container {
    flex-direction: column;
    gap: 32px;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 16px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .download-btn {
    min-width: auto;
    width: 100%;
  }
}

/* ─── Smooth entrance for cards ─── */

.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.05s; }
.feature-card:nth-child(3) { transition-delay: 0.1s; }
.feature-card:nth-child(4) { transition-delay: 0.15s; }
.feature-card:nth-child(5) { transition-delay: 0.2s; }

/* ─── Green animated accent line ─── */

.accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-300));
  border-radius: 3px;
  margin: 16px auto;
}

/* ─── Reviews ─── */

.reviews {
  background: var(--gray-900);
  position: relative;
}

.reviews::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
}

.reviews-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.review-form-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.review-form-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gray-50);
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: var(--gray-100);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--gray-500);
}

.star-picker {
  display: flex;
  gap: 4px;
  font-size: 1.6rem;
}

.star-picker .star {
  cursor: pointer;
  color: var(--gray-600);
  transition: color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.star-picker .star:hover,
.star-picker .star.active {
  color: #fbbf24;
}

.star-picker .star:hover {
  transform: scale(1.2);
}

.review-form-card .btn {
  margin-top: 4px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 20px 24px;
  animation: fadeUp 0.4s ease-out;
}

.review-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.review-nick {
  font-weight: 700;
  color: var(--gray-50);
  font-size: 0.95rem;
}

.review-stars {
  color: #fbbf24;
  font-size: 1rem;
  letter-spacing: 1px;
}

.review-desc {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.5;
}

.review-empty {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  padding: 40px 0;
}

.review-empty svg {
  margin-bottom: 12px;
  opacity: 0.3;
}

.review-count {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .review-form-card { padding: 24px 20px; }
  .review-item { padding: 16px 18px; }
}