﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  --portal-blue: #0b57d0;
  --portal-blue-dark: #0842a0;
  --portal-red: #c5221f;
  --portal-orange: #ea580c;
  --bg-page: #f4f6f8;
  --bg-white: #ffffff;
  --border-light: #e5e7eb;
  --border-dark: #cbd5e1;
  --text-main: #1f2937;
  --text-sub: #4b5563;
  --text-muted: #6b7280;
}

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

body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

a { color: var(--portal-blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--portal-blue-dark); }

.container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }

/* 顶部栏 */
.portal-topbar {
  background: #202124;
  color: #bdc1c6;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid #3c4043;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.portal-tag {
  background: var(--portal-red);
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
.topbar-notice { line-height: 1.5; }
.topbar-notice strong { color: #ffffff; }
.topbar-right .date-text { color: #9aa0a6; font-weight: 600; white-space: nowrap; }

/* 门户头部 */
.portal-header {
  background: #ffffff;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.portal-logo .logo-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--portal-blue);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.2;
}
.portal-logo .logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 3px;
}
.portal-search-fake {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-label { color: var(--text-muted); font-weight: 600; }
.search-keyword-list { display: flex; gap: 8px; }
.search-keyword-list a {
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #dadce0;
  font-size: 12px;
}

/* 门户导航条 */
.portal-nav {
  background: var(--portal-blue);
  box-shadow: 0 2px 6px rgba(11, 87, 208, 0.2);
}
.nav-inner {
  display: flex;
  flex-wrap: wrap;
}
.nav-item {
  color: #ffffff;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  transition: all .2s ease;
}
.nav-item:hover, .nav-item.active {
  background: var(--portal-blue-dark);
  color: #ffffff;
  text-decoration: none;
}

/* 门户主焦点区 (Hero) */
.portal-hero {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-badge {
  background: #e8f0fe;
  color: var(--portal-blue);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 2px;
}
.portal-hero h1 {
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 950;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 14px;
}
.portal-hero p {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 980px;
  margin-bottom: 24px;
  line-height: 1.8;
}
.portal-hero strong { color: var(--portal-blue); }

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 4px;
  transition: all .2s ease;
}
.portal-btn.primary {
  background: var(--portal-blue);
  color: #ffffff;
  border: 1px solid var(--portal-blue);
}
.portal-btn.primary:hover {
  background: var(--portal-blue-dark);
  text-decoration: none;
}
.portal-btn.secondary {
  background: #f8fafc;
  color: var(--text-main);
  border: 1px solid var(--border-dark);
}
.portal-btn.secondary:hover {
  background: #e2e8f0;
  color: var(--portal-blue);
  text-decoration: none;
}

/* 门户模块通用 */
.portal-section {
  margin-top: 24px;
}
.section-header {
  background: #ffffff;
  padding: 14px 20px;
  border: 1px solid var(--border-light);
  border-bottom: 2px solid var(--portal-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-header h2 {
  font-size: 19px;
  font-weight: 900;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--portal-blue);
}
.section-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

/* 六宫格/分类模块 */
.grid-6-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.portal-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
}
.portal-card:hover {
  border-color: var(--portal-blue);
  box-shadow: 0 4px 12px rgba(11, 87, 208, 0.08);
}
.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.card-tag {
  background: #f1f3f4;
  color: var(--portal-blue);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
}
.card-idx {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}
.portal-card h3 {
  font-size: 17.5px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}
.portal-card p {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.65;
  flex: 1;
}

/* 正文介绍区 */
.intro-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.intro-block {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 24px;
}
.intro-block h3 {
  font-size: 18px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-block p {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
}
.intro-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.intro-list li {
  font-size: 14px;
  color: var(--text-main);
  padding-left: 18px;
  position: relative;
}
.intro-list li::before {
  content: "▪";
  color: var(--portal-blue);
  position: absolute;
  left: 4px;
  font-size: 16px;
}

/* 热门教程表格 */
.portal-table-container {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-top: none;
  overflow-x: auto;
}
.portal-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.portal-table th, .portal-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.portal-table th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 800;
}
.portal-table tr:hover td {
  background: #f8fafc;
}
.badge-level {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
}
.badge-level.level-1 { background: #e8f0fe; color: #1967d2; }
.badge-level.level-2 { background: #fef7e0; color: #b06000; }
.badge-level.level-3 { background: #fce8e6; color: #c5221f; }

/* FAQ */
.faq-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 16px 20px;
}
.faq-item summary {
  font-size: 15.5px;
  font-weight: 800;
  color: #111827;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--portal-blue);
  font-weight: 900;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* 门户子页文章 */
.portal-article {
  margin: 24px auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 36px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.portal-article h1 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 950;
  color: #111827;
  margin-bottom: 16px;
  line-height: 1.35;
}
.article-lead-box {
  background: #f8fafc;
  border-left: 4px solid var(--portal-blue);
  padding: 12px 18px;
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 24px;
}
.portal-article h2 {
  font-size: 19px;
  font-weight: 900;
  color: #111827;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.portal-article p, .portal-article li {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.75;
}
.portal-article ul { margin-left: 20px; }

/* 页脚 */
.portal-footer {
  margin-top: 40px;
  background: #202124;
  color: #bdc1c6;
  padding: 40px 0 20px;
}
.footer-channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
.channel-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  border-left: 3px solid var(--portal-blue);
  padding-left: 8px;
}
.channel-col ul { list-style: none; display: grid; gap: 6px; }
.channel-col a { color: #9aa0a6; font-size: 13.5px; }
.channel-col a:hover { color: #ffffff; }
.about-col p { font-size: 13px; line-height: 1.7; color: #9aa0a6; }
.footer-bottom {
  border-top: 1px solid #3c4043;
  padding-top: 16px;
  font-size: 12px;
  color: #80868b;
  text-align: center;
}

@media (max-width: 960px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .grid-6-box, .intro-two-cols, .footer-channels { grid-template-columns: 1fr; }
  .portal-article { padding: 20px 16px; }
}
