/* ============================================
   NeoSecurity Official Website
   Design: Modern dark, glass-morphism, animated
   ============================================ */

:root {
  --bg: #090b10;
  --bg-alt: #0f1117;
  --surface: #141820;
  --surface-hover: #1a1f2b;
  --border: #1e2533;
  --border-light: #2a3140;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-muted: #555d6b;
  --primary: #4f8ff7;
  --primary-glow: rgba(79, 143, 247, 0.18);
  --green: #34d399;
  --amber: #f59e0b;
  --red: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ========== NAVIGATION ========== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.header.scrolled { background: rgba(9, 11, 16, 0.92); }

.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; text-decoration: none;
  color: var(--text);
}
.logo span {
  background: linear-gradient(135deg, #4f8ff7, #818cf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--text-dim); text-decoration: none; font-size: 14.5px;
  font-weight: 500; transition: color 0.2s; position: relative;
}
.nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
  transform: scaleX(0); transition: transform 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 180px 0 120px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,143,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,143,247,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 70%);
}

.hero-bg-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: flex; align-items: center; gap: 60px;
  position: relative; z-index: 1;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-block; padding: 4px 14px;
  background: rgba(79,143,247,0.12); border: 1px solid rgba(79,143,247,0.25);
  border-radius: 20px; font-size: 13px; color: var(--primary);
  margin-bottom: 20px; font-weight: 500;
}

.hero-text h1 {
  font-size: 52px; font-weight: 800; line-height: 1.2; margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #4f8ff7 0%, #818cf8 50%, #4f8ff7 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

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

.hero-desc {
  font-size: 17px; color: var(--text-dim); max-width: 480px;
  margin-bottom: 32px; line-height: 1.8;
}

.hero-actions { display: flex; gap: 14px; align-items: center; }

.hero-visual { flex-shrink: 0; position: relative; }

.hero-shield-wrap { position: relative; }

.hero-shield .shield-path {
  animation: shieldFloat 4s ease-in-out infinite;
}

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

.hero-stats-float {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 24px;
}

.stat-mini {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 18px;
  text-align: center; min-width: 90px;
  backdrop-filter: blur(8px);
}
.stat-num {
  display: block; font-size: 22px; font-weight: 700;
  color: var(--primary);
}
.stat-label {
  display: block; font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: all 0.25s;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #4f8ff7, #3b82f6);
  color: white; border-color: transparent;
  box-shadow: 0 4px 20px rgba(59,130,246,0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(59,130,246,0.45);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover {
  border-color: var(--primary);
  background: rgba(79,143,247,0.08);
  color: var(--primary);
}
.btn-sm {
  padding: 6px 14px; font-size: 13px; border-radius: 6px;
}

/* ========== SECTIONS ========== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center; margin-bottom: 56px;
}
.section-tag {
  display: inline-block; padding: 4px 14px;
  background: rgba(79,143,247,0.08); border: 1px solid rgba(79,143,247,0.18);
  border-radius: 20px; font-size: 12px; color: var(--primary);
  font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 36px; font-weight: 700; margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.section-head p { font-size: 16px; color: var(--text-dim); }

/* ========== CARD ========== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  transition: all 0.3s;
}
.card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.30);
}

/* ========== FEATURES GRID ========== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}

.card.feature { position: relative; overflow: hidden; }

.card-icon {
  font-size: 32px; margin-bottom: 14px;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--icon-color) 10%, transparent);
  border-radius: 12px;
}

.card.feature h3 {
  font-size: 17px; font-weight: 600; margin-bottom: 8px;
}
.card.feature p {
  font-size: 14px; color: var(--text-dim); line-height: 1.7;
}

.card-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; padding: 2px 8px;
  background: rgba(79,143,247,0.10); color: var(--primary);
  border-radius: 4px; font-weight: 500;
}

/* ========== FLOW ========== */
.flow {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0; flex-wrap: wrap;
}

.flow-step {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; width: 160px;
}

.flow-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #4f8ff7, #3b82f6);
  color: white; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(59,130,246,0.30);
}

.flow-body h4 {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
}
.flow-body p {
  font-size: 12.5px; color: var(--text-dim); line-height: 1.5;
}

.flow-arrow {
  font-size: 28px; color: var(--text-muted);
  padding-top: 8px; margin: 0 -6px;
  user-select: none;
}

/* ========== ENGINES ========== */
.engines-grid {
  display: flex; flex-direction: column; gap: 14px; max-width: 800px;
  margin: 0 auto;
}

.engine-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 28px;
  transition: all 0.25s;
}
.engine-card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateX(4px);
}

.engine-icon { font-size: 30px; flex-shrink: 0; }

.engine-info h3 {
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.engine-info p {
  font-size: 13.5px; color: var(--text-dim);
  margin-bottom: 2px;
}
.engine-type {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.badge {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  font-weight: 600; letter-spacing: 0.5px;
}
.badge-online { background: rgba(52,211,153,0.15); color: var(--green); }
.badge-local { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge-cloud { background: rgba(129,140,248,0.15); color: #818cf8; }

/* ========== API NOTE ========== */
.api-note {
  margin-top: 28px; text-align: center;
  padding: 14px 24px;
  background: rgba(79,143,247,0.05); border: 1px solid rgba(79,143,247,0.12);
  border-radius: var(--radius-sm); max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.api-note p {
  font-size: 13px; color: var(--text-dim);
}

/* ========== DOWNLOAD ========== */
.download-grid {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
}

.download-card {
  flex: 1; min-width: 300px; max-width: 420px;
  text-align: center; padding: 40px 32px;
}

.download-icon { font-size: 40px; margin-bottom: 16px; }

.download-card h3 { font-size: 20px; margin-bottom: 6px; }
.download-card > p { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }

.download-card ul {
  list-style: none; text-align: left; margin: 0 auto 24px;
  max-width: 240px;
}
.download-card ul li {
  font-size: 13.5px; color: var(--text-dim); padding: 4px 0;
}
.download-card ul li::before {
  content: "✓ "; color: var(--green); font-weight: 700;
}

.version-bar {
  margin-top: 48px; text-align: center;
  padding: 16px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  gap: 8px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.version-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.5); }
}
.version-sep { color: var(--text-muted); }
.version-bar strong { color: var(--green); }

/* ========== ABOUT ========== */
.about-grid {
  display: flex; gap: 32px; align-items: stretch;
}

.about-text {
  flex: 1;
  font-size: 15px; color: var(--text-dim); line-height: 1.8;
}
.about-text strong { color: var(--text); }

.tech-stack {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px;
}
.tech-stack span {
  padding: 4px 12px; font-size: 12px;
  background: rgba(79,143,247,0.08); color: var(--primary);
  border: 1px solid rgba(79,143,247,0.18);
  border-radius: 6px; font-weight: 500;
}

.warning-box {
  flex: 1; min-width: 300px;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius);
  padding: 28px;
}
.warning-icon { font-size: 36px; margin-bottom: 12px; }
.warning-box h3 { color: var(--red); font-size: 18px; margin-bottom: 12px; }
.warning-box p {
  font-size: 13.5px; color: var(--text-dim); margin-bottom: 6px; line-height: 1.6;
}
.warning-box p strong { color: var(--red); }

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-alt);
}

.footer-grid {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}

.footer-brand .logo { margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: var(--text-dim); }

.footer-links {
  display: flex; gap: 48px;
}
.footer-links h4 {
  font-size: 13px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.footer-links a {
  display: block; font-size: 13.5px; color: var(--text-dim);
  text-decoration: none; margin-bottom: 6px; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy { text-align: right; }
.footer-copy p { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.footer-warn { color: var(--red) !important; font-size: 12px !important; font-weight: 500; }
.footer-copy a { color: var(--text-dim); text-decoration: none; }
.footer-copy a:hover { color: var(--text); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-text h1 { font-size: 38px; }
  .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats-float { position: static; transform: none; margin-top: 24px; justify-content: center; }

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

  .flow { flex-direction: column; align-items: center; gap: 16px; }
  .flow-arrow { transform: rotate(90deg); margin: -8px 0; }

  .about-grid { flex-direction: column; }

  .download-grid { flex-direction: column; align-items: center; }
  .download-card { max-width: 100%; }

  .nav { display: none; }
  .menu-toggle { display: block; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 28px; gap: 16px;
  }
}

@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 30px; }
  .section { padding: 60px 0; }
  .engine-card { flex-direction: column; align-items: flex-start; }
  .footer-grid { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-copy { text-align: center; }
}
