/* ==========================================================================
   星连VPN (SingLink VPN) - 核心样式表
   特性：原生纯 CSS、无外部依赖、极白纯净现代科技美学、高对比度与无障碍支持
   ========================================================================== */

:root {
  /* 品牌调色板 - 极白纯净模式 (Ultra White Aesthetic) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  
  /* 文字与对比度（确保 >= 4.5:1，实测达 7:1 至 16:1 深度对比） */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-highlight: #2563eb;

  /* 主题交互色 */
  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-cyan: #0284c7;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --accent-card-border: #e2e8f0;
  
  /* 状态颜色 */
  --badge-bg: #eff6ff;
  --badge-border: #bfdbfe;
  --badge-text: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;

  /* 布局与间距 */
  --max-width: 1200px;
  --content-width: 860px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  /* 阴影（专为白底优化的柔和高雅阴影） */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 10px 25px -5px rgba(37, 99, 235, 0.12);

  /* 动画 */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: #ffffff;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(2, 132, 199, 0.03) 0%, transparent 45%);
}

/* 键盘可访问性：跳过链接 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 12px 20px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #0f172a;
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* 通用容器与排版 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.content-container {
  max-width: var(--content-width);
}

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 0.8rem, 2.25rem); }
h3 { font-size: clamp(1.2rem, 1.5vw + 0.5rem, 1.5rem); }

p {
  color: var(--text-muted);
  font-size: 1rem;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 导航栏 Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--accent-card-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-logo-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
}

.brand-logo-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-logo:hover .brand-logo-icon {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.35));
}

.brand-logo span.brand-en {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 4px;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
  text-decoration: none;
}

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 按钮样式体系（触摸目标 >= 44x44px） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  min-height: 44px;
  min-width: 44px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.btn-secondary {
  background: #f8fafc;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--text-main);
}

.btn-sm {
  padding: 8px 16px;
  min-height: 44px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 32px;
  min-height: 52px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

/* 徽章 Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  letter-spacing: 0.5px;
}

/* 主视觉区 Hero */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  background: #ffffff;
}

.hero-badge-wrap {
  margin-bottom: 24px;
}

.hero-title {
  margin-bottom: 20px;
  background: linear-gradient(180deg, #0f172a 20%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--text-highlight);
  margin-bottom: 18px;
  font-weight: 600;
}

.hero-description {
  max-width: 760px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

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

.hero-features-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 18px;
  border-top: 1px solid var(--accent-card-border);
  border-bottom: 1px solid var(--accent-card-border);
  max-width: 900px;
  margin: 0 auto;
}

.hero-feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-feat-item svg {
  color: var(--accent-primary);
}

/* 区块通用结构 */
.section {
  padding: 80px 0;
  background: #ffffff;
}

.section-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--accent-card-border);
  border-bottom: 1px solid var(--accent-card-border);
}

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

.section-header .badge {
  margin-bottom: 14px;
}

.section-title {
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* 核心优势卡片（3个图文卡片） */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-glow);
}

.card-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.card-title {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.card-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* 流媒体与 AI 支持图卡 */
.unlock-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.unlock-card {
  background: #ffffff;
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.unlock-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.unlock-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.unlock-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.unlock-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.unlock-pill {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.unlock-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

/* 套餐价格对比表 */
.pricing-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-card-border);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  -webkit-overflow-scrolling: touch;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}

.pricing-table caption {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-align: right;
  caption-side: bottom;
}

.pricing-table th,
.pricing-table td {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.pricing-table thead th {
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 2px solid var(--accent-card-border);
}

.pricing-table tbody tr {
  transition: var(--transition);
}

.pricing-table tbody tr:hover {
  background: #f8fafc;
}

.pricing-table tr.popular-row {
  background: rgba(37, 99, 235, 0.03);
}

.plan-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-name-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-name-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.price-unit {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 400;
}

/* 用户评价 Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: #ffffff;
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.testimonial-stars {
  color: #f59e0b;
  margin-bottom: 14px;
  font-size: 1rem;
  letter-spacing: 2px;
}

.testimonial-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eff6ff;
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 0.95rem;
}

.user-info .user-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.user-info .user-role {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* 常见问题解答 FAQ（details/summary，默认展开，无障碍） */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: #93c5fd;
}

.faq-summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
  transition: var(--transition);
  background: #ffffff;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-primary);
  transition: transform 0.2s ease;
  line-height: 1;
}

.faq-item[open] .faq-summary::after {
  content: "−";
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
  background: #ffffff;
}

.faq-content a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 页脚 Footer - 极白纯净风 */
.site-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid var(--accent-card-border);
  padding: 50px 0 30px;
}

.footer-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  list-style: none;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.footer-nav-link {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.footer-nav-link:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

.footer-copyright {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================================
   知识科普与 SEO 文章通用样式 (极白排版)
   ========================================================================== */
.article-header {
  padding: 60px 0 30px;
  text-align: center;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.article-content {
  background: #ffffff;
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-md);
  padding: 40px;
  margin-bottom: 40px;
  line-height: 1.85;
  box-shadow: var(--shadow-sm);
}

.article-content h2 {
  margin-top: 36px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--accent-card-border);
  padding-bottom: 10px;
  color: var(--text-main);
}

.article-content h3 {
  margin-top: 26px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.article-content p {
  margin-bottom: 18px;
  font-size: 1.02rem;
  color: #334155;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: #334155;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-primary);
  background: #eff6ff;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #1e293b;
}

.article-cta-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  margin: 36px 0;
  box-shadow: var(--shadow-sm);
}

.article-cta-box h3 {
  margin-bottom: 10px;
  color: #1e3a8a;
}

/* 文章目录/卡片网格 */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--accent-card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.article-card-title {
  font-size: 1.15rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-card-title a {
  color: var(--text-main);
}

.article-card-title a:hover {
  color: var(--accent-primary);
}

.article-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

/* ==========================================================================
   响应式设计（Mobile Responsive & Media Queries）
   检查断点：360px, 390px, 768px, 1440px
   ========================================================================== */
@media (max-width: 1024px) {
  .features-grid,
  .testimonials-grid,
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    height: auto;
    padding: 10px 0;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 8px 0;
    gap: 16px;
    border-top: 1px solid var(--accent-card-border);
    -webkit-overflow-scrolling: touch;
  }

  .features-grid,
  .unlock-grid,
  .testimonials-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 50px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-features-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 14px 16px;
  }

  .footer-nav-bar {
    gap: 20px;
    flex-direction: column;
    text-align: center;
  }

  .article-content {
    padding: 24px 16px;
  }
}

@media (max-width: 390px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-logo {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .btn {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}

/* 无障碍动效减弱 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
