/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
  /* 紫色系主色调 */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  --bg-primary: #faf9fe;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1e1b4b;
  --text-secondary: #4c4a7a;
  --text-muted: #8b89b3;
  --border-color: #e8e5f5;
  --shadow-sm: 0 1px 3px rgba(91, 33, 182, 0.06);
  --shadow-md: 0 4px 16px rgba(91, 33, 182, 0.08);
  --shadow-lg: 0 8px 32px rgba(91, 33, 182, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ========================================
   Container
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 249, 254, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-700);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--primary-900);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-500);
  border-radius: 1px;
  transition: width var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(
    160deg,
    var(--primary-50) 0%,
    #f0ecff 30%,
    var(--primary-100) 60%,
    #ede4ff 100%
  );
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-600);
  background: rgba(139, 92, 246, 0.1);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--primary-900);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--primary-700);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--primary-600);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 100px;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.hero-btn:hover {
  background: var(--primary-700);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.4);
}

/* Hero Decorations */
.hero-decoration {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: var(--primary-300);
  top: -100px;
  right: -80px;
  animation: float 8s ease-in-out infinite;
}

.circle-2 {
  width: 250px;
  height: 250px;
  background: var(--primary-400);
  bottom: -60px;
  left: -40px;
  animation: float 10s ease-in-out infinite reverse;
}

.circle-3 {
  width: 150px;
  height: 150px;
  background: var(--primary-200);
  top: 30%;
  left: 10%;
  animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ========================================
   Section Common
   ======================================== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-900);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 48px;
}

/* ========================================
   About Section
   ======================================== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 48px;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.85;
}

.about-text strong {
  color: var(--primary-700);
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--primary-50);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.info-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border-radius: var(--radius);
  line-height: 1;
  color: var(--primary-600);
  font-weight: 700;
}

.info-icon.text-icon-sm {
  font-size: 1.2rem;
}

.info-card h3 {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.info-card p {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   Courses Section
   ======================================== */
.courses {
  background: var(--bg-primary);
}

.course-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 48px;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-600);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.course-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition);
}

.course-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.course-card.active {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.course-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.course-header:hover {
  background: var(--primary-50);
}

.course-icon {
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  border-radius: var(--radius);
  line-height: 1;
  overflow: visible;
  color: var(--primary-600);
}

.course-icon.text-icon {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.course-meta {
  flex: 1;
}

.course-meta h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.course-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-600);
  background: rgba(139, 92, 246, 0.08);
  padding: 2px 10px;
  border-radius: 100px;
}

.course-arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.course-card.active .course-arrow {
  transform: rotate(90deg);
  color: var(--primary-600);
}

.course-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card.active .course-body {
  max-height: 800px;
}

.course-placeholder {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border-color);
  margin: 0 24px;
  padding-top: 20px;
}

.course-placeholder p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ========================================
   Course Detail (Expanded Content)
   ======================================== */
.course-detail {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border-color);
  margin: 0 24px;
  padding-top: 20px;
}

.course-overview {
  margin-bottom: 20px;
}

.course-overview h4,
.course-outline h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-700);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-overview p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.course-outline {
  margin-bottom: 20px;
}

.outline-section {
  margin-bottom: 14px;
}

.outline-section h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 3px solid var(--primary-400);
}

.outline-section ul {
  list-style: none;
  padding-left: 12px;
}

.outline-section li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 2px 0;
  position: relative;
  padding-left: 12px;
}

.outline-section li::before {
  content: '•';
  color: var(--primary-400);
  position: absolute;
  left: 0;
}

.course-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--primary-900);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.footer-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.footer-info p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.7;
}

.footer-links p {
  font-size: 0.85rem;
  opacity: 0.5;
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.4;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .course-stats {
    gap: 30px;
    padding: 20px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(250, 249, 254, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    padding: 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 24px 60px;
    min-height: 90vh;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 20px;
  }

  .section {
    padding: 70px 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .course-header {
    padding: 18px;
  }

  .info-card {
    padding: 16px;
  }
}
