/**
 * 内马尔动图轮播组件
 * Neymar GIF Carousel
 */

.carousel-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #000;
  margin: 0 -20px 40px -20px;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 文字叠加层 */
.carousel-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 10;
  pointer-events: none;
  padding: 20px;
}

.carousel-text {
  text-align: center;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.8;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  max-width: 90%;
  animation: textFadeIn 0.8s ease-in-out;
}

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

/* 导航按钮 */
.carousel-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 20;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.3);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* 左右切换按钮 */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.carousel-control:hover {
  background: rgba(255, 255, 255, 0.6);
}

.carousel-control.prev {
  left: 10px;
}

.carousel-control.next {
  right: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .carousel-container {
    height: 250px;
  }

  .carousel-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .carousel-container {
    height: 180px;
  }

  .carousel-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .carousel-control {
    display: none;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }
}
