﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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;
}

/* ==========================================================
   AI 新闻媒体风，头条式首页布局 (AI News Media & Headline Editorial Theme)
   ========================================================== */

:root {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-news-card: #ffffff;
  --bg-news-dark: #0f172a;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  /* 媒体风新闻标志色 */
  --news-red: #e11d48;
  --news-red-bg: #ffe4e6;
  --news-blue: #2563eb;
  --news-blue-bg: #eff6ff;
  --news-amber: #d97706;
  --news-amber-bg: #fef3c7;
  --news-emerald: #059669;
  --news-emerald-bg: #d1fae5;
  
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s ease-in-out;
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-body);
  font-family: var(--font-sans);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

/* 顶部声明条 */
.top-declaration-bar {
  background: #0f172a;
  color: #f8fafc;
  padding: 8px 0;
  font-size: 12.5px;
}

.dec-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dec-badge {
  background: var(--news-red);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 11px;
}

.dec-text {
  color: #cbd5e1;
  flex: 1;
  margin: 0;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--text-main);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

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

.news-logo-icon {
  font-size: 24px;
}

.news-sub-tag {
  font-size: 14px;
  font-weight: 600;
  color: var(--news-red);
}

.main-nav {
  display: flex;
  gap: 22px;
}

.nav-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: var(--transition);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--news-red);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--news-red);
}

.btn-news-action {
  background: var(--news-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.btn-news-action:hover {
  background: #be123c;
}

/* 新闻快讯滚动条 (Breaking Ticker) */
.news-ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 13px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-label {
  background: var(--news-red-bg);
  color: var(--news-red);
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
}

.ticker-text {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AI 新闻媒体 Hero 区域 (头条大板面) */
.media-hero-section {
  padding: 36px 0 24px;
}

.headline-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  border-top: 4px solid var(--news-red);
}

.headline-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.headline-badge {
  background: var(--news-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 2px;
}

.headline-date {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-h1 {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 16.5px;
  color: var(--text-body);
  max-width: 900px;
  margin-bottom: 28px;
  line-height: 1.75;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-media-primary {
  background: var(--text-main);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-media-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-media-secondary {
  background: var(--news-red-bg);
  border: 1px solid #fecdd3;
  color: var(--news-red);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-media-secondary:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: translateY(-1px);
}

/* 通用 Section */
.section {
  padding: 44px 0;
}

.section-header {
  margin-bottom: 28px;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* 六宫格/功能模块区 (新闻专栏卡片) */
.grid-six {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.media-news-card {
  background: var(--bg-news-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.media-news-card:hover {
  border-color: var(--news-red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-card-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--news-red);
  margin-bottom: 10px;
  display: block;
}

.news-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-card-desc {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.news-read-time {
  font-size: 12px;
  color: var(--text-muted);
}

.news-card-link {
  color: var(--news-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.news-card-link:hover {
  text-decoration: underline;
}

/* 正文介绍区：“教程中心”与“我们提供什么” */
.intro-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.intro-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-card);
}

.panel-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-list {
  list-style: none;
}

.intro-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.65;
}

.intro-list li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--news-red);
  font-size: 10px;
  top: 4px;
}

.intro-list strong {
  color: var(--text-main);
}

/* 热门教程表格 (新闻数据榜单风格) */
.table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

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

.media-table th {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 700;
  font-size: 13.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.media-table td {
  padding: 15px 18px;
  color: var(--text-body);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.media-table tr:hover td {
  background: #f1f5f9;
}

.badge-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.badge-easy {
  background: var(--news-emerald-bg);
  color: var(--news-emerald);
}

.badge-medium {
  background: var(--news-amber-bg);
  color: var(--news-amber);
}

.badge-hard {
  background: var(--news-red-bg);
  color: var(--news-red);
}

.tbl-link {
  color: var(--news-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
}

.tbl-link:hover {
  text-decoration: underline;
}

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

.faq-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.faq-card:hover {
  border-color: var(--news-red);
}

.faq-q {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-q-badge {
  background: var(--text-main);
  color: #ffffff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
}

.faq-a {
  color: var(--text-body);
  font-size: 13.5px;
  line-height: 1.65;
}

/* 延伸阅读与免责入口卡片 */
.extended-reading {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 26px 32px;
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.reading-info h4 {
  font-size: 17px;
  color: #ffffff;
  margin-bottom: 4px;
  font-weight: 800;
}

.reading-info p {
  color: #94a3b8;
  font-size: 13.5px;
}

.reading-actions {
  display: flex;
  gap: 12px;
}

.btn-reading-white {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.btn-reading-white:hover {
  background: #f1f5f9;
}

.btn-reading-outline {
  border: 1px solid #475569;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.btn-reading-outline:hover {
  background: #1e293b;
}

/* 子页面文章样式 */
.page-hero {
  padding: 44px 0 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.page-meta-badge {
  display: inline-block;
  background: var(--news-red-bg);
  color: var(--news-red);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.page-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 820px;
}

.content-section {
  padding: 40px 0;
}

.article-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  color: #334155;
  line-height: 1.8;
  box-shadow: var(--shadow-card);
}

.article-content h2 {
  font-size: 22px;
  color: var(--text-main);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content h2::before {
  content: '▍';
  color: var(--news-red);
}

.article-content h3 {
  font-size: 17px;
  color: var(--news-blue);
  margin: 22px 0 10px;
}

.article-content p {
  margin-bottom: 16px;
  font-size: 15px;
}

.article-content ul, .article-content ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

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

.article-content strong {
  color: var(--text-main);
}

.tool-callout {
  background: #f8fafc;
  border-left: 4px solid var(--news-red);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--text-main);
  font-size: 14.5px;
}

.code-box {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #38bdf8;
  overflow-x: auto;
  margin: 18px 0;
}

/* 页脚 */
.site-footer {
  background: #0f172a;
  color: #f8fafc;
  border-top: 4px solid var(--news-red);
  padding: 50px 0 30px;
  margin-top: 50px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand .logo {
  color: #ffffff;
}

.footer-desc {
  color: #94a3b8;
  font-size: 13.5px;
  margin: 14px 0;
  line-height: 1.6;
  max-width: 420px;
}

.copyright {
  color: #64748b;
  font-size: 12px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.link-col h4 {
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.link-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: var(--transition);
}

.link-col a:hover {
  color: #ffffff;
}

/* 响应式断点 */
@media (max-width: 992px) {
  .grid-six {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro-container {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .hero-h1 {
    font-size: 26px;
  }
  .grid-six {
    grid-template-columns: 1fr;
  }
  .footer-links {
    grid-template-columns: 1fr 1fr;
  }
}