/* ===========================================
   Vibe 学堂 - 主样式表
   =========================================== */

:root {
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --warning: #f59e0b;
  --success: #10b981;
  --bg: #fefdf8;
  --bg-alt: #f5f3ff;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
  --gradient-cool: linear-gradient(135deg, #ddd6fe 0%, #c7d2fe 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ 布局容器 ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ============ 导航栏 ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow);
}

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

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-light);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  background: var(--bg-alt);
}

.nav-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-alt);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.nav-progress-bar {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.nav-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  transition: width 0.4s;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: 8px;
  color: var(--text);
}

.mobile-menu-btn:hover {
  background: var(--bg-alt);
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover {
  background: var(--bg-alt);
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
}

/* ============ Hero 区 ============ */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #1f2937 0%, #7c3aed 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

/* ============ 章节标题 ============ */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gradient-soft);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ============ 卡片网格 ============ */
.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ============ 通用卡片 ============ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

/* ============ 模块卡片（首页）============ */
.module-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  overflow: hidden;
  transition: all 0.3s;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: var(--card-bg, var(--gradient));
  opacity: 0.95;
  z-index: 0;
}

.module-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.module-card-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.module-card-basics .module-card-icon {
  filter: drop-shadow(0 4px 12px rgba(124,58,237,0.3));
}

.module-card-vibe .module-card-icon {
  filter: drop-shadow(0 4px 12px rgba(236,72,153,0.3));
}

.module-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
  width: fit-content;
}

.module-card-title {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.module-card-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}

.module-card-body {
  flex: 1;
  margin-top: 16px;
}

.module-card-desc {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.module-card-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.module-card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.module-card-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.module-card-progress-fill {
  height: 100%;
  background: var(--card-accent, var(--primary));
  border-radius: 3px;
  transition: width 0.4s;
}

.module-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--card-accent, var(--primary));
}

.module-card-basics { --card-bg: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%); --card-accent: #7c3aed; }
.module-card-vibe { --card-bg: linear-gradient(135deg, #f472b6 0%, #ec4899 100%); --card-accent: #ec4899; }

/* ============ 课程卡片 ============ */
.lesson-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  position: relative;
}

.lesson-card:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  color: var(--text);
}

.lesson-card-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 17px;
}

.lesson-card.done .lesson-card-num {
  background: var(--success);
  color: white;
}

.lesson-card-body {
  flex: 1;
  min-width: 0;
}

.lesson-card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-card-summary {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.lesson-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.lesson-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lesson-card-arrow {
  font-size: 20px;
  color: var(--text-light);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.lesson-card:hover .lesson-card-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* ============ 特性卡片 ============ */
.feature-card {
  text-align: center;
  padding: 32px 24px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.feature-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* ============ 路径图 ============ */
.path-track {
  position: relative;
  padding: 40px 20px;
}

.path-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--border);
  transform: translateX(-50%);
  border-radius: 2px;
}

.path-node {
  position: relative;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: calc(50% - 40px);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.path-node::before {
  content: '';
  position: absolute;
  top: 30px;
  width: 20px;
  height: 20px;
  background: var(--bg-card);
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 1;
}

.path-node:nth-child(odd) {
  margin-left: auto;
}

.path-node:nth-child(odd)::before {
  left: -50px;
}

.path-node:nth-child(even)::before {
  right: -50px;
}

.path-node-num {
  display: inline-block;
  padding: 2px 10px;
  background: var(--gradient-soft);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* ============ CTA 区 ============ */
.cta {
  background: var(--gradient);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta::before, .cta::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.cta::before {
  width: 200px;
  height: 200px;
  top: -50px;
  right: -50px;
}

.cta::after {
  width: 150px;
  height: 150px;
  bottom: -50px;
  left: -50px;
}

.cta-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-desc {
  font-size: 17px;
  opacity: 0.95;
  margin-bottom: 28px;
  position: relative;
}

.cta .btn-primary {
  background: white;
  color: var(--primary);
  position: relative;
}

.cta .btn-primary:hover {
  color: var(--primary-dark);
}

/* ============ Footer ============ */
.footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 60px 0 30px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-title {
  color: white;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #9ca3af;
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid #374151;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #9ca3af;
}

/* ============ 浮动装饰元素 ============ */
.float {
  animation: float 6s ease-in-out infinite;
}

.float-2 { animation-delay: 1s; }
.float-3 { animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(8deg); }
}

/* ============ 滚动入场动画 ============ */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open .nav-link {
    padding: 12px 16px;
  }

  .hero {
    padding: 50px 0 70px;
  }

  .section {
    padding: 50px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta {
    padding: 40px 24px;
  }

  .module-card {
    min-height: 280px;
    padding: 28px;
  }

  .module-card::before {
    height: 130px;
  }

  .module-card-title {
    font-size: 24px;
  }

  .path-track::before {
    left: 24px;
  }

  .path-node {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }

  .path-node::before {
    left: -44px !important;
    right: auto !important;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-num {
    font-size: 26px;
  }
}

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
