/* ========================================
   海角创作者成长营 - 主样式表
   配色：干货绿 #00C853 + 元气橙 #FF9800
   ======================================== */

/* CSS变量定义 */
:root {
  --color-primary: #00C853;
  --color-primary-dark: #009624;
  --color-secondary: #FF9800;
  --color-secondary-dark: #E65100;
  --color-bg: #F9FAFB;
  --color-card: #FFFFFF;
  --color-text: #37474F;
  --color-text-light: #607D8B;
  --color-border: #E0E0E0;
  --color-success: #4CAF50;
  --color-warning: #FFC107;
  --color-danger: #F44336;
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-title: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* 重置与基础 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== 导航栏 ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

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

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,200,83,0.4);
  color: #fff !important;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

/* ========== Hero区 ========== */
.hero-section {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #E8F5E9 0%, #FFF3E0 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,200,83,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero-text h1 .highlight {
  color: var(--color-primary);
  position: relative;
}

.hero-text h1 .highlight-orange {
  color: var(--color-secondary);
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-form {
  background: var(--color-card);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.hero-form h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: var(--transition);
}

.hero-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.1);
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ========== 按钮样式 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 28px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,200,83,0.35);
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: #fff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,152,0,0.35);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ========== 区块通用 ========== */
.section {
  padding: 80px 0;
}

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

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0,200,83,0.1);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ========== 课程卡片 ========== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.course-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.course-card .card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.course-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.course-card:hover .card-image img {
  transform: scale(1.05);
}

.course-card .card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.course-card .card-body {
  padding: 20px;
}

.course-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.course-card .card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.course-card .card-stars {
  color: var(--color-secondary);
}

.course-card .card-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-card .price-current {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-danger);
}

.course-card .price-original {
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-decoration: line-through;
}

/* ========== 商单速递 ========== */
.sponsor-scroll {
  overflow: hidden;
  position: relative;
}

.sponsor-track {
  display: flex;
  gap: 20px;
  animation: scrollLeft 30s linear infinite;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.sponsor-card {
  min-width: 300px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-secondary);
}

.sponsor-card .sponsor-brand {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.sponsor-card .sponsor-type {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.sponsor-card .sponsor-reward {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* ========== 导师区 ========== */
.mentors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.mentor-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.mentor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.mentor-card .mentor-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid var(--color-primary);
}

.mentor-card .mentor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mentor-card .mentor-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.mentor-card .mentor-title {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.mentor-card .mentor-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ========== 数据看板 ========== */
.stats-section {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  padding: 60px 0;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.stat-item .stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ========== 进度条动画 ========== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease;
}

.progress-fill.animated {
  width: var(--progress-width);
}

/* ========== 手风琴折叠菜单 ========== */
.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--color-card);
  cursor: pointer;
  transition: var(--transition);
}

.accordion-header:hover {
  background: #F5F5F5;
}

.accordion-header h4 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-header .free-tag {
  padding: 2px 8px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.accordion-header .arrow {
  transition: transform 0.3s;
}

.accordion-item.active .accordion-header .arrow {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: #FAFAFA;
}

.accordion-item.active .accordion-body {
  max-height: 500px;
}

.accordion-body-inner {
  padding: 16px 24px;
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ========== 诊断雷达图 ========== */
.diagnose-widget {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.radar-chart {
  width: 300px;
  height: 300px;
  margin: 0 auto;
  position: relative;
}

/* ========== 商单报价计算器 ========== */
.calculator-widget {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.calc-input-group {
  margin-bottom: 20px;
}

.calc-input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.calc-input-group input,
.calc-input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.calc-result {
  background: linear-gradient(135deg, #E8F5E9, #FFF3E0);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-top: 20px;
}

.calc-result .result-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-secondary);
}

/* ========== 打卡日历 ========== */
.calendar-widget {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.calendar-day {
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.calendar-day.checked {
  background: var(--color-primary);
  color: #fff;
}

.calendar-day.today {
  border: 2px solid var(--color-secondary);
}

/* ========== 倒计时 ========== */
.countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.countdown-item {
  background: var(--color-text);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 60px;
}

.countdown-item .count-num {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  animation: countPulse 1s ease infinite;
}

.countdown-item .count-label {
  font-size: 0.7rem;
  opacity: 0.8;
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========== 面包屑 ========== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumb a {
  color: var(--color-text-light);
}

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

.breadcrumb .separator {
  margin: 0 8px;
}

/* ========== 页脚 ========== */
.site-footer {
  background: #263238;
  color: #B0BEC5;
  padding: 60px 0 30px;
}

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

.footer-brand h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-links h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #B0BEC5;
  font-size: 0.88rem;
}

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

.footer-bottom {
  border-top: 1px solid #37474F;
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
}

.footer-bottom a {
  color: #B0BEC5;
  margin: 0 10px;
}

/* ========== 搜索页 ========== */
.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 56px;
  border: 2px solid var(--color-primary);
  border-radius: 32px;
  font-size: 1rem;
  outline: none;
}

.search-box button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 44px;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ========== 404页面 ========== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.3;
}

.error-page h2 {
  font-size: 1.5rem;
  margin: 16px 0;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .nav-menu.active {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .hero-text h1 {
    font-size: 2rem;
  }
  .section {
    padding: 50px 0;
  }
  .section-header h2 {
    font-size: 1.6rem;
  }
  .courses-grid {
    grid-template-columns: 1fr;
  }
  .mentors-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .stat-item .stat-number {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .mentors-grid {
    grid-template-columns: 1fr;
  }
  .hero-form {
    padding: 16px;
  }
  .container {
    padding: 0 16px;
  }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.hidden { display: none; }

/* 解锁动画 */
@keyframes unlock {
  0% { transform: scale(0.8) rotate(-10deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.unlock-anim {
  animation: unlock 0.6s ease forwards;
}

/* 渐入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.pulse-hover:hover {
  animation: pulse 0.8s ease infinite;
}
