:root {
  /* 核心色板 - 能量绿 */
  --primary-hue: 142;
  --primary-dark: hsl(var(--primary-hue), 76%, 25%);    /* 深邃 */
  --primary-main: hsl(var(--primary-hue), 71%, 45%);    /* 品牌主色 */
  --primary-bright: hsl(var(--primary-hue), 80%, 60%);  /* 高光 */
  --primary-glow: hsl(var(--primary-hue), 90%, 70%);    /* 发光 */

  /* 中性色板 */
  --bg-base: #ffffff;
  --bg-alt: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-light: #e2e8f0;
  
  /* 空间与圆角 */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --container-width: 1280px;
  
  /* 阴影系统 */
  --shadow-soft: 0 4px 20px -2px rgba(22, 163, 74, 0.08);
  --shadow-glow: 0 8px 30px -5px rgba(34, 197, 94, 0.4);
  --shadow-card: 0 10px 40px -10px rgba(0,0,0,0.05);
}

/* 全局重置与字体 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* 全局触摸优化 - 移除iOS/Android老浏览器的触摸高亮 */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* 全局点击元素优化 - 确保所有可交互元素都有快速反馈 */
button, a, .btn, .option {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background: var(--bg-base);
  line-height: 1.6;
  overflow-x: hidden;
}

a { 
  text-decoration: none; 
  color: inherit; 
  transition: all 0.3s ease;
  
  /* 移除触摸设备的蓝色高亮框 */
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* 移除链接各状态下的outline */
a:focus,
a:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* 键盘导航可访问性 */
a:focus-visible {
  outline: 2px solid var(--primary-main);
  outline-offset: 2px;
}

ul { list-style: none; }

/* 容器通用 */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   Navbar: 悬浮玻璃顶栏
   ========================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.site-nav .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links > * {
  margin-right: 32px;
}

.nav-links > *:last-child {
  margin-right: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--primary-main);
}

/* 仅对非按钮的导航链接添加点击反馈 */
.nav-links a:not(.btn):active {
  color: var(--primary-dark);
  transform: scale(0.95);
  opacity: 0.8;
  transition: all 0.1s ease;
}

/* 按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  letter-spacing: 0.5px;
  
  /* 移除平板/触摸设备的蓝色框和高亮效果 */
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 移除所有按钮状态下的outline */
.btn:focus,
.btn:active,
.btn:hover {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* 为可访问性保留键盘焦点样式（仅当使用键盘导航时显示） */
.btn:focus-visible {
  outline: 2px solid var(--primary-main);
  outline-offset: 2px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-main), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: 0.5s;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.btn.primary:hover::after {
  left: 100%;
}

/* Primary按钮点击反馈 - 老浏览器兼容 */
.btn.primary:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
  transition: all 0.1s ease;
}

.btn.ghost {
  background: transparent;
  color: var(--primary-dark);
  border: 2px solid rgba(34, 197, 94, 0.2);
  position: relative;
}

.btn.ghost:hover {
  background: rgba(34, 197, 94, 0.05);
  border-color: var(--primary-main);
  transform: translateY(-1px);
}

/* Ghost按钮点击反馈 - 明显的视觉变化，老浏览器兼容 */
.btn.ghost:active {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--primary-dark);
  transform: scale(0.96);
  box-shadow: inset 0 2px 8px rgba(34, 197, 94, 0.2);
  transition: all 0.1s ease;
}

.btn-sm { 
  padding: 8px 20px; 
  font-size: 14px; 
}

/* 小按钮点击反馈优化 - 保持与大按钮一致的反馈 */
.btn-sm:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

.btn-sm.primary:active {
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
}

.btn-sm.ghost:active {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--primary-dark);
}

/* =========================================
   Hero Section: 能量引擎
   ========================================= */
.hero {
  position: relative;
  padding: 160px 0 100px;
  background: radial-gradient(circle at 50% 0%, #f0fdf4 0%, #ffffff 60%);
  overflow: hidden;
}

/* 动态背景网格 */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  z-index: 0;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* 动态标签 */
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary-dark);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 24px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  animation: fadeInDown 0.8s ease-out;
}

.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--primary-main);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 10px var(--primary-main);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 64px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--text-main), #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.hero h1 .highlight {
  color: var(--primary-main);
  -webkit-text-fill-color: var(--primary-main);
  position: relative;
  display: inline-block;
}

/* 下划线动画 */
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 12px;
  background: rgba(74, 222, 128, 0.3);
  z-index: -1;
  transform: skewX(-15deg);
}

.hero p {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-actions {
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.hero-actions > * {
  margin-right: 16px;
}

.hero-actions > *:last-child {
  margin-right: 0;
}

/* =========================================
   Live Demo: 即时反馈引擎特效
   ========================================= */
.live-demo-wrapper {
  margin-top: 64px;
  position: relative;
  perspective: 1000px;
  animation: fadeInUp 1s ease-out 0.5s backwards;
}

.live-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255,255,255,0.8);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  transform: rotateX(2deg);
  transition: transform 0.5s ease;
}

.live-card:hover {
  transform: rotateX(0deg) translateY(-5px);
  box-shadow: 0 30px 60px -12px rgba(34, 197, 94, 0.15);
}

/* 模拟界面 Header */
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  background: #fafafa;
}

.card-header > * {
  margin-right: 12px;
}

.card-header > *:last-child {
  margin-right: 0;
}

.traffic-lights { 
  display: flex; 
}

.traffic-lights .light {
  margin-right: 6px;
}

.traffic-lights .light:last-child {
  margin-right: 0;
}
.light { width: 10px; height: 10px; border-radius: 50%; }
.light.red { background: #ef4444; }
.light.yellow { background: #f59e0b; }
.light.green { background: #22c55e; }
.address-bar {
  flex: 1;
  height: 28px;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 模拟界面 Body */
.card-body {
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  column-gap: 40px;
  row-gap: 40px;
  align-items: end; /* 改为底部对齐 */
}

/* 左侧：问题区 */
.question-box h3 {
  font-size: 24px;
  margin-bottom: 24px;
}
.option {
  display: block;
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: white;
  text-align: left;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  
  /* 移除触摸设备的蓝色高亮框 */
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.option:hover { 
  border-color: var(--primary-bright); 
  background: var(--bg-alt);
  transform: translateX(2px);
}

/* 选项点击反馈 - 老浏览器兼容 */
.option:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  border-color: var(--primary-main);
  background: rgba(34, 197, 94, 0.08);
  transform: scale(0.98);
  box-shadow: inset 0 2px 8px rgba(34, 197, 94, 0.15);
  transition: all 0.1s ease;
}

.option:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* 模拟选对特效 */
.option.correct {
  border-color: var(--primary-main);
  background: #f0fdf4;
  color: var(--primary-dark);
}
.option.correct::after {
  content: '✓';
  position: absolute;
  right: 16px;
  font-weight: bold;
}

/* 右侧：实时反馈仪表盘 */
.feedback-panel {
  background: #f8fafc;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  align-self: flex-end; /* 向下对齐 */
}
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stat-label { font-size: 14px; color: var(--text-muted); }
.stat-val { font-weight: 700; font-size: 18px; color: var(--text-main); }

/* 动态进度条 */
.progress-group { margin-top: 20px; }
.pg-label { font-size: 12px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.pg-track { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.pg-fill {
  height: 100%;
  background: var(--primary-main);
  width: 0;
  transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
/* 进度条光效 */
.pg-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

/* =========================================
   动画定义
   ========================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* =========================================
   滚动动效 Reveal
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Feature Cards: 特性展示 (旧版保留/通用)
   ========================================= */
.features-section {
  padding: 100px 0;
  background: white;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  row-gap: 32px;
  margin-top: 64px;
}

.feature-card {
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  background: white;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.feature-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.icon-box {
  width: 64px; height: 64px;
  background: #f0fdf4;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--primary-main);
  transition: all 0.3s ease;
}

.feature-card:hover .icon-box {
  background: var(--primary-main);
  color: white;
  transform: scale(1.1) rotate(3deg);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* =========================================
   Section A: 综合学习闭环 (Learning Loop)
   ========================================= */
.loop-section {
  background: var(--bg-alt);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
}

.section-header h2 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  font-size: 18px;
  color: var(--text-muted);
}

.loop-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

/* 连接线背景 */
.loop-container::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50px;
  right: 50px;
  height: 4px;
  background: #e2e8f0;
  z-index: 0;
}

.loop-step {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 200px;
}

.loop-icon {
  width: 80px; height: 80px;
  background: white;
  border: 4px solid var(--bg-alt); /* 创建间隔 */
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary-main);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.loop-step:hover .loop-icon {
  transform: scale(1.1);
  color: white;
  background: var(--primary-main);
  box-shadow: 0 15px 30px rgba(34, 197, 94, 0.3);
}

.loop-step h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.loop-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   Section B: 核心模块 (Module Cards)
   ========================================= */
.modules-section {
  padding: 80px 0;
  background: white;
}

.module-row {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 120px;
}

.module-row:last-child {
  margin-bottom: 0;
}

.module-row:nth-child(even) {
  flex-direction: row-reverse;
}

.module-content {
  flex: 1;
}

.module-visual {
  flex: 1;
  position: relative;
}

/* 图3风格标题 */
.module-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  background: rgba(34, 197, 94, 0.08);
  padding: 4px 12px;
  border-radius: 6px;
}

.module-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-main);
}

.module-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.module-list-item {
  display: flex;
  align-items: flex-start;
}

.module-list-item i {
  color: var(--primary-main);
  margin-top: 4px;
  margin-right: 12px;
  font-size: 16px;
}

.module-list-item span {
  font-size: 16px;
}

.module-card-visual {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 装饰性背景元素 */
.module-card-visual::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: var(--primary-main);
  filter: blur(80px);
  opacity: 0.1;
  border-radius: 50%;
  top: -50px; right: -50px;
}

.visual-icon-lg {
  font-size: 80px;
  color: var(--primary-main);
  opacity: 0.8;
  filter: drop-shadow(0 10px 20px rgba(34, 197, 94, 0.2));
  transition: all 0.5s ease;
}

.module-row:hover .visual-icon-lg {
  transform: scale(1.1) rotate(-5deg);
}

/* =========================================
   Module 1: Learning Loop Visual
   ========================================= */
.learning-loop-visual {
  padding: 0 !important; /* Reset padding for absolute positioning */
}

.loop-path-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  max-width: 500px;
}

/* Flow Animation Keyframes */
@keyframes flowDash {
  to {
    stroke-dashoffset: -920;
  }
}

.active-path-anim {
  animation: flowDash 3s linear infinite;
}

.loop-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: default;
}

.node-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-muted);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(255,255,255,0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* Node pulsing indicator */
.node-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 2px solid var(--primary-main);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s;
}

.node-label {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.9);
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  transition: color 0.3s;
}

/* Node Positions (Matches SVG Path Rect: 50,60 300x180) 
   SVG ViewBox 0 0 400 300
   Rect X=50(12.5%) Y=60(20%) W=300(75%) H=180(60%)
   Corners:
   TL: 12.5% 20%
   TR: 87.5% 20%
   BR: 87.5% 80%
   BL: 12.5% 80%
*/
.node-top-left     { left: 12.5%; top: 20%; }
.node-top-right    { left: 87.5%; top: 20%; }
.node-bottom-right { left: 87.5%; top: 80%; }
.node-bottom-left  { left: 12.5%; top: 80%; }

/* Active/Hover States */
.loop-node:hover .node-icon,
.loop-node.active .node-icon {
  transform: scale(1.15);
  color: var(--primary-main);
  background: white;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
  border-color: var(--primary-main);
}

.loop-node:hover .node-label {
  color: var(--primary-main);
}

/* Sequential Animation for Nodes (Optional, CSS only approach) */
@keyframes pulseNode {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: white; color: var(--text-muted); }
  50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); border-color: var(--primary-main); color: var(--primary-main); }
}

/* Staggered animation matching the loop 4s */
.node-top-left .node-icon     { animation: pulseNode 4s infinite 0s; }
.node-top-right .node-icon    { animation: pulseNode 4s infinite 1s; }
.node-bottom-right .node-icon { animation: pulseNode 4s infinite 2s; }
.node-bottom-left .node-icon  { animation: pulseNode 4s infinite 3s; }

/* =========================================
   Module 3: Context Reader Visual
   ========================================= */
.context-reader-demo {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reader-card {
  background: white;
  padding: 32px 40px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  max-width: 420px;
  width: 90%;
  position: relative;
}

.reader-text {
  font-family: inherit; /* MODULE 03: use Inter */
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
}

.word-highlight {
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0 4px;
  border-radius: 4px;
}

/* Tooltip Styles */
.word-tooltip {
  position: absolute;
  left: var(--tt-x, 20px);
  top: var(--tt-y, 60px);
  background: #1e293b;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  width: 220px;
  z-index: 20;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
}

.word-title { font-weight: bold; color: #4ade80; font-size: 12px; }
.word-phonetic { font-family: inherit; opacity: 0.8; font-size: 12px; }
.tooltip-def { margin-bottom: 6px; font-weight: 500; font-size: 12px; }
.tooltip-level { font-size: 12px; opacity: 0.85; color: #fbbf24; font-weight: 600; }

/* Tooltip Positions */
.tooltip-master {
  /* Fallback positioning; JS will override for accuracy */
  --tt-x: 20px;
  --tt-y: 60px;
}

.tooltip-context {
  /* Fallback positioning; JS will override for accuracy */
  --tt-x: 20px;
  --tt-y: 60px;
}

/* Cursor Styles */
.cursor-pointer {
  position: absolute;
  font-size: 16px;
  color: var(--text-main);
  text-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 30;
  top: 110%; /* Start off screen or below */
  left: 50%;
  opacity: 0;
  /* Fallback path anchors; JS will override with px positions for accuracy */
  --cursor-start-x: 50%;
  --cursor-start-y: 120%;
  --cursor-master-x: 35%;
  --cursor-master-y: 25%;
  --cursor-context-x: 15%;
  --cursor-context-y: 70%;
  --cursor-exit-x: 50%;
  --cursor-exit-y: 120%;
}

/* Animation Keyframes */
/* 
Total Cycle: ~10s
0s: Start
1s: Cursor moves to 'master'
2s: Click 'master'
2.1s - 5s: Tooltip 'master' shows
5s: Cursor moves to 'context'
6s: Click 'context'
6.1s - 9s: Tooltip 'context' shows
10s: Reset
*/

/* Cursor Animation */
@keyframes cursorPath {
  0% { opacity: 0; top: var(--cursor-start-y); left: var(--cursor-start-x); transform: scale(1); }
  5% { opacity: 1; top: var(--cursor-start-y); left: var(--cursor-start-x); }
  15% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); } /* Move to 'master' */
  18% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(0.8); } /* Click press */
  20% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); } /* Click release */
  45% { top: var(--cursor-master-y); left: var(--cursor-master-x); } /* Stay */
  55% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); } /* Move to 'context' */
  58% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(0.8); } /* Click press */
  60% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); } /* Click release */
  85% { top: var(--cursor-context-y); left: var(--cursor-context-x); opacity: 1; } /* Stay */
  95% { top: var(--cursor-exit-y); left: var(--cursor-exit-x); opacity: 0; } /* Exit */
  100% { opacity: 0; }
}

/* Tooltip Animations */
@keyframes showTooltipMaster {
  0%, 18% { opacity: 0; transform: translateY(10px); }
  20%, 45% { opacity: 1; transform: translateY(0); }
  50%, 100% { opacity: 0; transform: translateY(10px); }
}

@keyframes showTooltipContext {
  0%, 58% { opacity: 0; transform: translateY(10px); }
  60%, 85% { opacity: 1; transform: translateY(0); }
  90%, 100% { opacity: 0; transform: translateY(10px); }
}

/* Highlight Animations */
@keyframes highlightMaster {
  0%, 18% { background-color: transparent; color: inherit; }
  20%, 45% { background-color: rgba(34, 197, 94, 0.2); color: var(--primary-dark); }
  50%, 100% { background-color: transparent; color: inherit; }
}

@keyframes highlightContext {
  0%, 58% { background-color: transparent; color: inherit; }
  60%, 85% { background-color: rgba(34, 197, 94, 0.2); color: var(--primary-dark); }
  90%, 100% { background-color: transparent; color: inherit; }
}

/* Applying Animations */
.cursor-pointer {
  animation: cursorPath 10s infinite;
}

.tooltip-master {
  animation: showTooltipMaster 10s infinite;
}

.tooltip-context {
  animation: showTooltipContext 10s infinite;
}

.word-highlight[data-word="master"] {
  animation: highlightMaster 10s infinite;
}

.word-highlight[data-word="context"] {
  animation: highlightContext 10s infinite;
}


/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 1024px) {
  .hero h1 { font-size: 48px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .module-row { gap: 40px; }
  .module-title { font-size: 32px; }
}

@media (max-width: 768px) {
  /* 移动端：只显示登入和注册按钮，隐藏其他导航链接 */
  .nav-links {
    display: flex;
  }
  .nav-links a:not(.btn) {
    display: none; /* 隐藏非按钮的导航链接 */
  }
  .nav-links .btn {
    padding: 8px 16px; /* 移动端按钮稍微小一点 */
    font-size: 13px;
    margin-right: 8px;
  }
  .nav-links .btn:last-child {
    margin-right: 0;
  }
  
  .hero { padding-top: 120px; }
  .hero h1 { font-size: 36px; }
  .card-body { grid-template-columns: 1fr; padding: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .live-card { margin: 0 16px; }
  
  .loop-container {
    flex-direction: column;
    align-items: center;
  }
  .loop-container::before {
    width: 4px; height: 100%;
    top: 0; left: 50%;
    transform: translateX(-50%);
  }
  .loop-step {
    width: 100%;
    margin-bottom: 40px;
    background: var(--bg-alt); /* 遮挡线条 */
    padding: 20px 0;
  }
  /* 最后一个元素：移除下边距，延长背景遮盖竖线 */
  .loop-step:last-child {
    margin-bottom: 0;
    padding-bottom: 60px; /* 延长背景高度来遮盖下方的竖线 */
  }
  
  .module-row, .module-row:nth-child(even) {
    flex-direction: column;
    margin-bottom: 80px;
  }
  
  /* 确保移动端Module内容和视觉效果都显示 */
  .module-content {
    width: 100%;
    margin-bottom: 30px;
  }
  
  .module-visual {
    width: 100%;
    order: 2; /* 视觉效果放在下方 */
  }
  
  /* 确保reveal元素在移动端立即显示，不等待动画 */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Module视觉效果移动端优化 */
  .module-visual {
    width: 100%;
    min-height: 300px; /* 确保有足够高度 */
    overflow: hidden; /* 防止溢出 */
  }
  
  /* 确保所有视觉容器都显示 */
  .module-visual > * {
    width: 100% !important;
    max-width: 100%;
  }
  
  .module-card-visual {
    min-height: 300px;
    padding: 30px 20px;
  }
  
  /* Module 1: Learning Loop */
  .loop-path-svg {
    transform: translate(-50%, -50%) scale(0.85);
  }
  .loop-node {
    font-size: 12px;
  }
  
  /* Module 2: Vocab Canvas */
  #vocabCanvas {
    min-height: 300px !important;
    height: 300px !important;
    display: block !important;
  }
  
  /* 为Canvas添加一个备用背景，确保即使未加载也能看到 */
  #vocabCanvas {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%) !important;
  }
  
  /* Module 3: 阅读理解 - 移动端优化 */
  .context-reader-demo {
    min-height: 280px;
  }
  .reader-card {
    padding: 20px;
    max-width: 100%; /* 允许卡片占满宽度 */
  }
  
  /* 不改变字体大小，保持原有布局 */
  .word-tooltip {
    font-size: 12px;
    width: 180px; /* 缩小宽度以适应手机屏幕 */
  }
  
  /* context tooltip使用和master一样的定位方式 */
  .tooltip-context {
    /* 使用和master相同的left定位，而不是right */
    --tt-x: 20px;
    --tt-y: 60px;
  }
  
  /* 保持master的位置不变 */
  .tooltip-master {
    --tt-x: 20px;
    --tt-y: 60px;
  }
  
  /* 修复光标动画路径：context在第三行末尾（右侧） */
  @keyframes cursorPath {
    0% { opacity: 0; top: var(--cursor-start-y); left: var(--cursor-start-x); transform: scale(1); }
    5% { opacity: 1; top: var(--cursor-start-y); left: var(--cursor-start-x); }
    15% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); } /* Move to 'master' */
    18% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(0.8); } /* Click press */
    20% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); } /* Click release */
    45% { top: var(--cursor-master-y); left: var(--cursor-master-x); } /* Stay */
    55% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); } /* Move to 'context' */
    58% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(0.8); } /* Click press */
    60% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); } /* Click release */
    85% { top: var(--cursor-context-y); left: var(--cursor-context-x); opacity: 1; } /* Stay */
    95% { top: var(--cursor-exit-y); left: var(--cursor-exit-x); opacity: 0; } /* Exit */
    100% { opacity: 0; }
  }
  
  /* Module 4: 语法动画 */
  .grammar-anim-container {
    min-height: 280px !important;
    height: 280px !important;
  }
  .grammar-slide {
    padding: 24px 16px 16px 16px;
  }
  .g-sentence {
    font-size: 16px;
    gap: 6px;
  }
  
  /* Module 5: 题型熟练度 */
  .proficiency-demo {
    min-height: 280px !important;
  }
  .prof-card {
    padding: 16px;
  }
  .prof-question {
    font-size: 16px;
  }
  
  /* Module 6: 复盘雷达图 */
  .radar-anim-container {
    min-height: 280px !important;
  }
  .radar-wrapper {
    width: 240px !important;
    height: 240px !important;
  }
  .radar-label {
    font-size: 12px;
  }
}

/* 针对更小的手机屏幕优化 */
@media (max-width: 480px) {
  .site-nav .inner {
    padding: 0 12px;
  }
  
  .logo {
    font-size: 20px; /* 缩小Logo以留出更多空间 */
  }
  
  .nav-links .btn {
    padding: 6px 12px; /* 更小的按钮 */
    font-size: 12px;
    margin-right: 6px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  /* 小屏手机Module优化 */
  .module-visual {
    min-height: 250px;
  }
  
  .module-card-visual {
    min-height: 250px;
    padding: 20px 15px;
  }
  
  /* 确保Canvas和动画容器有最小高度 */
  #vocabCanvas,
  .grammar-anim-container,
  .proficiency-demo,
  .radar-anim-container {
    min-height: 250px !important;
    height: 250px !important;
  }
  
  /* 缩小雷达图 */
  .radar-wrapper {
    width: 200px !important;
    height: 200px !important;
  }
  
  /* 调整动画文字大小 */
  .g-sentence {
    font-size: 16px;
  }
  
  .prof-question {
    font-size: 16px;
  }
  
  /* Module 3小屏优化 - 不改变字体大小 */
  .word-tooltip {
    width: 160px;
    padding: 10px 12px;
    font-size: 12px;
  }
  
  /* context和master使用相同的定位方式 */
  .tooltip-context,
  .tooltip-master {
    --tt-x: 10px;
  }
  
  .tooltip-context {
    --tt-y: 50px;
  }
  
  .tooltip-master {
    --tt-y: 50px;
  }
  
  /* 小屏幕上光标动画路径相同 */
  @keyframes cursorPath {
    0% { opacity: 0; top: var(--cursor-start-y); left: var(--cursor-start-x); transform: scale(1); }
    5% { opacity: 1; top: var(--cursor-start-y); left: var(--cursor-start-x); }
    15% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); }
    18% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(0.8); }
    20% { top: var(--cursor-master-y); left: var(--cursor-master-x); transform: scale(1); }
    45% { top: var(--cursor-master-y); left: var(--cursor-master-x); }
    55% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); } /* context */
    58% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(0.8); }
    60% { top: var(--cursor-context-y); left: var(--cursor-context-x); transform: scale(1); }
    85% { top: var(--cursor-context-y); left: var(--cursor-context-x); opacity: 1; }
    95% { top: var(--cursor-exit-y); left: var(--cursor-exit-x); opacity: 0; }
    100% { opacity: 0; }
  }
}
