/* cool-scroll.css - 修复触屏滑动冲突 */
.cool-scroll {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: white;

  user-select: none;
  /* 关键修复：允许垂直滚动，限制水平滚动 */
  touch-action: pan-y;
  width: 100%;
  transition: height 0.3s ease;
}

.cool-scroll-initialized {
  cursor: grab;
}

.cool-scroll-initialized:active {
  cursor: grabbing;
}

.scroll-content {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  transition: transform 0.3s ease;
  will-change: transform;
  margin: 0;
  height: auto;
  box-sizing: border-box;
  gap: 10px;
 padding:0;
  /* 关键修复：允许内容区域响应触摸事件 */
  touch-action: pan-y;
}

/* 卡片基础样式 */
.cool-scroll-card {
  flex-shrink: 0;
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  padding: 2px;
  text-align: center;
 /* transition: all 0.3s ease;  有这个时，一些容器的高度不正常，这个为什么在这，有什么作用 */
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  margin: 0;
  box-sizing: border-box;
  justify-content: flex-start;
  align-items: center;
  display: block;
  align-self: flex-start;
  min-width: 30px;
  /* 关键修复：允许卡片响应触摸事件 */
  touch-action: pan-y;
  
   
}

/* 不定宽卡片特定样式 */
.cool-scroll-card.variable-width {
  min-width: auto;
  white-space: nowrap;
}




/* 激活特效 */
.cool-scroll-card.active-during-scroll {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #3498db;
  z-index: 10;
}

.cool-scroll-card.active-during-scroll .image {
  transform: translateY(-2px) scale(1.1);
}

/* 居中高亮特效 */
.cool-scroll-card.center-highlight {
  background: linear-gradient(145deg, #fff3cd, #ffeaa7);
  border-color: #ffc107;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
}



/* 指示器样式 */
.scroll-indicator {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 10px;
  z-index: 10;
  pointer-events: auto;
  /* 关键修复：指示器允许所有触摸操作 */
  touch-action: auto;
}

.scroll-indicator.indicator-position-left {
  justify-content: flex-start;
}

.scroll-indicator.indicator-position-right {
  justify-content: flex-end;
}

.scroll-indicator.indicator-position-center {
  justify-content: center;
}

/* 点状指示器 */
.scroll-indicator.indicator-dots {
  gap: 8px;
  align-items: center;
}

.indicator-dots .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  /* 关键修复：指示器点允许所有触摸操作 */
  touch-action: auto;
}

.indicator-dots .indicator-dot:hover {
  background: rgba(52, 152, 219, 0.6);
  transform: scale(1.2);
}

.indicator-dots .indicator-dot.active {
  background: #3498db;
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* 条形指示器 */
.scroll-indicator.indicator-bar {
  align-items: center;
}

.indicator-bar .indicator-track {
  position: relative;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  width: 200px;
  height: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* 关键修复：指示器轨道允许所有触摸操作 */
  touch-action: auto;
}

.indicator-bar .indicator-track:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.indicator-bar .indicator-thumb {
  position: absolute;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  border-radius: 8px;
  transition: all 0.3s ease;
  height: 100%;
  top: 0;
  left: 0;
  min-width: 30px;
  box-shadow: 
    0 2px 4px rgba(52, 152, 219, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 进度条指示器 */
.scroll-indicator.indicator-progress {
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 4px;
  width: 200px;
}

.indicator-progress .indicator-progress-bar {
  height: 2px;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
  box-shadow: 0 1px 3px rgba(52, 152, 219, 0.4);
}

/* 数字指示器 */
.scroll-indicator.indicator-numbers {
  align-items: center;
  gap: 6px;
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: auto;
}

.indicator-numbers .indicator-current {
  font-weight: bold;
  color: #3498db;
  font-size: 16px;
}

.indicator-numbers .indicator-separator {
  color: #999;
}

.indicator-numbers .indicator-total {
  color: #666;
}

/* 迷你指示器 */
.scroll-indicator.indicator-mini {
  align-items: center;
  justify-content: flex-center;
  padding-right: 20px;
}

.indicator-mini .indicator-mini-track {
  position: relative;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  width: 60px;
  height: 2px;
  overflow: visible;
}

.indicator-mini .indicator-mini-thumb {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #3498db;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {


  
  .scroll-indicator {
    bottom: 6px;
    padding: 0 8px;
  }
  
  .indicator-bar .indicator-track {
    width: 150px;
    height: 1px;
  }
  
  .indicator-bar .indicator-thumb {
    min-width: 25px;
  }
  
  .indicator-dots .indicator-dot {
    width: 6px;
    height: 6px;
  }
  
  .scroll-indicator.indicator-numbers {
    font-size: 12px;
    padding: 3px 10px;
  }
  
  .indicator-numbers .indicator-current {
    font-size: 14px;
  }
  
  .indicator-progress .indicator-progress-bar {
    height: 3px;
  }
  
  .indicator-mini .indicator-mini-track {
    width: 40px;
    height: 1px;
  }
  
  .indicator-mini .indicator-mini-thumb {
    width: 6px;
    height: 6px;
  }
}