/* 产品与服务页面样式 - 主题切换版本 */

/* CSS变量定义 - 白天模式（灰白金黑配色） */
:root {
  /* 主色调 - 金色系 */
  --primary-color: #D4AF37;
  --primary-dark: #B8860B;
  --primary-light: #F7E7CE;
  --primary-accent: #DAA520;

  /* 背景色 - 白灰系 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F3F4;
  --bg-accent: #FEFEFE;

  /* 文字颜色 - 黑灰系 */
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6C757D;
  --text-inverse: #FFFFFF;
  --text-accent: #2C3E50;

  /* 边框颜色 - 灰色系 */
  --border-color: #DEE2E6;
  --border-light: #E9ECEF;
  --border-dark: #ADB5BD;

  /* 阴影 - 温和阴影 */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.12);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.15);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.18);

  /* 状态颜色 */
  --success-color: #28A745;
  --warning-color: #FFC107;
  --error-color: #DC3545;

  /* 渐变 - 金色主题 */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-secondary: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  --gradient-gold: linear-gradient(135deg, #F7E7CE, #D4AF37, #B8860B);
  --gradient-elegant: linear-gradient(145deg, #FFFFFF, #F8F9FA, #F1F3F4);
}

/* 黑夜模式变量（黑灰金配色） */
[data-theme="dark"] {
  /* 主色调 - 柔和金色 */
  --primary-color: #F4D03F;
  --primary-dark: #D4AF37;
  --primary-light: #F7DC6F;
  --primary-accent: #F39C12;

  /* 背景色 - 黑灰系 */
  --bg-primary: #1A1D23;
  --bg-secondary: #2C3E50;
  --bg-card: #2C3E50;
  --bg-hover: #34495E;
  --bg-accent: #273746;

  /* 文字颜色 - 白灰系 */
  --text-primary: #F8F9FA;
  --text-secondary: #DEE2E6;
  --text-muted: #ADB5BD;
  --text-inverse: #1A1D23;
  --text-accent: #ECF0F1;

  /* 边框颜色 - 中性灰 */
  --border-color: #495057;
  --border-light: #6C757D;
  --border-dark: #343A40;

  /* 阴影 - 深色阴影 */
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 6px 12px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 15px 25px -5px rgb(0 0 0 / 0.6);
  --shadow-xl: 0 25px 35px -8px rgb(0 0 0 / 0.7);

  /* 状态颜色 */
  --success-color: #2ECC71;
  --warning-color: #F39C12;
  --error-color: #E74C3C;

  /* 渐变 - 黑夜金色主题 */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-secondary: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  --gradient-gold: linear-gradient(135deg, #F7DC6F, #F4D03F, #D4AF37);
  --gradient-elegant: linear-gradient(145deg, #2C3E50, #34495E, #273746);
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 平滑滚动行为 */
html {
  scroll-behavior: smooth;
}

/* 顶部导航栏 */
.header {
  background: #333;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo img {
  height: 45px;
  transition: all 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

/* 主导航菜单 */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 35px;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  transition: all 0.3s ease;
  position: relative;
  font-size: 16px;
}

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

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

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

/* 主题切换器 - 新设计 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  position: relative;
}

.theme-btn {
  width: 60px;
  height: 32px;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.theme-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(212 175 55 / 0.15), var(--shadow-md);
  background: var(--bg-hover);
}

.theme-btn:active {
  transform: scale(0.95);
}

.theme-switch {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 14px;
  background: var(--gradient-elegant);
  overflow: hidden;
}

.theme-slider {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  background: var(--gradient-gold);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

[data-theme="dark"] .theme-slider {
  transform: translateX(26px);
  background: var(--gradient-gold);
  box-shadow: var(--shadow-lg);
}

.theme-icon {
  font-size: 12px;
  transition: all 0.3s ease;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.light-icon {
  opacity: 1;
  transform: scale(1);
}

.dark-icon {
  opacity: 0;
  transform: scale(0.8);
}

[data-theme="dark"] .light-icon {
  opacity: 0;
  transform: scale(0.8);
}

[data-theme="dark"] .dark-icon {
  opacity: 1;
  transform: scale(1);
}

/* 主题切换动画增强 */
.theme-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(212 175 55 / 0.25), var(--shadow-md);
}

.theme-slider:hover {
  transform: scale(1.05);
}

[data-theme="dark"] .theme-slider:hover {
  transform: translateX(26px) scale(1.05);
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
}

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

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

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.mobile-nav-menu {
  list-style: none;
  margin: 0;
  padding: 20px;
}

.mobile-nav-menu li {
  margin-bottom: 15px;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 0;
  display: block;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.mobile-nav-link:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.mobile-theme-toggle {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 10px;
}

.mobile-theme-btn {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.mobile-theme-btn:hover {
  border-color: var(--primary-color);
  background: var(--bg-hover);
}

.theme-text {
  font-weight: 500;
  white-space: nowrap;
}

/* 移动端主题图标优化 */
.mobile-theme-btn .theme-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* 黑夜模式下隐藏白天相关元素 */
[data-theme="dark"] .mobile-theme-btn .light-icon {
  display: none;
}

[data-theme="dark"] .mobile-theme-btn .light-icon + .theme-text {
  display: none;
}

/* 白天模式下隐藏夜间相关元素 */
[data-theme="light"] .mobile-theme-btn .dark-icon {
  display: none;
}

[data-theme="light"] .mobile-theme-btn .dark-icon + .theme-text {
  display: none;
}

/* 登录按钮 */
.login-modal{
  opacity: 0;
}
.captcha-modal {
  opacity: 0;
}
.login-btn {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-inverse);
}

/* 主要内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 课程区域 */
.courses-section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  margin: 15px auto;
  border-radius: 2px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.course-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid var(--border-light);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.course-image {
  width: 100%;
  aspect-ratio: 1125 / 844;
  object-fit: cover;
  transition: transform 0.3s ease;
  background: var(--bg-secondary);
  position: relative;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 课程覆盖层 */
.course-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.course-card:hover .course-overlay {
  opacity: 1;
}

/* 播放按钮 */
.play-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 播放图标 */
.play-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* VIP课程锁定图标 */
.course-lock {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* 兼容性备选方案 - 对于不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 1125 / 844) {
  .course-image {
    height: calc(100vw * 0.75); /* 近似 844/1125 的比例 */
    max-height: 250px;
  }

  @media (min-width: 768px) {
    .course-image {
      height: calc((100vw - 120px) / 2 * 0.75); /* 平板端2列布局 */
      max-height: 200px;
    }
  }

  @media (min-width: 1024px) {
    .course-image {
      height: calc((100vw - 160px) / 3 * 0.75); /* 桌面端3列布局 */
      max-height: 180px;
    }
  }
}

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

.course-info {
  padding: 25px;
}

.course-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.course-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.course-type {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.course-type.free {
  background: rgb(16 185 129 / 0.1);
  color: var(--success-color);
  border: 1px solid rgb(16 185 129 / 0.2);
}

.course-type.vip {
  background: rgb(245 158 11 / 0.1);
  color: var(--warning-color);
  border: 1px solid rgb(245 158 11 / 0.2);
}

.course-duration {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.course-calories {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* 跳转按钮区域 */
.cta-section {
  text-align: center;
  margin: 60px 0;
}

.home-btn {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 20px 50px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: var(--shadow-md);
}

.home-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: var(--text-inverse);
}

/* 会员购买区域 */
.membership-section {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 50px;
  margin-top: 60px;
  border: 1px solid var(--border-color);
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* 会员卡片基础样式 */
.membership-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 0;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 2px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.membership-card:hover {
  transform: translateY(-12px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 特殊卡片样式 */
.membership-card.popular {
  border-color: var(--primary-color);
  transform: scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.membership-card.popular:hover {
  transform: scale(1.02) translateY(-12px);
}

.membership-card.premium {
  border-color: #8B5CF6;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.05) 100%);
}

/* 推荐标签 */
.membership-badge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.membership-badge.popular-badge {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
}

.membership-badge.premium-badge {
  background: linear-gradient(135deg, #8B5CF6, #A855F7);
  color: white;
}

/* 卡片头部 */
.membership-header {
  padding: 30px 30px 20px;
}

.membership-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.membership-name {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* 价格区域 */
.membership-pricing {
  padding: 0 30px;
  margin-bottom: 25px;
}

.membership-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 10px;
  gap: 2px;
}

.membership-price .currency {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
}

.membership-price .amount {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
}

.membership-price .period {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}

.membership-savings {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.membership-discount {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* 描述区域 */
.membership-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
  padding: 0 30px;
  font-size: 15px;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}



/* 购买按钮区域 */
.membership-action {
  padding: 0 30px 30px;
  margin-top: auto;
}

/* 购买按钮样式 */
.buy-btn {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

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

.buy-btn:hover::before {
  left: 100%;
}

.buy-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  color: var(--text-inverse);
}

.buy-btn.popular-btn {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.buy-btn.popular-btn:hover {
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.buy-btn.premium-btn {
  background: linear-gradient(135deg, #8B5CF6, #A855F7);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.buy-btn.premium-btn:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.buy-btn .btn-text {
  font-weight: 700;
}

.buy-btn .btn-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.buy-btn:hover .btn-icon {
  transform: translateX(4px);
}

.buy-btn.clicked {
  transform: scale(0.95);
}

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

.buy-btn.secondary:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
}

/* 响应式设计 */

/* 超大屏幕优化 (1440px+) */
@media (min-width: 1440px) {
  .header .container {
    max-width: 1600px;
  }

  .main-content {
    max-width: 1400px;
    padding: 60px 30px;
  }

  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .membership-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

/* 桌面端优化 (1024px - 1439px) */
@media (max-width: 1439px) and (min-width: 1024px) {
  .header .container {
    max-width: 1200px;
  }

  .nav-menu {
    gap: 25px;
  }

  .courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
  }
}

/* 平板端优化 (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .header .container {
    padding: 0 25px;
  }

  .nav-menu {
    gap: 20px;
  }

  .nav-link {
    font-size: 14px;
  }

  .main-content {
    padding: 30px 25px;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .membership-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .membership-card {
    min-height: 300px;
  }

  .membership-card.popular {
    transform: scale(1.01);
  }

  .membership-card.popular:hover {
    transform: scale(1.01) translateY(-8px);
  }

  .section-title {
    font-size: 28px;
  }
}

/* 小屏幕移动端 (480px - 767px) */
@media (max-width: 767px) {
  .header .container {
    padding: 0 20px;
  }

  /* 隐藏桌面导航，显示移动端汉堡菜单 */
  .main-nav {
    display: none;
  }

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

  .mobile-menu.active {
    display: block;
  }

  .logo img {
    height: 35px;
  }

  .theme-btn {
    width: 50px;
    height: 28px;
  }

  .theme-slider {
    width: 22px;
    height: 22px;
  }

  [data-theme="dark"] .theme-slider {
    transform: translateX(20px);
  }

  .theme-icon {
    font-size: 12px;
  }

  .login-btn {
    padding: 8px 20px;
    font-size: 13px;
  }

  .main-content {
    padding: 25px 20px;
  }

  .section-title {
    font-size: 24px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .membership-section {
    padding: 40px 20px;
  }

  .membership-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .membership-card.popular {
    transform: none;
  }

  .membership-card.premium {
    transform: none;
  }

  .home-btn {
    padding: 15px 30px;
    font-size: 16px;
  }

  /* 移动端课程卡片优化 */
  .course-card {
    margin-bottom: 10px;
  }

  .course-info {
    padding: 20px;
  }

  .course-title {
    font-size: 18px;
  }

  .course-details {
    gap: 2px;
  }

  .course-duration,
  .course-calories {
    font-size: 12px;
  }
}

/* 超小屏幕移动端 (max-width: 479px) */
@media (max-width: 479px) {
  .header .container {
    padding: 0 15px;
  }

  .header {
    padding: 12px 0;
  }

  .logo img {
    height: 30px;
  }

  .nav-actions {
    gap: 10px;
  }

  .theme-btn {
    width: 44px;
    height: 24px;
  }

  .mobile-theme-btn {
    font-size: 12px;
    padding: 10px;
    gap: 6px;
    min-height: 40px;
  }

  .mobile-theme-btn .theme-icon {
    font-size: 14px;
    width: 18px;
    height: 18px;
  }

  .theme-slider {
    width: 18px;
    height: 18px;
  }

  [data-theme="dark"] .theme-slider {
    transform: translateX(18px);
  }

  .theme-icon {
    font-size: 11px;
  }

  .login-btn {
    padding: 6px 16px;
    font-size: 12px;
  }

  .main-content {
    padding: 20px 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .course-card {
    border-radius: 12px;
  }

  .course-info {
    padding: 15px;
  }

  .course-title {
    font-size: 16px;
  }

  .course-meta {
    margin-bottom: 10px;
  }

  .course-details {
    gap: 1px;
  }

  .course-duration,
  .course-calories {
    font-size: 11px;
  }

  .membership-section {
    padding: 30px 15px;
  }

  .membership-card {
    min-height: 280px;
  }

  .membership-header {
    padding: 25px 20px 15px;
  }

  .membership-icon {
    font-size: 40px;
    margin-bottom: 12px;
  }

  .membership-name {
    font-size: 22px;
  }

  .membership-pricing {
    padding: 0 20px;
  }

  .membership-price .amount {
    font-size: 40px;
  }

  .membership-description {
    padding: 0 20px;
    font-size: 14px;
    margin-bottom: 30px;
  }

  .membership-action {
    padding: 0 20px 25px;
  }

  .buy-btn {
    padding: 14px 28px;
    font-size: 15px;
  }

  .home-btn {
    padding: 12px 25px;
    font-size: 14px;
  }
}

/* 高DPR设备优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .course-card:hover {
    transform: none;
  }

  .course-card:hover .course-overlay {
    opacity: 1;
  }

  .play-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.9);
  }

  .play-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 1);
  }

  .membership-card:hover {
    transform: none;
  }

  .membership-card.popular:hover {
    transform: scale(1.02);
  }

  .course-card:active {
    transform: scale(0.98);
  }

  .membership-card:active {
    transform: scale(0.96);
  }

  .membership-card.popular:active {
    transform: scale(0.98);
  }

  .buy-btn:hover {
    transform: none;
  }

  .buy-btn:active {
    transform: scale(0.95);
  }

  .login-btn:hover {
    transform: none;
  }

  .login-btn:active {
    transform: scale(0.95);
  }

  .home-btn:hover {
    transform: none;
  }

  .home-btn:active {
    transform: scale(0.95);
  }

  /* 增大移动端点击区域 */
  .nav-link {
    padding: 15px 10px;
  }

  .mobile-nav-link {
    padding: 15px 0;
  }

  .theme-btn {
    padding: 5px;
  }

  .mobile-theme-btn {
    font-size: 11px;
    padding: 8px;
    gap: 5px;
    min-height: 36px;
  }

  .mobile-theme-btn .theme-icon {
    font-size: 12px;
    width: 16px;
    height: 16px;
  }
}

/* 横屏移动设备优化 */
@media screen and (orientation: landscape) and (max-height: 600px) {
  .header {
    padding: 8px 0;
  }

  .main-content {
    padding: 20px 15px;
  }

  .section-title {
    margin-bottom: 25px;
  }

  .membership-section {
    padding: 30px 20px;
  }
}

/* 主题切换动画 */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 减少动画的元素 */
.theme-btn,
.theme-icon,
.mobile-theme-btn {
  transition: all 0.3s ease;
}

/* 新增动画效果 */
@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes goldGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.4);
  }
}

@keyframes themeSwitch {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

.gold-glow {
  animation: goldGlow 2s ease-in-out infinite;
}

.theme-switching {
  animation: themeSwitch 0.3s ease;
}

.pulse-effect {
  animation: pulse 1s ease-out;
}

/* 打印样式 */
@media print {
  .header,
  .mobile-menu,
  .theme-toggle,
  .mobile-theme-toggle {
    display: none !important;
  }

  .main-content {
    max-width: none;
    padding: 0;
  }

  .course-card,
  .membership-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
