/* ==========================================================================
   奈云 NaiYun 官网样式表 (style.css)
   极简纯原生 CSS，零外部依赖，毫秒级快速渲染，全响应式适配
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --success: #10b981;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 6px 12px -4px rgba(0, 0, 0, 0.04);
  --max-width: 1200px;
  --content-width: 860px;
  --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, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 键盘焦点样式 */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* 跳转到主要内容无障碍链接 */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 20px;
  z-index: 9999;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 15px;
}

/* 滚动避让固定导航栏 */
section, h2, h3, article {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

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

.content-container {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 排版全局规范 */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.85rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-hover); }

/* 按钮通用规范 (确保触控区域 >= 44x44px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 44px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--primary);
  border-color: var(--primary-border);
}
.btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.btn-lg {
  min-height: 52px;
  padding: 14px 32px;
  font-size: 1.1rem;
}

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

.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.35rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}
.brand-logo:hover {
  color: var(--primary);
}
.logo-icon {
  width: 32px;
  height: 32px;
  fill: var(--primary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 4px;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

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

/* 主视觉区 (Hero Section) */
.hero-section {
  padding: 60px 0 50px;
  background: linear-gradient(180deg, #f0f7ff 0%, var(--bg-page) 100%);
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.25;
}

.hero-title .highlight {
  color: var(--primary);
  position: relative;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.metric-item {
  text-align: center;
}
.metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}
.metric-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* 区块通用结构 */
.section {
  padding: 60px 0;
}

.section-alt {
  background-color: #ffffff;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}
.feature-icon-wrapper svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

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

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.support-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-alt);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* 套餐价格对比表 */
.pricing-section {
  background: linear-gradient(180deg, var(--bg-page) 0%, #f0f7ff 100%);
}

.pricing-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.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-light);
  text-align: right;
  caption-side: bottom;
}

.pricing-table th,
.pricing-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.pricing-table thead th {
  background-color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.pricing-table .highlight-row {
  background-color: #f0fdf4;
}

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

.plan-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}
.plan-period {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-light);
}

.popular-tag {
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

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

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rating-stars {
  color: #fbbf24;
  margin-bottom: 12px;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.testimonial-content {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-style: italic;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.user-meta .user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}
.user-meta .user-role {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* FAQ 常见问题解答规范 (默认展开 details open) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: var(--primary-border);
}

.faq-item summary {
  padding: 20px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "▾";
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(180deg);
}

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

/* 页脚规范 (只保留4个标题链接：网站地图、关于我们、服务条款、隐私政策) */
.site-footer {
  margin-top: auto;
  background-color: #0f172a;
  color: #94a3b8;
  padding: 48px 0 32px;
  border-top: 1px solid #1e293b;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid #1e293b;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  list-style: none;
}

.footer-nav-list a {
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 4px;
  transition: color 0.2s ease;
}
.footer-nav-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}
.footer-bottom p {
  margin-bottom: 6px;
  color: #64748b;
}

/* 文章页与内容详情页排版 */
.article-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 16px;
}
.breadcrumbs a {
  color: var(--text-light);
}
.breadcrumbs a:hover {
  color: var(--primary);
}

.article-title {
  font-size: 2.1rem;
  line-height: 1.35;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-light);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.55rem;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.article-body h3 {
  font-size: 1.25rem;
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-body ul, .article-body ol {
  margin-left: 24px;
  margin-bottom: 20px;
}
.article-body li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-size: 0.95rem;
  color: var(--text-main);
}

.article-cta-box {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 40px 0;
  text-align: center;
}

.article-cta-box h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.article-faq-wrapper {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* 知识科普目录卡片网格 */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}
.article-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 9999px;
  align-self: flex-start;
  margin-bottom: 12px;
}
.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.article-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 16px;
}

/* 移动端与多尺寸响应式适配 (@media) */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .header-inner {
    flex-wrap: wrap;
  }
  
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .nav-links {
    gap: 12px;
    white-space: nowrap;
  }
  
  .features-grid,
  .support-grid,
  .testimonials-grid,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  
  .footer-nav-list {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.65rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .faq-item summary {
    padding: 16px 18px;
    font-size: 1rem;
  }
  .faq-answer {
    padding: 0 18px 16px;
  }
}

/* 赛博虚拟方块特效画布规范 */
#cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* 无动画模式偏好 (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  #cyber-canvas {
    display: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
