/* 轮播图样式 */
.carousel-container {
  width: 100%;
  position: relative;
  padding-top: 10px;
  /*添加顶部内边距与侧边栏对齐 */
}

.main-carousel {
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: var(--border-radius);
  position: relative;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 2px solid rgba(var(--theme-primary-rgb, 255, 158, 203), 0.3);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-slide:hover img {
  transform: scale(1.05);
}

.slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 20px;
  /* 修改：默认显示，不隐藏 */
  transform: translateY(0);
  transition: transform 0.5s ease;
}

/* 修改：鼠标悬停时隐藏信息 */
.carousel-slide:hover .slide-info {
  transform: translateY(100%);
}

.slide-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-info p {
  font-size: 14px;
  opacity: 0.9;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  transform: translateY(-50%);
  z-index: 10;
}

/* 修改导航按钮样式 - 移除背景圆形 */
.nav-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
}

.nav-btn:hover {
  opacity: 1;
  transform: scale(1.2);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.indicator.active::before {
  transform: scale(1);
}

.indicator:hover {
  transform: scale(1.2);
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--theme-primary);
  width: 0%;
  transition: width 0.3s ease;
  z-index: 10;
}

/* 新增二次元装饰元素 */
.carousel-decoration {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  animation: sparkle 3s infinite;
}

.carousel-decoration:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.carousel-decoration:nth-child(2) {
  top: 30%;
  right: 15%;
  animation-delay: 1s;
}

.carousel-decoration:nth-child(3) {
  bottom: 25%;
  left: 15%;
  animation-delay: 2s;
}

.carousel-decoration:nth-child(4) {
  bottom: 35%;
  right: 10%;
  animation-delay: 1.5s;
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 响应式调整 */
@media (max-width: 1050px) {
  .main-carousel {
    height: 400px;
  }
}

@media (max-width: 950px) {
  .main-carousel {
    height: 400px;
  }

  .nav-btn {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .carousel-container {
    padding-top: 0;
    /* 移动端移除顶部内边距 */
  }

  .main-carousel {
    height: 300px;
  }

  .slide-info {
    padding: 15px;
    /* 移动端保持默认显示 */
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  }

  .slide-info h3 {
    font-size: 18px;
  }

  .slide-info p {
    font-size: 12px;
  }

  .nav-btn {
    font-size: 20px;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .indicator {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .main-carousel {
    height: 200px;
    border-radius: 12px;
  }

  .slide-info {
    padding: 10px;
  }

  .slide-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
  }

  .slide-info p {
    font-size: 11px;
  }

  .nav-btn {
    font-size: 18px;
    padding: 0 10px;
  }

  .carousel-indicators {
    gap: 8px;
  }

  .indicator {
    width: 8px;
    height: 8px;
  }
}