/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #1a1a2e;
  background: #f7f8fc;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== 颜色变量 ===== */
:root {
  --c1: #4f46e5;   /* 靛蓝 项目一 */
  --c2: #0ea5e9;   /* 天蓝 项目二 */
  --c3: #f97316;   /* 橙色 项目三 */
  --c4: #16a34a;   /* 绿色 项目四 */
  --c5: #db2777;   /* 玫红 项目五 */
  --c6: #9333ea;   /* 紫色 项目六 */
  --accent: #4f46e5;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== 顶部导航 ===== */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; color: var(--accent);
  white-space: nowrap;
}
.logo-icon { font-size: 18px; color: var(--accent); }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary);
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent); background: #eef2ff;
}
.nav-right { margin-left: auto; }
.btn-login {
  padding: 7px 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent); background: transparent;
  color: var(--accent); font-size: 13px; cursor: pointer;
  transition: all 0.15s;
}
.btn-login:hover { background: var(--accent); color: #fff; }

/* ===== Hero区 ===== */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: 72px 24px 64px;
  display: flex; align-items: center; gap: 64px;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block;
  padding: 4px 14px; border-radius: 20px;
  background: #eef2ff; color: var(--accent);
  font-size: 13px; font-weight: 500;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 46px; font-weight: 700; line-height: 1.2;
  color: var(--text-primary); margin-bottom: 18px;
}
.hero-desc {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; margin-bottom: 40px; }
.btn-primary {
  padding: 11px 28px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  border: none; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.btn-primary:hover { background: #4338ca; transform: translateY(-1px); }
.btn-primary.full { width: 100%; }
.btn-ghost {
  padding: 11px 28px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border); font-size: 15px;
  cursor: pointer; transition: all 0.15s; display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-stats { display: flex; gap: 32px; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-secondary); }

/* Hero可视化 */
.hero-visual { flex: 0 0 380px; }
.chain-diagram {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  background: #fff; border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
}
.chain-node {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; min-width: 60px;
  background: #f8fafc; border: 1px solid var(--border);
  gap: 4px; transition: all 0.2s; cursor: default;
}
.chain-node:hover { transform: translateY(-3px); border-color: var(--accent); }
.node-icon { font-size: 16px; }
.chain-node.node-1 { color: var(--c1); border-color: #c7d2fe; }
.chain-node.node-2 { color: var(--c2); border-color: #bae6fd; }
.chain-node.node-3 { color: var(--c3); border-color: #fed7aa; }
.chain-node.node-4 { color: var(--c4); border-color: #bbf7d0; }
.chain-node.node-5 { color: var(--c5); border-color: #fbcfe8; }
.chain-node.node-6 { color: var(--c6); border-color: #e9d5ff; }
.chain-arrow { color: var(--text-secondary); font-size: 18px; }
.chain-label { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 12px; }

/* ===== 通用Section ===== */
.section { padding: 72px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.section-header p { font-size: 15px; color: var(--text-secondary); }
.section-header.light h2 { color: #fff; }
.section-header.light p { color: rgba(255,255,255,0.75); }

/* ===== 课程卡片 ===== */
.course-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.course-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.2s; cursor: pointer;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  border-color: transparent;
}
.card-top {
  padding: 24px; display: flex; justify-content: space-between;
  align-items: flex-start;
}
.card-top.c1 { background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 100%); }
.card-top.c2 { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); }
.card-top.c3 { background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%); }
.card-top.c4 { background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%); }
.card-top.c5 { background: linear-gradient(135deg, #fdf2f8 0%, #fbcfe8 100%); }
.card-top.c6 { background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%); }
.card-num { font-size: 32px; font-weight: 800; opacity: 0.25; }
.card-icon { font-size: 28px; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.card-body h3 { font-size: 16px; font-weight: 600; }
.card-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  padding: 3px 9px; border-radius: 12px;
  background: #f1f5f9; color: var(--text-secondary);
  font-size: 11px;
}
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.meta-tasks { font-size: 12px; color: var(--text-secondary); }
.meta-ai { font-size: 12px; color: var(--accent); font-weight: 500; }

/* ===== AI智能体区 ===== */
.section-agents {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}
.section-agents .section-header h2 { color: #fff; }
.agents-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-bottom: 48px;
}
.agent-feature {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.2s;
}
.agent-feature:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}
.af-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.af-1 { background: rgba(99,102,241,0.3); }
.af-2 { background: rgba(14,165,233,0.3); }
.af-3 { background: rgba(249,115,22,0.3); }
.af-4 { background: rgba(219,39,119,0.3); }
.agent-feature h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.agent-feature p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.6; }

/* 积分演示 */
.credits-demo { display: flex; justify-content: center; }
.credits-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 28px; min-width: 420px;
}
.credits-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.credits-list { display: flex; flex-direction: column; gap: 8px; }
.credit-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.75);
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cost { color: #f87171; font-weight: 500; }
.earn-pts { color: #34d399; font-weight: 500; }
.credits-note { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 14px; text-align: center; }

/* ===== 学习路径 ===== */
.path-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.path-step {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: var(--radius);
  padding: 16px 20px; border: 1px solid var(--border);
  min-width: 160px; transition: all 0.2s;
}
.path-step:hover { border-color: var(--accent); transform: translateY(-2px); }
.ps-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eef2ff; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.ps-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.ps-content p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.path-arrow { font-size: 20px; color: var(--text-secondary); }

/* ===== Footer ===== */
.footer {
  background: #1a1a2e; padding: 28px 0;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500;
}
.footer-brand .logo-icon { color: var(--accent); }
.footer-note { font-size: 12px; color: rgba(255,255,255,0.35); max-width: 480px; text-align: right; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal {
  background: #fff; border-radius: 16px; padding: 40px;
  width: 380px; max-width: 90vw; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 16px;
  color: var(--text-secondary); cursor: pointer; padding: 4px;
}
.modal-logo {
  text-align: center; font-size: 32px; margin-bottom: 16px;
  color: var(--accent);
}
.modal-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.modal-desc { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; line-height: 1.6; }
.btn-coze {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 16px; transition: all 0.15s;
}
.btn-coze:hover { opacity: 0.9; transform: translateY(-1px); }
.coze-icon {
  width: 24px; height: 24px; background: rgba(255,255,255,0.25);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.modal-divider {
  text-align: center; font-size: 12px; color: var(--text-secondary);
  position: relative; margin: 16px 0;
}
.modal-divider::before, .modal-divider::after {
  content: ''; position: absolute; top: 50%; width: 40%;
  height: 1px; background: var(--border);
}
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }
.mock-input {
  width: 100%; padding: 10px 14px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; transition: border-color 0.15s;
  background: #f8fafc;
}
.mock-input:focus { border-color: var(--accent); background: #fff; }
.modal-tip {
  font-size: 12px; color: var(--text-secondary); text-align: center;
  margin-top: 14px; line-height: 1.5;
}

/* ===== 用户信息条 ===== */
.user-bar {
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.user-credits { font-size: 13px; color: var(--accent); font-weight: 500; }
.user-name { font-size: 13px; color: var(--text-secondary); }

/* ===== 通知 Toast ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #1a1a2e; color: #fff; padding: 12px 20px;
  border-radius: var(--radius-sm); font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== 课程详情页 ===== */
.project-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
}
.project-hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.project-breadcrumb {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 20px;
}
.project-breadcrumb a { color: var(--accent); }
.project-title { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.project-desc { font-size: 15px; color: var(--text-secondary); max-width: 700px; line-height: 1.7; margin-bottom: 24px; }
.project-info { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pi-badge {
  padding: 5px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
}

/* 学习区布局 */
.learn-layout {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px;
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
}
.learn-sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.sidebar-title {
  padding: 14px 16px;
  font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--border); color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.task-list { list-style: none; }
.task-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; cursor: pointer; transition: background 0.15s;
}
.task-item:hover { background: #f8fafc; }
.task-item.active { background: #eef2ff; color: var(--accent); }
.task-item:last-child { border-bottom: none; }
.task-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #f1f5f9; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600;
  flex-shrink: 0;
}
.task-item.active .task-num { background: var(--accent); color: #fff; }
.task-item.done .task-num { background: #22c55e; color: #fff; }

/* 主内容区 */
.learn-main {}
.learn-section {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 28px; margin-bottom: 20px;
}
.ls-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.ls-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.ls-body { font-size: 14px; color: var(--text-primary); line-height: 1.8; }
.ls-body p { margin-bottom: 12px; }
.ls-body h4 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; }
.ls-body ul { margin-left: 20px; }
.ls-body li { margin-bottom: 6px; }

/* 指标卡片 */
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; margin-top: 16px;
}
.metric-card {
  background: #f8fafc; border-radius: var(--radius-sm);
  padding: 14px; border: 1px solid var(--border);
}
.mc-abbr { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.mc-name { font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.mc-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.5; }

/* AI智能体嵌入区 */
.agent-embed {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e3a5f 100%);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  border: 1px solid rgba(99,102,241,0.3);
}
.ae-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ae-title { font-size: 15px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 8px; }
.ae-badge {
  padding: 3px 10px; border-radius: 12px;
  background: rgba(99,102,241,0.3); color: #a5b4fc;
  font-size: 11px;
}
.ae-credits { font-size: 12px; color: rgba(255,255,255,0.55); }
.ae-desc { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 16px; line-height: 1.6; }
.ae-chatbox {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); padding: 16px;
  min-height: 180px; margin-bottom: 12px;
}
.ae-messages { display: flex; flex-direction: column; gap: 10px; }
.msg {
  padding: 10px 14px; border-radius: 10px; font-size: 13px; max-width: 85%; line-height: 1.5;
}
.msg.bot { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9); align-self: flex-start; }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; }
.ae-input-row { display: flex; gap: 8px; }
.ae-input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); color: #fff; font-size: 13px; outline: none;
}
.ae-input::placeholder { color: rgba(255,255,255,0.35); }
.ae-input:focus { border-color: rgba(99,102,241,0.6); }
.ae-send {
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; border: none;
  font-size: 13px; cursor: pointer; font-weight: 500;
  transition: all 0.15s;
}
.ae-send:hover { background: #4338ca; }
.ae-lock {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 180px; gap: 12px;
}
.ae-lock-icon { font-size: 32px; opacity: 0.4; }
.ae-lock p { font-size: 13px; color: rgba(255,255,255,0.5); }
.ae-lock .btn-login { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 课程/智能体页 */
.page-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  padding: 60px 0;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-hero h1 { font-size: 32px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.page-hero p { font-size: 15px; color: rgba(255,255,255,0.7); }

/* 学习画像 */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px;
}
.dash-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border);
}
.dash-num { font-size: 32px; font-weight: 700; color: var(--accent); }
.dash-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.progress-bar-wrap { margin: 8px 0; }
.pbar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.pbar { height: 6px; background: #f1f5f9; border-radius: 3px; }
.pbar-fill { height: 6px; border-radius: 3px; background: var(--accent); transition: width 1s ease; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .learn-layout { grid-template-columns: 1fr; }
  .learn-sidebar { position: static; }
}
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 40px 24px; }
  .hero-title { font-size: 32px; }
  .hero-visual { width: 100%; }
  .chain-diagram { justify-content: center; }
  .course-grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .path-flow { flex-direction: column; }
  .path-arrow { transform: rotate(90deg); }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-note { text-align: center; }
}
