﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  /* AI 学习平台风设计系统 (Ed-Tech Academy Tokens) */
  --edu-bg: #f8fafc;
  --edu-surface: #ffffff;
  --edu-primary: #0f172a;        /* 沉浸墨黑 */
  --edu-accent: #2563eb;         /* 学院学术蓝 */
  --edu-accent-hover: #1d4ed8;
  --edu-indigo: #4f46e5;
  --edu-emerald: #10b981;        /* 进度达成绿 */
  --edu-amber: #f59e0b;          /* 进阶章节橙 */
  
  --edu-border: #e2e8f0;
  --edu-border-light: #f1f5f9;
  --edu-border-strong: #cbd5e1;
  
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

a { color: var(--edu-accent); text-decoration: none; font-weight: 700; }
a:hover { color: var(--edu-accent-hover); text-decoration: underline; }

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

/* 顶部独立声明栏 */
.edu-topbar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.edu-badge {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.4);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.topbar-text strong { color: #ffffff; }

/* 头部导航 */
.edu-header {
  background: #ffffff;
  border-bottom: 2px solid var(--edu-primary);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
  gap: 20px;
}
.edu-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.edu-logo-icon {
  font-size: 26px;
}
.edu-title-group {
  display: flex;
  flex-direction: column;
}
.edu-main-title {
  font-size: 20px;
  font-weight: 950;
  color: var(--edu-primary);
  line-height: 1.2;
}
.edu-main-title span { color: var(--edu-accent); }
.edu-sub-title {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  color: var(--text-body);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 14px;
  background: #f8fafc;
  border: 1px solid var(--edu-border);
  transition: all .2s ease;
}
.nav a:hover, .nav a.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--edu-accent);
  text-decoration: none;
}

/* Hero 首屏 - 课程平台风 */
.hero {
  padding: 46px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, var(--edu-bg) 100%);
  border-bottom: 1px solid var(--edu-border);
}
.hero-course-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 950;
  line-height: 1.35;
  color: var(--edu-primary);
  margin-bottom: 16px;
}
.hero p {
  font-size: 16.5px;
  color: var(--text-body);
  max-width: 960px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.hero strong { color: var(--edu-accent); }

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 4px;
  transition: all .2s ease;
}
.btn.primary {
  background: var(--edu-accent);
  color: #ffffff;
  border: 1px solid var(--edu-accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn.primary:hover {
  background: var(--edu-accent-hover);
  border-color: var(--edu-accent-hover);
  text-decoration: none;
}
.btn.secondary {
  background: #ffffff;
  color: var(--edu-primary);
  border: 1px solid var(--edu-border-strong);
}
.btn.secondary:hover {
  background: #f8fafc;
  color: var(--edu-accent);
  border-color: var(--edu-accent);
  text-decoration: none;
}

/* 课程进度总览条 (Progress Dashboard) */
.edu-progress-dashboard {
  background: #ffffff;
  border: 1px solid var(--edu-border);
  border-left: 4px solid var(--edu-accent);
  border-radius: 6px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.dash-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--edu-primary);
}
.dash-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 3px;
  background: #eff6ff;
  color: var(--edu-accent);
  border: 1px solid #bfdbfe;
}
.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--edu-accent), var(--edu-emerald));
  border-radius: 4px;
}
.dash-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* 通用 Section */
.section {
  padding: 46px 0;
  border-bottom: 1px solid var(--edu-border);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 950;
  color: var(--edu-primary);
}
.section-note {
  max-width: 480px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 六宫格功能模块区 - 课程与章节卡片 (Course Chapters) */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card {
  background: var(--edu-surface);
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all .2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  position: relative;
}
.course-card:hover {
  transform: translateY(-3px);
  border-color: var(--edu-accent);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.09);
}
.course-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.chapter-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #1e40af;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}
.lesson-count {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--edu-emerald);
  font-weight: 800;
}
.course-card h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--edu-primary);
  margin-bottom: 8px;
}
.course-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 14px;
}
.card-progress {
  padding-top: 12px;
  border-top: 1px solid var(--edu-border-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 700;
}

/* 正文介绍区 (Curriculum Overview) */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: var(--edu-surface);
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.intro-box h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--edu-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-box p {
  font-size: 14.5px;
  color: var(--text-body);
  margin-bottom: 14px;
  line-height: 1.8;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.intro-box li {
  font-size: 14px;
  color: var(--text-main);
  padding-left: 22px;
  position: relative;
}
.intro-box li::before {
  content: "📖";
  position: absolute;
  left: 0;
  font-size: 13px;
}

/* 热门教程表格 (Syllabus & Modules) */
.table-wrap {
  background: var(--edu-surface);
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--edu-border);
  font-size: 14px;
  vertical-align: middle;
}
th {
  background: #f8fafc;
  color: var(--edu-primary);
  font-weight: 900;
  border-bottom: 2px solid var(--edu-border-strong);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
.level-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.level-badge.easy { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.level-badge.medium { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.level-badge.hard { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* FAQ 折叠面板 */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  background: var(--edu-surface);
  border: 1px solid var(--edu-border);
  border-radius: 6px;
  padding: 18px 22px;
  transition: all .2s ease;
}
details:hover {
  border-color: var(--edu-accent);
}
summary {
  font-size: 16px;
  font-weight: 900;
  color: var(--edu-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 18px;
  color: var(--edu-accent);
  font-weight: 900;
}
details[open] summary::after { content: "−"; }
details p {
  margin-top: 12px;
  color: var(--text-body);
  font-size: 14.5px;
  line-height: 1.8;
}

/* 子页面文章 (Courseware Page) */
.article {
  max-width: 900px;
  margin: 36px auto;
  background: var(--edu-surface);
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.article h1 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 950;
  color: var(--edu-primary);
  margin-bottom: 16px;
  line-height: 1.35;
}
.article-lead {
  background: #eff6ff;
  border-left: 4px solid var(--edu-accent);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14.5px;
  color: var(--text-body);
  border-radius: 0 4px 4px 0;
  line-height: 1.8;
}
.article h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--edu-primary);
  margin: 28px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--edu-border);
}
.article p, .article li {
  color: var(--text-body);
  font-size: 14.5px;
  margin-bottom: 12px;
  line-height: 1.8;
}
.article ul { margin-left: 20px; }

/* 页脚 */
.edu-footer {
  margin-top: 50px;
  background: #0f172a;
  color: #94a3b8;
  padding: 44px 0 24px;
  border-top: 1px solid #1e293b;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 28px;
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 13.5px;
  color: #64748b;
  max-width: 440px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-nav a {
  color: #cbd5e1;
  background: #1e293b;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid #334155;
}
.footer-nav a:hover {
  background: var(--edu-accent);
  color: #ffffff;
  border-color: var(--edu-accent);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 18px;
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 960px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .grid-6, .intro-grid, .edu-progress-dashboard, .footer-top { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .article { padding: 22px 16px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
}
