:root {
      --primary-color: #8B5A2B; /* 深木色，传统色彩 */
      --primary-light: #C19A6B; /* 浅木色 */
      --secondary-color: #4A6B57; /* 墨绿色 */
      --accent-color: #B22222; /* 朱砂红 */
      --gold-color: #D4AF37; /* 金色 */
      --light-bg: #F8F4E9; /* 米黄色背景 */
      --dark-text: #3E2723; /* 深褐色文字 */
      --light-text: #6D4C41; /* 浅褐色文字 */
      --white: #FFFFFF;
      --card-shadow: 0 4px 15px rgba(0,0,0,0.08);
      --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      --border-radius: 8px;
      --primary-rgb: 58, 134, 255; /* RGB格式便于rgba使用 */
      --secondary-rgb: 255, 87, 34;
       --bg-color: #f8fafc; /* 浅色背景 */
    }

    /* 基础样式 */
    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }
    
    a {
    -webkit-touch-callout: none;
    text-decoration: none;
    }
    
    article, aside, blockquote, body, button, code, dd, div, dl, dt, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, input, legend, li, menu, nav, ol, p, pre, section, td, textarea, th, ul {
        margin: 0;
        padding: 0;
    }
    
    body {
      font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
      margin: 0;
      padding: 0;
      background-color: var(--light-bg);
      color: var(--dark-text);
      line-height: 1.6;
      overflow-x: hidden;
      background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="none" stroke="%23C19A6B20" stroke-width="0.5"/></svg>');
      background-size: 100px 100px;
    }

/* 固定定位的导航容器 */
.sticky-header-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--light-bg); /* 添加背景色防止内容穿透 */
}

   /* 专业导航栏 - 手机优化修正版 */
header {
  position: relative; /* 改为相对定位，由父容器控制固定 */
  /*position: sticky;*/
  top: 0;
  display: flex;
  flex-direction: row; /* 改为垂直布局 */
  padding: 10px 5%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  background: linear-gradient(135deg, #c12c2c, #8B0000);
  color: var(--white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  gap: 10px; /* 添加元素间距 */
}

/* 第一行：logo和用户图标 */
.header-top-row {
  align-items: center;
  width: 20%;
}

header .logo {
  font-family: 'Ma Shan Zheng', 'Playfair Display', serif;
  font-size: 22px; /* 固定大小避免clamp在手机上太小 */
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  color: #FFD700; /* 使用金色更配红色 */
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  position: relative;
  padding-bottom: 8px;
  flex-grow: 1; /* 允许logo占据剩余空间 */
  text-align: left; /* 左对齐 */
}

header .logo::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; /* 左对齐 */
  transform: none;
  width: 40px;
  height: 2px;
  background: var(--gold-color);
  border-radius: 2px;
}

header .user-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0; /* 防止用户图标被挤压 */
}

header .user-icon {
  font-size: 18px;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

/* 搜索框单独一行 */
header .search-container {
  position: relative;
  width: 100%; /* 占据全宽 */
  order: 3;
}

header .search {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: none;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.2); /* 更透明的白色 */
  border: 1px solid rgba(255,255,255,0.3); /* 更明显的边框 */
  color: var(--white);
  font-size: 14px;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* 兼容不同浏览器的写法 */
header .search::-webkit-input-placeholder { /* Chrome/Safari */
  color: rgba(255, 255, 255, 0.7);
}
header .search::-moz-placeholder { /* Firefox */
  color: rgba(255, 255, 255, 0.7);
  opacity: 1; /* Firefox默认会降低透明度，需要重置 */
}
header .search:-ms-input-placeholder { /* IE10-11 */
  color: rgba(255, 255, 255, 0.7);
}
header .search:-moz-placeholder { /* Firefox 18- */
  color: rgba(255, 255, 255, 0.7);
}

header .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-18px);
  color: var(--white);
  font-size: 16px;
  z-index: 99999;
  
}

    /* 专业Tab导航 */
    .tab-nav-container {
      /*position: relative;*/
      background: var(--white);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
      z-index: 1000;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .tab-nav-container::-webkit-scrollbar {
      display: none;
    }

    .tab-nav {
      display: flex;
      justify-content: flex-start;
      padding: 0 5%;
      min-width: max-content;
    }

    .tab-nav .tab-item {
      color: var(--light-text);
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      padding: 16px 15px;
      margin: 0 5px;
      transition: var(--transition);
      position: relative;
      text-align: center;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .tab-nav .tab-item.active {
      color: var(--primary-color);
      font-weight: 600;
    }

    .tab-nav .tab-item.active::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 60%;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      border-radius: 3px 3px 0 0;
    }

    /* 主要内容容器 */
    .main-container {
      max-width: 1200px;
      margin: 0px auto;
      padding: 0 5%;
      margin-bottom: 40px;
    }

    /* 专业内容面板 */
    .tab-content {
      /*padding: 15px 0 40px;*/
    }

    .tab-pane {
      display: none;
      animation: fadeIn 0.5s ease;
    }

    .tab-pane.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* 专业标题样式 */
    .section-title {
      font-family: 'Ma Shan Zheng', 'Playfair Display', serif;
      font-size: clamp(24px, 5vw, 30px);
      font-weight: 600;
      color: var(--dark-text);
      margin: 25px 0 20px;
      position: relative;
      display: inline-block;
      padding-bottom: 8px;
    }

    .section-title::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 50px;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
      border-radius: 3px;
    }

    /* 专业卡片网格 */
    .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 18px;
      margin-top: 20px;
    }

    /* 专业卡片样式 */
    .card {
      background: var(--white);
      border-radius: var(--border-radius);
      overflow: hidden;
      box-shadow: var(--card-shadow);
      transition: var(--transition);
      position: relative;
      border: 1px solid rgba(0,0,0,0.05);
    }

    .card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    }

    .card-img-container {
      position: relative;
      width: 100%;
      padding-bottom: 110%; /* 从140%减少到120% */
      overflow: hidden;
    }
    
    .card-img-product{
      padding-bottom: 150%; /* 从140%减少到120% */
    }
    
    .card-img-course{
      padding-bottom: 120%; /* 从140%减少到120% */    
    }
    
    .card-img-video{
      /*padding-bottom: 120%;*/
      position: relative;
    }

    .card-img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

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

    .card-body {
      padding: 10px 12px; /* 从14px减少到10px 12px */
    }
    
    /* 标题容器（确保垂直居中） */
    .card-title-wrapper {
      display: flex;
      justify-content: space-between;
      align-items: flex-start; /* 改为顶部对齐 */
      margin-bottom: 6px;
      gap: 8px; /* 增加标题与按钮间距 */
      
      display: flex;
      flex-wrap: wrap; /* 允许换行 */
      justify-content: space-between;
      align-items: flex-start; /* 顶部对齐 */
      margin-bottom: 6px;
    }
    
    .title-container {
        flex: 1 1 100%; /* 强制标题独占一行 */
        min-width: 0; /* 防止文本溢出 */
      }
      
     .download-btn-container{
        display: flex;
        justify-content: flex-end; /* 右对齐 */
        margin-bottom: 4px;
        margin-right: 4px;
     }
    
    /* 下载按钮新样式 */
    .download-btn {
      margin-left: auto; /* 右对齐关键 */
      order: 1; /* 确保按钮在第二行最右 */
      display: flex;
      align-items: center; /* 图标和文字居中 */
      gap: 4px; /* 图标和文字间距 */
      background: none;
      border: none;
      color: var(--primary-light);
      cursor: pointer;
      font-size: 13px; /* 略小于标题文字 */
      font-family: inherit; /* 继承主字体 */
      padding: 4px 8px;
      border-radius: 4px;
      transition: var(--transition);
      
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(74, 107, 87, 0.1); /* 墨绿浅背景 */
      color: var(--secondary-color);
      border: 1px solid var(--primary-light);
      padding: 6px 12px;
      border-radius: 15px;
      font-size: 13px;
      cursor: pointer;
      transition: var(--transition);
    }
    
    .download-btn:hover {
      color: var(--accent-color);
      background: rgba(178, 34, 34, 0.1);
      
      background: rgba(74, 107, 87, 0.2);
      color: var(--secondary-color);
    }
    
    .download-btn:active {
      /*transform: translateY(1px);*/
      transform: translateY(1px) scale(0.98);
      
      transform: scale(0.95);
      background-color: var(--secondary-color);
      opacity: 0.9;
    }

    /* 调整卡片标题行数和最小高度 */
    .card-title {
      font-weight: 500;
      font-size: 15px;
      margin-bottom: 6px;
      color: var(--dark-text);
      display: -webkit-box;
      -webkit-line-clamp: 2; /* 保持2行 */
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 27px; /* 从44px减少到38px */
      line-height: 1.3; /* 微调行高 */
      flex: 1; /* 占据剩余空间 */
      display: flex;
      align-items: center; /* 文字垂直居中 */
      word-break: break-word; /* 允许换行 */
    }
    
    /* 调整卡片标题行数和最小高度 */
    .card-title-2 {
      font-weight: 500;
      font-size: 12px;
      margin-bottom: 6px;
      color: var(--dark-text);
      display: -webkit-box;
      -webkit-line-clamp: 2; /* 保持2行 */
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 30px; /* 从44px减少到38px */
      line-height: 1.3; /* 微调行高 */
    }

    .card-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
      font-size: 12px; /* 从13px减少到12px */
      color: var(--light-text);
    }

    .card-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      background: var(--accent-color);
      color: var(--white);
      padding: 4px 10px;
      border-radius: 15px;
      font-size: 11px;
      font-weight: 600;
      z-index: 2;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* 锁住状态 */
    .card.locked .card-img {
      filter: brightness(0.5);
    }

    .card.locked::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(1px);
    }

    .card.locked .lock-overlay {
      position: absolute;
      top: 70%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      width: 100%;
      padding: 0 15px;
      z-index: 2;
    }

    .card.locked .lock-icon {
      font-size: 28px;
      color: var(--gold-color);
      margin-bottom: 10px;
      text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .card.locked .lock-text {
      color: var(--white);
      font-weight: 600;
      font-size: 13px;
      text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    }

    /* 专业按钮 */
    .btn {
      display: inline-block;
      padding: 10px 20px;
      border-radius: 25px;
      font-weight: 500;
      text-align: center;
      cursor: pointer;
      transition: var(--transition);
      border: none;
      font-size: 14px;
      letter-spacing: 0.5px;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
      color: var(--white);
      box-shadow: 0 4px 15px rgba(139, 90, 43, 0.3);
      border: 1px solid rgba(0,0,0,0.1);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(139, 90, 43, 0.4);
    }

    /* 加载动画 */
    .loader {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(248, 244, 233, 0.95);
      justify-content: center;
      align-items: center;
      z-index: 2000;
      backdrop-filter: blur(5px);
    }

    .loader.active {
      display: flex;
    }

    .loader .spinner {
      width: 50px;
      height: 50px;
      border: 4px solid rgba(139, 90, 43, 0.1);
      border-top-color: var(--primary-color);
      border-radius: 50%;
      animation: spin 1s linear infinite;
      position: relative;
    }

    .loader .spinner::after {
      content: '';
      position: absolute;
      top: -4px;
      left: -4px;
      right: -4px;
      bottom: -4px;
      border: 4px solid rgba(178, 34, 34, 0.1);
      border-top-color: var(--accent-color);
      border-radius: 50%;
      animation: spin 1.5s linear infinite;
    }
    
    /* 价格样式 */
    .original-price {
      text-decoration: line-through;
      color: var(--light-text);
      font-size: 0.9em;
      margin-right: 5px;
    }
    .price {
      font-weight: 700;
      color: var(--accent-color);
      font-size: 15px;
      position: relative;
    }
    
    .price::before {
      content: '¥';
      font-size: 0.9em;
      margin-right: 2px;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* 阴阳元素装饰 */
    .yin-yang {
      position: absolute;
      width: 60px;
      height: 60px;
      background: radial-gradient(circle at 50% 25%, var(--white) 0%, var(--white) 25%, var(--dark-text) 25%, var(--dark-text) 100%);
      border-radius: 50%;
      opacity: 0.05;
      z-index: -1;
    }

    .yin-yang::before {
      content: '';
      position: absolute;
      width: 15px;
      height: 15px;
      background: var(--white);
      border-radius: 50%;
      top: 25%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .yin-yang::after {
      content: '';
      position: absolute;
      width: 15px;
      height: 15px;
      background: var(--dark-text);
      border-radius: 50%;
      bottom: 25%;
      left: 50%;
      transform: translate(-50%, 50%);
    }

    /* 响应式设计 */
    @media (min-width: 576px) {
      .card-title-wrapper {
        flex-wrap: wrap; /* 允许换行 */
      }
      
      .download-btn {
        margin-top: 0;
        align-self: center; /* 强制按钮垂直居中 */
      }
      header {
        flex-direction: row; /* 恢复水平布局 */
        flex-wrap: wrap;
        align-items: center;
      }
      
      .header-top-row {
        width: auto;
        order: 1;
        flex: 1;
      }
      
      header .search-container {
        order: 2;
        width: 50%; /* 适当宽度 */
        margin: 0 15px;
      }
      
      header .user-actions {
        order: 3;
      }
      
      header .logo {
        font-size: 24px;
        text-align: center;
        flex-grow: 0;
      }
      
      header .logo::after {
        left: 50%;
        transform: translateX(-50%);
      }
      
      .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
      }

      .section-title {
        font-size: clamp(26px, 5vw, 32px);
      }
    }

    @media (min-width: 768px) {
      .card-title-wrapper {
        flex-wrap: wrap; /* 允许换行 */
      }
      
      .download-btn {
        margin-top: 0;
        align-self: center; /* 强制按钮垂直居中 */
      }
      header {
        flex-wrap: nowrap;
        padding: 12px 5%;
      }
      
      header .logo {
        font-size: 26px;
        flex: 0 0 auto;
        width: auto;
      }
      
      header .search-container {
        flex: 1;
        max-width: 500px;
        margin: 0 20px;
      }
      
      header .search {
        padding: 12px 20px 12px 45px;
        font-size: 15px;
      }
          
      .tab-nav {
        justify-content: center;
      }
      
      .tab-nav .tab-item {
        padding: 16px 25px;
        font-size: 16px;
        margin: 0 10px;
      }
      
      .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 25px;
      }
      
      .card-title {
        font-size: 16px;
      }
    }

    @media (min-width: 992px) {
      .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 30px;
      }
      
      .card-title {
        font-size: 17px;
      }

      .main-container {
        padding: 0 3%;
      }
    }
    
.card-meta .fa-fire {
  color: #FF4500; /* 火焰橙色 */
  animation: pulse 1.5s infinite alternate; /* 脉动动画 */
}

@keyframes pulse {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 1; transform: scale(1.1); }
}

.card-meta span:first-child {
  font-weight: 600;
  color: var(--accent-color);
}

/* 修正对齐的核心CSS */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center; /* 确保整体垂直居中 */
}

.heat-text {
  display: inline-flex;
  align-items: center; /* 使图标和文字垂直居中 */
  gap: 5px; /* 现代浏览器间距控制 */
}

.custom-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  position: relative;
  top: 1px; /* 微调位置，根据实际情况调整 */
  transform: translateY(2%); /* 更精确的垂直对齐 */
}

/* 兼容旧浏览器的备用方案 */
.heat-text::before {
  content: '';
  display: inline-block;
  height: 14px;
  vertical-align: middle;
}

/* 分类导航样式 - 优化移动端显示 */
.category-nav-container {
  position: relative;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 800;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin: 20px 0;
  border-radius: var(--border-radius);
  scrollbar-width: none; /* Firefox */
  
  box-shadow: 0 4px 20px rgba(139, 90, 43, 0.08);
  border-radius: var(--border-radius);
  margin: 25px 0;
  padding: 8px;
  z-index: 800;
}

.category-nav-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-nav {
  display: flex;
  justify-content: flex-start;
  padding: 0 5%;
  min-width: max-content;
  gap: 5px; /* 移动端增加间距 */
  
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px;
}

.category-nav .category-item {
  color: var(--light-text);
  font-size: 14px; /* 移动端字体稍小 */
  font-weight: 500;
  cursor: pointer;
  padding: 12px 12px; /* 移动端内边距减小 */
  margin: 0;
  transition: var(--transition);
  position: relative;
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 20px; /* 圆角更大更现代 */
  background: rgba(139, 90, 43, 0.05); /* 轻微背景色 */
  
  color: var(--dark-text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 20px;
  transition: var(--transition);
  position: relative;
  text-align: center;
  white-space: nowrap;
  border-radius: 50px;
  background: var(--light-bg);
  border: 1px solid rgba(139, 90, 43, 0.1);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  overflow: hidden;
}

.category-nav .category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.category-nav .category-item.active {
  color: var(--white);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 2px 8px rgba(139, 90, 43, 0.2);
  
  color: var(--white);
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(139, 90, 43, 0.2);
  transform: translateY(-2px);
}

.category-nav .category-item.active::after {
  display: none; /* 移除下划线，改用填充背景 */
}

.category-pane {
  display: none;
  animation: fadeIn 0.5s ease;
}

.category-pane.active {
  display: block;
}

/* 添加微妙的阴阳元素装饰 */
.category-nav-container::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0.5;
}

/* 移动端优化 */
@media (max-width: 575px) {
  .category-nav {
    padding: 0 15px;
  }
  
  .category-nav .category-item {
    font-size: 13px;
    padding: 10px 12px;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .card-title {
    font-size: 14px;
    min-height: 40px;
  }
  
  .card-meta {
    font-size: 12px;
  }
}

/* 平板及以上设备 */
@media (min-width: 768px) {
  .category-nav {
    justify-content: center;
    gap: 10px;
    padding: 0 3%;
  }
  
  .category-nav .category-item {
    font-size: 15px;
    padding: 12px 20px;
  }
}

/* 大屏幕设备 */
@media (min-width: 992px) {
  .category-nav .category-item {
    font-size: 16px;
    padding: 14px 25px;
    margin: 0 5px;
  }
  
  .category-nav .category-item:hover {
    background: rgba(139, 90, 43, 0.1);
  }
}

/*****************************************************************/
/* 响应式书城子分类导航 - 手机优先设计 */
    .sub-tab-nav {
      display: flex;
      margin: 20px 0 15px;
      position: relative;
      padding-bottom: 6px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      gap: 6px; /* 使用gap替代margin-right实现间距 */
    }
    
    .sub-tab-nav::-webkit-scrollbar {
      display: none;
    }
    
    .sub-tab-item {
      padding: 8px 12px;
      cursor: pointer;
      font-size: 13px;
      color: var(--light-text);
      position: relative;
      border-radius: 20px;
      background: rgba(58, 134, 255, 0.08);
      transition: var(--transition);
      white-space: nowrap;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      min-width: max-content; /* 确保文字不换行 */
    }
    
    .sub-tab-item i {
      margin-right: 5px;
      font-size: 14px;
      transition: var(--transition);
    }
    
    /* 手机上的活跃状态 */
    .sub-tab-item.active {
      color: var(--white);
      background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
      box-shadow: 0 3px 8px rgba(58, 134, 255, 0.25);
      font-weight: 500;
    }
    
    .sub-tab-item.active i {
      color: var(--white);
    }
    
    .sub-tab-item:hover:not(.active) {
      background: rgba(58, 134, 255, 0.15);
    }
    
    /* 手机上的指示器简化 */
    .sub-tab-item.active::after {
      display: none;
      content: '';
      position: absolute;
      bottom: -5px;
      left: 50%;
      transform: translateX(-50%);
      width: 50%;
      height: 2px;
      background: var(--accent-color);
      border-radius: 2px;
    }

    /* 平板设备适配 (宽度≥576px) */
    @media (min-width: 576px) {
      .sub-tab-nav {
        margin: 25px 0 20px;
        padding-bottom: 8px;
        gap: 8px;
      }
      
      .sub-tab-item {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 24px;
      }
      
      .sub-tab-item i {
        font-size: 15px;
        margin-right: 6px;
      }
      
      .sub-tab-item.active::after {
        bottom: -6px;
        height: 3px;
      }
    }

    /* 小桌面设备适配 (宽度≥768px) */
    @media (min-width: 768px) {
      .sub-tab-nav {
        justify-content: center;
        flex-wrap: wrap; /* 如果分类过多可以换行 */
        overflow-x: visible;
        padding-bottom: 10px;
        gap: 10px;
      }
      
      .sub-tab-item {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 30px;
      }
      
      .sub-tab-item i {
        font-size: 16px;
        margin-right: 8px;
      }
      
      /* 桌面端的悬停效果 */
      .sub-tab-item:hover:not(.active) {
        transform: translateY(-1px);
      }
      
      .sub-tab-item.active {
        transform: translateY(-2px);
      }
      
      .sub-tab-item.active::after {
        width: 60%;
        bottom: -8px;
        box-shadow: 0 2px 6px rgba(255, 0, 110, 0.4);
      }
      
      /* 桌面端添加动画 */
      @keyframes pulse {
        0% { transform: translateX(-50%) scale(1); }
        50% { transform: translateX(-50%) scale(1.05); }
        100% { transform: translateX(-50%) scale(1); }
      }
      
      .sub-tab-item.active::after {
        animation: pulse 1.5s infinite;
      }
    }

    /* 大桌面设备适配 (宽度≥992px) */
    @media (min-width: 992px) {
      .sub-tab-item {
        padding: 14px 24px;
        font-size: 16px;
      }
      
      .sub-tab-item i {
        font-size: 17px;
      }
    }

    /* 超大屏幕适配 (宽度≥1200px) */
    @media (min-width: 1200px) {
      .sub-tab-nav {
        padding-bottom: 12px;
      }
      
      .sub-tab-item.active::after {
        height: 4px;
        bottom: -10px;
      }
    }

/*****************************************************************/

/* 精品分类导航样式 - 与现有页面完美融合 */
.category-nav-container {
  position: relative;
  background: var(--light-bg);
  border-radius: 12px;
  margin: 30px 0;
  padding: 8px;
  z-index: 800;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  /*border: 1px solid rgba(139, 90, 43, 0.1);*/
}

.category-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px;
  position: relative;
}

.category-nav::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0.3;
}

.category-item {
  color: var(--dark-text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 24px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  text-align: center;
  white-space: nowrap;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(139, 90, 43, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.category-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.1);
  color: var(--primary-color);
}

.category-item.active {
  color: var(--white);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 
    0 4px 15px rgba(139, 90, 43, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border-color: transparent;
}

.category-item i {
  margin-right: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.category-item.active i {
  color: var(--gold-color);
  transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .category-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  
  .category-nav::-webkit-scrollbar {
    display: none;
  }
  
  .category-item {
    padding: 10px 20px;
    font-size: 14px;
    flex: 0 0 auto;
  }
}

/* 激活状态指示器 */
.category-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--gold-color);
  border-radius: 2px;
  animation: fadeIn 0.3s ease;
}

/* 与页面一致的阴阳元素装饰 */
.category-nav-container::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 50% 25%, var(--white) 0%, var(--white) 25%, var(--dark-text) 25%, var(--dark-text) 100%);
  border-radius: 50%;
  opacity: 0.03;
  z-index: -1;
}

.category-nav-container::before::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--white);
  border-radius: 50%;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.category-nav-container::before::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--dark-text);
  border-radius: 50%;
  bottom: 25%;
  left: 50%;
  transform: translate(-50%, 50%);
}

/******************************************/
/* 购买按钮样式 */
.btn-buy {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 12px;
  background: linear-gradient(135deg, #ff9500, #ff5e3a);
  color: white;
  border: none;
  border-radius: 4px;
}

/* 价格突出显示 */
.price {
  color: var(--accent-color);
  font-weight: bold;
}

/* 购买弹窗样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  margin: 15% auto;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  animation: modalFadeIn 0.3s;
}

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

.payment-methods {
  display: flex;
  margin: 15px 0;
  gap: 10px;
}

.payment-method {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
}

.payment-method.active {
  border-color: var(--primary-color);
  background: rgba(58, 134, 255, 0.1);
}

.btn-confirm {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

.sub-tab-content{
    padding-bottom: 20px;
}

/*******************************************/
/* 播放器容器 - 玻璃态背景 */
.video-player-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* 视频元素（自适应宽高） */
.video-element {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important; /* 全屏时去掉圆角 */
}

/* 加载动画 */
.video-loading {
  position: absolute;
  color: white;
  text-align: center;
}
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #fff;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 控制栏样式 */
.video-controls {
  position: absolute;
  bottom: 30px;
  left: 5%;
  width: 90%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
}

/* 进度条美化 */
.progress-container {
  position: relative;
  height: 5px;
  margin-bottom: 20px;
}
.video-progress {
  width: 100%;
  height: 100%;
  accent-color: #ff4757; /* 进度条颜色 */
}
.video-seek {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* 按钮样式 */
.control-buttons {
  display: flex;
  align-items: center;
  color: white;
}
.control-playpause, .control-volume, .control-fullscreen {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  margin: 0 5px;
}
.volume-slider {
  width: 80px;
  accent-color: white;
}

/* 关闭按钮 */
.video-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}
.video-close-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}


/* 播放按钮遮罩层 */
.video-play-overlay {
  position: absolute;
  top: 0;
  left: 48px;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  /*justify-content: center;*/
  z-index: 2;
  /*background: rgba(0,0,0,0.3);*/
  /*opacity: 0;*/
  transition: opacity 0.3s ease;
  border-radius: 12px 0 0 12px; /* 匹配左侧圆角 */
}

.video-card:hover .video-play-overlay {
  opacity: 1;
}

/***************************************************/

/* 播放按钮设计 */
.play-button {
  /*width: 50px;*/
  /*height: 50px;*/
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.play-button i {
  color: var(--primary-color);
  /*font-size: 20px;*/
  font-size: 14px;
  margin-left: 3px; /* 播放图标视觉居中调整 */
  margin-left: 0px; /* 播放图标视觉居中调整 */
}

.video-card:hover .play-button {
  transform: scale(1);
  background: white;
}

/* 视频分类Tab样式 (继承课程Tab风格) */
.video-category-tabs {
  display: flex;
    margin: 0 0 15px 0;
    padding-bottom: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    background: var(--bg-color);
    border-radius: 12px;
    padding: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    margin-top: -8px;
}

/* 视频分类激活态微调 */
.video-category-tabs .category-tab.active {
    color: var(--white);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--secondary-rgb), 0.9));
    box-shadow: 0 2px 6px rgba(58, 134, 255, 0.2);
    font-weight: 500;
    border-color: transparent;
}

/* 视频卡片特殊标记 */
.video-card::before {
  content: '视频';
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  z-index: 2;
}

/* 加载状态 */
.video-list-horizontal.loading {
  position: relative;
  min-height: 200px;
}

.video-list-horizontal.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(58, 134, 255, 0.2);
  border-top-color: #3a86ff;
  /*border-top-color: #ccc;*/
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/*******************************************/
/* 课程分类Tab样式 */
.course-category-tabs {
  /*display: flex;*/
  /*margin: 0 0 15px 0;*/
  /*padding-bottom: 6px;*/
  /*overflow-x: auto;*/
  /*-webkit-overflow-scrolling: touch;*/
  /*scrollbar-width: none;*/
  /*gap: 6px;*/
  /*background: var(--bg-color);*/
  /*border-radius: 12px;*/
  /*padding: 8px;*/
  /*box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);*/
  /*margin-top: -8px;*/
  
  display: flex;
  margin: -6px 0 18px; /* 向上贴合一级Tab */
  padding: 6px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 8px;
  position: relative;
  z-index: 2;
  background: linear-gradient(to bottom, 
    rgba(255,255,255,0.7), 
    rgba(248,250,252,0.9)); /* 半透明白色渐变背景 */
  backdrop-filter: blur(4px); /* 毛玻璃效果 */
  border-radius: 0 0 14px 14px;
  border-top: 1px solid rgba(58, 134, 255, 0.08);
  box-shadow: 0 4px 12px -2px rgba(0,0,0,0.05);
}

.course-category-tabs::-webkit-scrollbar {
  display: none; /* Chrome隐藏滚动条 */
}

.category-tab {
  padding: 6px 12px; /* 比一级稍小 */
  cursor: pointer;
  font-size: 12px; /* 比一级小1px */
  color: var(--light-text);
  position: relative;
  border-radius: 16px; /* 圆角稍小 */
  background: rgba(58, 134, 255, 0.05); /* 透明度更高 */
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  min-width: max-content;
  border: 1px solid rgba(58, 134, 255, 0.1); /* 增加细边框 */
}

/* 活跃状态调整 */
.category-tab.active {
  color: var(--white);
  background: linear-gradient(135deg, 
    rgba(var(--primary-rgb), 0.9), 
    rgba(var(--secondary-rgb), 0.9)); /* 颜色稍浅 */
  box-shadow: 0 2px 6px rgba(58, 134, 255, 0.2); /* 阴影减弱 */
  font-weight: 500;
  border-color: transparent; /* 激活时隐藏边框 */
}

.category-tab:hover:not(.active) {
  background: rgba(58, 134, 255, 0.08); /* 悬停效果更 subtle */
}

/* 增加层级指示的装饰元素 */
.category-tab::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 18px;
  border: 1px solid rgba(58, 134, 255, 0.15);
  opacity: 0;
  transition: var(--transition);
}

.category-tab.active::before {
  opacity: 1;
}

/* 徽章标记 */
.category-tab .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4757;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 左右布局课程卡片样式 */
.course-list-horizontal {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 加载状态 */
.course-list-horizontal.loading {
  position: relative;
  min-height: 200px;
}

.course-list-horizontal.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(58, 134, 255, 0.2);
  border-top-color: #3a86ff;
  /*border-top-color: #ccc;*/
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.course-card-horizontal {
  display: flex;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  margin-bottom: 10px;
  border: 1px solid rgba(58, 134, 255, 0.1);
  /*min-height: 120px;*/
  height: 150px; /* 固定卡片高度 */
  overflow: hidden; /* 保证图片圆角不溢出 */
}

.course-card-horizontal:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(58, 134, 255, 0.12);
}

.course-image-container {
  width: 35%; /* 或固定宽度 width: 120px */
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.course-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* 居中显示关键内容 */
  transition: transform 0.6s ease;
}

.course-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-color);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 2;
}

.course-content {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 关键属性：垂直均匀分布 */
  position: relative;
}

.course-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.course-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}

.course-meta i {
  margin-right: 5px;
}

.course-price {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.original-price {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.current-price {
  font-size: 18px;
  font-weight: 700;
  color: #ff4757;
}

.course-price-container{
    display: flex;
    justify-content: flex-end;
}

/* 响应式调整 */
@media (max-width: 480px) {
  /* 移动端改为纵向布局 */
  .course-card-horizontal {
    flex-direction: row;
    height: 140px;
  }
  
  .course-image-container {
    height: auto; /* 移动端固定高度 */
    max-height: 150px; /* 移动端最大高度 */
  }
  
  .course-content {
    padding: 8px;
  }
  
  .course-title {
    font-size: 15px;
  }
  
  .course-category-tabs {
    margin: -5px 0 10px 0; /* 在手机上减少间距 */
    padding: 6px;
  }
  
  .category-tab {
    padding: 5px 10px;
    font-size: 11px;
  }
}

/**************底部样式********************/
.tabbar {
  height: 49px;
  background: #fff;
  position: fixed;
  width: 100%;
  max-width: 750px;
  bottom: 0;
  z-index: 99;
  box-shadow: 0px 0px 12px #d1d1d1;
  overflow: hidden;
}
.tabbar + .wrap {
  padding-bottom: 49px;
}
.tabbar .item1 {
  float: left;
  width: 25%;
  text-align: center;
  color: #666666;
}
.tabbar .item1.on {
  color: #ec1717;
}
.tabbar .item1.on .icon-home {
  background-image: url(/qq1107710272/tabbar/home-active.png);
}
.tabbar .item1.on .icon-category {
  background-image: url(/qq1107710272/tabbar/category-active.png);
}
.tabbar .item1.on .icon-advice {
  background-image: url(/qq1107710272/tabbar/advice-active.png);
}
.tabbar .item1.on .icon-market {
  background-image: url(/qq1107710272/tabbar/market-active.png);
}
.tabbar .item1.on .icon-user {
  background-image: url(/qq1107710272/tabbar/user-active.png);
}
.tabbar .name1 {
  font-size: 11px;
}
.tabbar .icon1 {
  display: inline-block;
  vertical-align: top;
  margin-top: 6px;
  margin-bottom: 2px;
  width:22px;
  height: 22px;
  background-size: 100%;
}
.tabbar .icon-home {
  background-image: url(/qq1107710272/tabbar/home.png);
}
.tabbar .icon-advice {
  background-image: url(/qq1107710272/tabbar/advice.png);
}
.tabbar .icon-market {
  background-image: url(/qq1107710272/tabbar/market.png);
}
.tabbar .icon-category {
  background-image: url(/qq1107710272/tabbar/category.png);
}
.tabbar .icon-user {
  background-image: url(/qq1107710272/tabbar/user.png);
}