/* ============================================
   快连VPN v4 — 公共样式
   设计语言：Nebula 星空紫系
   主色：深空藏青 #060b1a
   渐变：indigo #6366f1 → purple #a855f7 → pink #ec4899
   ============================================ */

/* ---------- Reset & Root ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #060b1a;
  --bg-card:  #0c1229;
  --bg-card2: #111b3a;
  --surface:   rgba(12,18,41,0.85);
  --indigo:   #6366f1;
  --purple:   #a855f7;
  --pink:     #ec4899;
  --grad:      linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  --grad-text: linear-gradient(135deg, #a78bfa, #ec4899);
  --text:     #e2e8f0;
  --text2:    #94a3b8;
  --text-muted: #94a3b8;
  --border:    rgba(99,102,241,0.15);
  --border2:   rgba(168,85,247,0.2);
  --radius:    14px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
}

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

/* ---------- Starfield Background ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(167,139,250,0.5), transparent 100%),
    radial-gradient(1px 1px at 80% 70%, rgba(236,72,153,0.4), transparent 100%),
    radial-gradient(1.2px 1.2px at 50% 50%, rgba(99,102,241,0.3), transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(168,85,247,0.35), transparent 100%);
  background-size: 200px 200px, 300px 300px, 250px 250px, 350px 350px;
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
a   { color: var(--purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--pink); }

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(6,11,26,0.82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.15rem; }
.logo img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 8px;
  font-size: 0.88rem; font-weight: 500; color: var(--text2);
  transition: color var(--transition), background var(--transition);
}
.nav a:hover, .nav a.active { color: #fff; background: rgba(99,102,241,0.1); }
.nav a.cta {
  background: var(--grad); color: #fff; font-weight: 700;
  padding: 8px 20px; margin-left: 8px;
}
.nav a.cta:hover { opacity: .88; color: #fff; }

/* Mobile menu */
.mobile-menu-btn {
  display: none; background: none; border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer; padding: 8px;
}
#mobileOverlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1001; opacity: 0; transition: opacity .3s;
}
#mobileOverlay.show { display: block; opacity: 1; }
.mobile-nav {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
  background: #0c1229; border-left: 1px solid var(--border);
  z-index: 1002; padding: 80px 24px 24px; display: flex; flex-direction: column; gap: 6px;
  transition: right .35s ease;
}
.mobile-nav.show { right: 0; }
.mobile-nav-close {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; color: var(--text2);
  font-size: 1.6rem; cursor: pointer;
}
.mobile-nav a { padding: 12px 16px; border-radius: 10px; color: var(--text2); font-size: 0.95rem; }
.mobile-nav a:hover, .mobile-nav a.active { color: #fff; background: rgba(99,102,241,0.1); }
.mobile-nav a.mobile-cta { background: var(--grad); color: #fff; text-align: center; margin-top: 12px; font-weight: 700; }

/* ---------- Main ---------- */
main { position: relative; z-index: 1; }

/* ---------- Section ---------- */
.section { padding: 80px 0; position: relative; z-index: 1; }
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.section-title p  { color: var(--text2); font-size: 0.95rem; max-width: 600px; margin: 0 auto; }

/* ---------- Grad Text ---------- */
.grad-text { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ---------- Nebula Card (new for v4) ---------- */
.nebula-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.nebula-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad);
  opacity: 0; transition: opacity var(--transition);
}
.nebula-card:hover { transform: translateY(-4px); border-color: var(--border2); box-shadow: 0 8px 40px rgba(99,102,241,0.1); }
.nebula-card:hover::before { opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 12px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: none; font-family: inherit;
  transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.3); }
.btn-primary:hover { box-shadow: 0 6px 28px rgba(99,102,241,0.45); opacity: 1; }
.btn-outline {
  background: transparent; color: #fff;
  border: 1.5px solid var(--border2);
}
.btn-outline:hover { border-color: var(--purple); background: rgba(168,85,247,0.08); }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag {
  padding: 5px 14px; border-radius: 20px;
  background: rgba(99,102,241,0.08); border: 1px solid var(--border);
  color: var(--text2); font-size: 0.78rem; font-weight: 500;
}

/* ---------- Page Hero ---------- */
.page-hero { padding: 120px 0 64px; text-align: center; position: relative; z-index: 1; }
.page-hero h1 { font-size: 2.6rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.page-hero p  { font-size: 1rem; color: var(--text2); max-width: 680px; margin: 0 auto; line-height: 1.8; }

/* ---------- CTA Section ---------- */
.cta-section { text-align: center; padding: 80px 0; position: relative; z-index: 1; }
.cta-section h2 { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-section p  { color: var(--text2); font-size: 0.95rem; margin-bottom: 32px; }

/* ---------- Footer ---------- */
.footer {
  background: #040816; border-top: 1px solid var(--border);
  padding: 64px 0 0; position: relative; z-index: 1;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text2); font-size: 0.85rem; line-height: 1.7; margin-bottom: 16px; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-col h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text2); font-size: 0.85rem; }
.footer-col a:hover { color: var(--purple); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0;
  text-align: center; font-size: 0.82rem; color: var(--text2);
}
.footer-bottom a { color: var(--text2); }
.footer-bottom a:hover { color: var(--purple); }

/* ---------- Scroll Animation ---------- */
.animate-on-scroll { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.animate-on-scroll.animated { opacity: 1; transform: translateY(0); }

/* ---------- Print ---------- */
@media print {
  .header, .footer, .cta-section, .page-hero { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .page-hero h1 { font-size: 2rem; }
  .section-title h2 { font-size: 1.6rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 100px 0 48px; }
  .page-hero h1 { font-size: 1.6rem; }
  .btn { padding: 12px 24px; font-size: 0.88rem; }
}
