@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;600;700;900&display=swap');

/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99,102,241,0.3);
  --green: #22c55e;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --cyan: #06b6d4;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255,255,255,0.08);
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Animated Background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.bg-glow.g1 {
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
}

.bg-glow.g2 {
  bottom: -400px;
  right: -200px;
  background: var(--cyan);
  opacity: 0.08;
}

.bg-glow.g3 {
  bottom: 200px;
  left: -300px;
  background: var(--rose);
  opacity: 0.06;
}

/* ===== Container ===== */
.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Hero Section ===== */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 60px var(--accent-glow);
  overflow: hidden;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero p.desc {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-tags .tag {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-note strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Stats Section ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 100px;
}

.stat {
  background: var(--bg-primary);
  padding: 32px 24px;
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.stat-value.v-accent { color: var(--accent-light); }
.stat-value.v-green { color: var(--green); }
.stat-value.v-amber { color: var(--amber); }
.stat-value.v-cyan { color: var(--cyan); }

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .overline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Features Section ===== */
.features {
  margin-bottom: 100px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

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

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.12);
}

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

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

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.fi-scan {
  background: rgba(99,102,241,0.15);
  color: var(--accent-light);
}

.fi-tree {
  background: rgba(6,182,212,0.15);
  color: var(--cyan);
}

.fi-migrate {
  background: rgba(34,197,94,0.15);
  color: var(--green);
}

.fi-safe {
  background: rgba(244,63,94,0.15);
  color: var(--rose);
}

.fi-game {
  background: rgba(245,158,11,0.15);
  color: var(--amber);
}

.fi-history {
  background: rgba(168,85,247,0.15);
  color: #a855f7;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Workflow Section ===== */
.workflow {
  margin-bottom: 100px;
}

.flow-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 40px 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.flow-step .step-num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.flow-step .step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.flow-step .step-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 120px;
  text-align: center;
}

.flow-arrow {
  font-size: 24px;
  color: var(--text-muted);
  margin: 0 16px;
  margin-bottom: 30px;
}

/* ===== Safety Section ===== */
.safety {
  margin-bottom: 100px;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.safety-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.safety-card .s-icon {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.safety-card .s-icon svg {
  width: 32px;
  height: 32px;
}

.sc-safe .s-icon svg {
  color: var(--green);
}

.sc-action .s-icon svg {
  color: var(--amber);
}

.sc-blocked .s-icon svg {
  color: var(--rose);
}

.sc-critical .s-icon svg {
  color: #ef4444;
}

.safety-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.safety-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.sc-safe h4 { color: var(--green); }
.sc-action h4 { color: var(--amber); }
.sc-blocked h4 { color: var(--rose); }
.sc-critical h4 { color: #ef4444; }

/* ===== Performance Section ===== */
.perf {
  margin-bottom: 100px;
}

.perf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.perf-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.perf-num {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
  min-width: 110px;
  text-align: right;
}

.perf-num .unit {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.perf-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.perf-text p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Tech Stack Section ===== */
.tech {
  margin-bottom: 100px;
}

.tech-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tech-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.tech-pill:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

.tech-pill .tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.td-rust { background: #dea584; }
.td-vue { background: #42b883; }
.td-ts { background: #3178c6; }
.td-tauri { background: #ffc131; }
.td-sqlite { background: #003b57; border: 1px solid #0078a8; }
.td-ntfs { background: #0078d6; }

/* ===== CTA Section ===== */
.cta {
  text-align: center;
  padding: 80px 0;
  margin-bottom: 40px;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, var(--accent-glow), transparent);
  opacity: 0.3;
  pointer-events: none;
}

.cta h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.cta p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
}

.cta .btn {
  position: relative;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-primary);
}

/* ===== Separator ===== */
.sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto 100px;
  max-width: 600px;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .perf-grid {
    grid-template-columns: 1fr;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .safety-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 {
    font-size: 36px;
  }
}

/* ===== Utility Classes ===== */
.feature-card.wide {
  grid-column: span 2;
}

.feature-card.full {
  grid-column: span 3;
}

/* ===== Dropdown Menu for Downloads ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-width: 290px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(99,102,241,0.25);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* Show on hover or click active */
.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(8px);
  pointer-events: auto;
}

.dropdown:hover .chevron,
.dropdown.active .chevron {
  transform: rotate(180deg);
}

/* Transparent bridge to prevent losing hover when moving mouse down to dropdown menu */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-item:active {
  transform: scale(0.98);
}

.dropdown-item .item-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.dropdown-item .item-text {
  display: flex;
  flex-direction: column;
}

.dropdown-item .item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.dropdown-item .item-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}
