/* ============================================================
   v2rayN 官网样式表
   ============================================================ */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-accent: #06b6d4;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-bg-darker: #0b1120;
  --color-text: #0f172a;
  --color-text-soft: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 10px 24px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 20px 50px -12px rgba(37, 99, 235, .25);
  --maxw: 1140px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Roboto, Helvetica, Arial, sans-serif;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------  按钮  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(37, 99, 235, .7); }
.btn-ghost {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.btn-dark {
  background: #1f2937;
  color: #fff;
}
.btn-dark:hover { background: #111827; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* ----------  顶部导航  ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.brand .logo {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  flex: none;
}
.brand .logo img, .brand .logo svg { width: 100%; height: 100%; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--color-bg-alt); color: var(--color-text); }
.nav-links a.active { color: var(--color-primary); }
.nav-links .btn { color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* ----------  Hero  ---------- */
.hero {
  position: relative;
  background: radial-gradient(1200px 600px at 70% -10%, #1e3a8a 0%, transparent 60%),
              linear-gradient(160deg, var(--color-bg-darker) 0%, #131c33 55%, #0f1a36 100%);
  color: #fff;
  overflow: hidden;
  padding: 96px 0 110px;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(800px 500px at 30% 0%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(59, 130, 246, .14);
  border: 1px solid rgba(59, 130, 246, .35);
  color: #93c5fd; font-size: 13.5px; font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: #cbd5e1;
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta .item .num { font-size: 26px; font-weight: 800; color: #fff; }
.hero-meta .item .lbl { font-size: 13.5px; color: var(--color-text-muted); }

/* mock window */
.mock {
  background: linear-gradient(180deg, #1e293b, #16213a);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: rgba(15, 23, 42, .6); border-bottom: 1px solid rgba(148,163,184,.12); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.mock-bar .r { background: #ef4444; } .mock-bar .y { background: #f59e0b; } .mock-bar .g { background: #22c55e; }
.mock-bar .title { margin-left: 10px; font-size: 12.5px; color: var(--color-text-muted); }
.mock-body { padding: 18px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-radius: 9px; background: rgba(148,163,184,.06); margin-bottom: 9px; font-size: 13.5px; color: #cbd5e1; }
.mock-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.mock-row .name { display: flex; align-items: center; gap: 9px; }
.mock-row .ping { color: #34d399; font-variant-numeric: tabular-nums; }

/* ----------  通用区块  ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head .kicker { color: var(--color-primary); font-weight: 700; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.5px; margin: 10px 0 14px; }
.section-head p { color: var(--color-text-soft); font-size: 17px; }

/* ----------  特性卡片  ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.feature .ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  color: var(--color-primary);
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--color-text-soft); font-size: 14.5px; }

/* ----------  软件对比表  ---------- */
.table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.sw-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.sw-table thead th {
  background: var(--color-bg-dark);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 16px 20px;
}
.sw-table tbody td { padding: 18px 20px; border-top: 1px solid var(--color-border); font-size: 14.5px; vertical-align: middle; }
.sw-table tbody tr:hover { background: var(--color-bg-alt); }
.sw-table tbody tr.row-featured td { background: #f1f7ff; box-shadow: inset 3px 0 0 var(--color-primary); }
.sw-table tbody tr.row-featured:hover td { background: #e7f0ff; }
.sw-name .t .rec-badge { font-size: 11px; padding: 2px 8px; vertical-align: middle; }
.sw-name { display: flex; align-items: center; gap: 12px; }
.sw-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 20px -14px rgba(15,23,42,.7);
}
.sw-ico.win { background: linear-gradient(135deg, #00a4ef, #0078d4 62%, #005a9e); }
.sw-ico.android { background: linear-gradient(135deg, #4ade80, #16a34a 62%, #15803d); }
.sw-ico.mac { background: linear-gradient(135deg, #111827, #475569 58%, #94a3b8); }
.sw-name .t { font-weight: 700; }
.sw-name .d { font-size: 12.5px; color: var(--color-text-muted); font-weight: 400; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: #eff6ff; color: var(--color-primary-dark);
}
.platform-mark, .platform-mini { display: block; fill: currentColor; }
.platform-mark use, .platform-mini use { fill: currentColor; }
.platform-mark { width: 24px; height: 24px; }
.platform-mini { width: 16px; height: 16px; flex: none; }
.icon-label { display: inline-flex; align-items: center; gap: 6px; }
.platform-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--color-text-soft); font-weight: 500; flex-wrap: wrap; }
.cell-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.table-note { text-align: center; color: var(--color-text-muted); font-size: 13.5px; margin-top: 16px; }

/* ----------  下载卡片  ---------- */
.dl-grid { display: grid; gap: 24px; }
.dl-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px;
  align-items: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.dl-card:hover { box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.dl-icon {
  width: 68px; height: 68px;
  border-radius: 16px;
  display: grid; place-items: center;
  color: #fff;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 18px 30px -20px rgba(15,23,42,.82);
}
.dl-icon .platform-mark { width: 38px; height: 38px; }
.dl-icon.win { background: linear-gradient(135deg, #00a4ef, #0078d4 62%, #005a9e); }
.dl-icon.android { background: linear-gradient(135deg, #4ade80, #16a34a 62%, #15803d); }
.dl-icon.mac { background: linear-gradient(135deg, #111827, #475569 58%, #94a3b8); }
.dl-info h3 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dl-info .ver { font-size: 13px; font-weight: 700; color: var(--color-primary-dark); background: #eff6ff; padding: 3px 10px; border-radius: 999px; }
.dl-info .meta { color: var(--color-text-muted); font-size: 13.5px; margin: 4px 0 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.dl-info p { color: var(--color-text-soft); font-size: 14.5px; max-width: 560px; }
.dl-actions { display: flex; flex-direction: column; gap: 10px; min-width: 188px; }
.dl-actions .btn { width: 100%; justify-content: center; }

/* ----------  主推（featured）下载卡片  ---------- */
.dl-card.featured {
  display: block;
  position: relative;
  border: 2px solid #93c5fd;
  background: linear-gradient(180deg, #f3f8ff, #ffffff 60%);
  box-shadow: var(--shadow-md);
}
.dl-feature-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  margin-bottom: 22px;
}
.rec-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 4px 10px -3px rgba(249, 115, 22, .5);
  white-space: nowrap;
}
.dl-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--color-border);
}
.dl-plat-group h4 {
  font-size: 14px; font-weight: 700;
  color: var(--color-text-soft);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 7px;
}
.dl-plat-btns { display: flex; flex-direction: column; gap: 10px; }
.dl-plat-btns .btn { width: 100%; justify-content: flex-start; }
.dl-plat-btns .btn .arch { margin-left: auto; font-size: 12px; font-weight: 500; opacity: .8; }
.dl-feature-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 20px;
  border-top: 1px dashed var(--color-border);
}
.dl-feature-foot .hint { color: var(--color-text-muted); font-size: 13.5px; }

@media (max-width: 760px) {
  .dl-feature-head { grid-template-columns: 1fr; gap: 16px; }
  .dl-platforms { grid-template-columns: 1fr; }
}

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 36px;
  color: #92400e; font-size: 14.5px;
}
.notice svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.notice strong { color: #78350f; }

/* ----------  CTA  ---------- */
.cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 22px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin-bottom: 12px; }
.cta p { font-size: 17px; opacity: .92; margin-bottom: 28px; }
.cta .btn-primary { background: #fff; color: var(--color-primary-dark); }
.cta .btn-primary:hover { background: #f1f5f9; }
.cta .btn-ghost { border-color: rgba(255,255,255,.6); }

/* ----------  页脚  ---------- */
.site-footer { background: var(--color-bg-dark); color: #cbd5e1; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-about p { color: var(--color-text-muted); font-size: 14px; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--color-text-muted); font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(148,163,184,.16); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--color-text-muted); font-size: 13.5px; }

/* ----------  响应式  ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .dl-card { grid-template-columns: 1fr; text-align: left; }
  .dl-actions { min-width: 0; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    padding: 8px 16px 16px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-links .btn { margin-top: 8px; justify-content: center; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 76px; }
  .section { padding: 60px 0; }
}

/* ----------  FAQ  ---------- */
.faq { max-width: 840px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s;
}
.faq details[open] { border-color: #c7d2fe; }
.faq summary {
  cursor: pointer;
  padding: 17px 20px;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--color-primary); font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq .ans { padding: 0 20px 18px; color: var(--color-text-soft); font-size: 14.5px; }
.faq .ans a { color: var(--color-primary); text-decoration: underline; }

/* 面包屑 */
.breadcrumb { font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 10px; }
.breadcrumb a { color: #cbd5e1; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { margin: 0 8px; opacity: .6; }
