/* ==========================================================================
   寰宇云 (huanyu-yun.rest) 极简原生 CSS 核心样式库
   规范：纯原生 CSS、零外部依赖、响应式适配、无障碍友好、秒开级性能
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --success: #10b981;
  --warning: #f59e0b;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-dark: #0f172a;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;
  
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --container-max: 1200px;
  --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";
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 锚点滚动距离防遮挡 */
h1, h2, h3, h4, section {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* 无障碍键盘导航跳转 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--primary);
  color: #fff;
  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 var(--accent);
}

:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 按钮通用规范 (触控区域 >= 44x44px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--primary);
}

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

/* 顶部导航栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
  padding: 8px 4px;
  transition: color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

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

/* 主视觉区 (Hero Section) */
.hero-section {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid #bfdbfe;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 20px;
}
.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 区块通用结构 */
.section-padding {
  padding: 80px 0;
}
.section-alt {
  background-color: var(--bg-alt);
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.section-tag {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}
.section-title {
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--text-main);
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* 核心优势卡片 (3列网格) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--bg-card);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.75rem;
}
.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}
.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.feature-list {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.feature-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 流媒体与 AI 支持图卡 (2列网格) */
.media-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.media-ai-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.media-ai-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.media-ai-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.media-ai-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}
.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.media-tag {
  background: var(--bg-alt);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
}

/* 套餐价格对比表 */
.pricing-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 640px;
}
.pricing-table caption {
  padding: 16px;
  caption-side: bottom;
  color: var(--text-light);
  font-size: 0.875rem;
  text-align: center;
}
.pricing-table th, .pricing-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.pricing-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.95rem;
}
.pricing-table tbody tr:hover {
  background-color: #fafbfc;
}
.pricing-table tbody tr.popular-row {
  background-color: var(--primary-light);
}
.price-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.price-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: normal;
}
.badge-popular {
  display: inline-block;
  background: #f97316;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  vertical-align: middle;
}

/* 用户评价 (Testimonials) */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.review-stars {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.review-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}
.author-info h4 {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
}
.author-info p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* FAQ 手风琴（原生 details/summary，默认展开 open） */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: #cbd5e1;
}
.faq-item summary {
  padding: 20px 24px;
  font-weight: 700;
  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;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "−";
  font-size: 1.35rem;
  color: var(--primary);
  font-weight: bold;
}
.faq-item:not([open]) summary::after {
  content: "+";
  color: var(--text-muted);
}
.faq-answer {
  padding: 0 24px 22px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid #f1f5f9;
}
.faq-answer p {
  margin-top: 12px;
}
.faq-answer a {
  color: var(--primary);
  text-decoration: underline;
}

/* 底部 CTA 引导横幅 */
.cta-banner {
  background: var(--accent-gradient);
  color: #fff;
  padding: 64px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 40px auto 0;
}
.cta-banner h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
}
.cta-banner p {
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 28px;
  opacity: 0.95;
}
.cta-banner .btn {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.cta-banner .btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

/* 页脚 (只保留 4 个独立页面标题链接，新标签展示) */
.site-footer {
  background-color: var(--bg-dark);
  color: #cbd5e1;
  padding: 48px 0 32px;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  list-style: none;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #f1f5f9;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.footer-nav a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}
.footer-copyright {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 文章详情页与知识库通用样式 */
.article-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.article-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}
.article-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text-main);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-light);
  flex-wrap: wrap;
}
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #1e293b;
}
.article-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 40px 0 16px;
  color: var(--text-main);
}
.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-main);
}
.article-content p {
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
}
.article-content li {
  margin-bottom: 8px;
}
.article-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: normal;
  color: var(--text-muted);
}
.article-content a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}
.article-cta-box {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 36px 0;
  text-align: center;
}
.article-cta-box h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--primary-hover);
}

/* 知识库列表卡片 (3列网格) */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.knowledge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.knowledge-tag {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.knowledge-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}
.knowledge-card h3 a {
  color: var(--text-main);
  text-decoration: none;
}
.knowledge-card h3 a:hover {
  color: var(--primary);
}
.knowledge-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}
.knowledge-card .read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* 响应式断点适配 (@media) */
@media (max-width: 992px) {
  .features-grid, .knowledge-grid, .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-menu {
    order: 3;
    width: 100%;
    justify-content: space-around;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    gap: 8px;
  }
  .site-header {
    height: auto;
    padding: 10px 0;
  }
  
  .features-grid, .knowledge-grid, .reviews-grid, .media-ai-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 44px 0 40px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  
  .section-padding {
    padding: 56px 0;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 12px;
  }
}

@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;
  }
}
