﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (Smoothness & Performance Optimization)
   ========================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 硬件加速与流畅悬停 */
a, button, .media-news-card, .btn-media-primary, .btn-media-secondary, .faq-card, .intro-panel {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 移动端平滑滚动与防抖 */
.table-wrapper, .table-container, .code-box, pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* 媒体图片防溢出与自适应 */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 消除点击高亮延迟 */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* 数据仪表盘风格色彩变量 (Data Dashboard & Telemetry Visual System) */
  --db-bg: #0b0f17;             /* 控制台深邃黑蓝 */
  --db-card-bg: #111827;        /* 仪表盘卡片深灰 */
  --db-card-hover: #172033;     /* 悬浮高亮 */
  --db-surface: #1f293d;        /* 次级面板/表格头 */
  --db-border: rgba(255, 255, 255, 0.08);
  --db-border-active: #3b82f6;  /* 激活边框 */
  
  --db-primary: #3b82f6;        /* 仪表盘主蓝 */
  --db-primary-glow: rgba(59, 130, 246, 0.35);
  --db-accent: #10b981;         /* 联通绿 */
  --db-accent-glow: rgba(16, 185, 129, 0.4);
  --db-warn: #f59e0b;           /* 警告琥珀 */
  --db-purple: #8b5cf6;         /* 高阶推理紫 */
  
  --db-text-main: #f8fafc;      /* 纯白主标题 */
  --db-text-muted: #94a3b8;     /* 数据说明灰 */
  --db-text-sub: #64748b;       /* 标签说明 */
  
  --db-radius: 10px;
  --db-radius-lg: 16px;
  --db-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --db-transition: all 0.22s ease-in-out;
  --db-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --db-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--db-font);
  background-color: var(--db-bg);
  color: #e2e8f0;
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部独立声明区 */
.dash-topbar {
  background-color: #0d1320;
  border-bottom: 1px solid var(--db-border);
  padding: 10px 0;
  font-size: 13px;
  color: #94a3b8;
}

.topbar-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.dash-pill-alert {
  display: inline-block;
  white-space: nowrap;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.topbar-text {
  flex: 1;
  line-height: 1.55;
}

/* 导航栏 */
.dash-header {
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--db-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.dash-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.dash-logo-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--db-primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dash-title-group {
  display: flex;
  flex-direction: column;
}

.dash-brand-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.dash-brand-title span {
  color: #60a5fa;
}

.dash-brand-sub {
  font-size: 11px;
  color: #64748b;
  font-family: var(--db-font-mono);
}

.dash-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  transition: var(--db-transition);
}

.nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav a.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
}

/* 仪表盘 Hero 区域 (Dashboard Telemetry Hero) */
.dash-hero-section {
  padding: 50px 0 40px;
  background: radial-gradient(circle at 60% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--db-border);
}

.hero-dash-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-telemetry-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--db-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-bottom: 18px;
}

.dash-hero-section h1 {
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: -0.6px;
}

.dash-hero-section p.hero-summary {
  font-size: 16px;
  color: var(--db-text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* 双入口按钮 CTA (Dashboard Action Triggers) */
.hero-cta-triggers {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--db-transition);
  cursor: pointer;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 0 16px var(--db-primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.6);
}

.btn-telemetry-outline {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid var(--db-border);
}

.btn-telemetry-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 仪表盘能力监视组件 (Telemetry Model Capability Widget) */
.telemetry-widget-card {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 24px;
  box-shadow: var(--db-shadow);
}

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--db-border);
  margin-bottom: 18px;
}

.widget-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-badge {
  font-family: var(--db-font-mono);
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
}

.telemetry-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.bar-name {
  color: #cbd5e1;
  font-weight: 600;
}

.bar-score {
  font-family: var(--db-font-mono);
  font-weight: 700;
  color: #60a5fa;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
}

.fill-blue { width: 96%; background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.fill-purple { width: 98%; background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.fill-green { width: 92%; background: linear-gradient(90deg, #10b981, #34d399); }
.fill-amber { width: 94%; background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* 状态度量条 (Telemetry Live Metrics) */
.dash-metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
  padding: 16px 20px;
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius);
}

.metric-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid var(--db-border);
}

.metric-cell:last-child {
  border-right: none;
}

.metric-val {
  font-family: var(--db-font-mono);
  font-size: 18px;
  font-weight: 900;
  color: #60a5fa;
}

.metric-lbl {
  font-size: 12px;
  color: var(--db-text-sub);
  margin-top: 2px;
}

/* 通用 Section 排版 */
.section {
  padding: 56px 0;
}

.section-alt {
  background-color: #0e1422;
  border-top: 1px solid var(--db-border);
  border-bottom: 1px solid var(--db-border);
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.dash-tag {
  display: inline-block;
  font-family: var(--db-font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
}

.section-head p {
  font-size: 15px;
  color: var(--db-text-muted);
  max-width: 660px;
  margin: 0 auto;
}

/* 六宫格 / 功能模块区 (Dashboard Metric Tiles) */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.dash-tile {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 26px 22px;
  transition: var(--db-transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--db-shadow);
  position: relative;
}

.dash-tile:hover {
  transform: translateY(-4px);
  background: var(--db-card-hover);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.tile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tile-code {
  font-family: var(--db-font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}

.tile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #34d399;
  font-weight: 600;
}

.dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.dash-tile h3 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.dash-tile p {
  font-size: 14px;
  color: var(--db-text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.tile-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #60a5fa;
  text-decoration: none;
  transition: var(--db-transition);
}

.tile-action-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* 正文介绍区 (教程中心 + 我们提供什么) */
.intro-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.intro-panel-card {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 32px 28px;
  box-shadow: var(--db-shadow);
}

.intro-panel-card h3 {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-panel-card p {
  font-size: 14px;
  color: var(--db-text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.dash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #cbd5e1;
}

.list-square {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background-color: #3b82f6;
  margin-top: 8px;
  flex-shrink: 0;
}

/* 热门教程表格 (Data Grid & Status Table) */
.table-container-card {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  overflow: hidden;
  box-shadow: var(--db-shadow);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dash-table th {
  background-color: var(--db-surface);
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 800;
  color: #f8fafc;
  border-bottom: 1px solid var(--db-border);
}

.dash-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--db-text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-table tr:hover td {
  background-color: rgba(59, 130, 246, 0.06);
}

.badge-target-user {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--db-border);
}

.badge-diff-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.diff-1 {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.diff-2 {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.diff-3 {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* FAQ 常见问答 */
.faq-grid-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.faq-card-dash {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 24px 22px;
  box-shadow: var(--db-shadow);
}

.faq-card-dash h4 {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-q-indicator {
  color: #60a5fa;
  font-weight: 900;
}

.faq-card-dash p {
  font-size: 14px;
  color: var(--db-text-muted);
  line-height: 1.7;
}

/* 延伸阅读 */
.extended-dash-box {
  margin-top: 36px;
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 24px 28px;
  box-shadow: var(--db-shadow);
}

.extended-dash-box h4 {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.dash-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-tag-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--db-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  transition: var(--db-transition);
}

.dash-tag-links a:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-2px);
}

/* 页脚 */
.dash-footer {
  background: #080c14;
  color: #94a3b8;
  padding: 48px 0 28px;
  border-top: 1px solid var(--db-border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  max-width: 520px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 16px;
}

.footer-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #fff;
  border-radius: 6px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: #64748b;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  max-width: 440px;
}

.footer-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: var(--db-transition);
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #475569;
}

/* 子页面样式 */
.subpage-hero-dash {
  padding: 44px 0 32px;
  background: #0d1320;
  border-bottom: 1px solid var(--db-border);
}

.subpage-hero-dash h1 {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}

.subpage-hero-dash p {
  font-size: 15px;
  color: var(--db-text-muted);
}

.dash-article-wrap {
  padding: 44px 0;
}

.dash-article-card {
  background: var(--db-card-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--db-radius-lg);
  padding: 38px;
  box-shadow: var(--db-shadow);
}

.dash-article-card h2 {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin: 30px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--db-border);
}

.dash-article-card h2:first-child {
  margin-top: 0;
}

.dash-article-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #60a5fa;
  margin: 22px 0 12px;
}

.dash-article-card p {
  font-size: 15px;
  color: var(--db-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.dash-article-card ul, .dash-article-card ol {
  margin: 0 0 20px 24px;
  color: var(--db-text-muted);
}

.dash-article-card li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.telemetry-callout {
  background: rgba(59, 130, 246, 0.12);
  border-left: 4px solid #3b82f6;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  font-size: 14px;
  color: #93c5fd;
}

.code-console {
  background: #080c14;
  color: #f8fafc;
  padding: 18px 22px;
  border-radius: 8px;
  font-family: var(--db-font-mono);
  font-size: 13px;
  overflow-x: auto;
  margin-bottom: 20px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero-dash-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cta-triggers {
    justify-content: center;
  }
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro-dash-grid, .faq-grid-dash {
    grid-template-columns: 1fr;
  }
  .dash-metrics-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-cell:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 640px) {
  .grid-6 {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 14px 0;
    gap: 12px;
  }
  .dash-hero-section h1 {
    font-size: 25px;
  }
  .footer-top {
    flex-direction: column;
  }
  .dash-metrics-ribbon {
    grid-template-columns: 1fr;
  }
  .metric-cell {
    border-right: none;
    border-bottom: 1px solid var(--db-border);
  }
  .metric-cell:last-child {
    border-bottom: none;
  }
}
