/* ============================================
   Hero Carousel - 轮播组件
   ============================================ */

.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(212, 168, 83, 0.2),
    0 25px 80px -20px rgba(0, 0, 0, 0.5),
    0 0 120px -40px rgba(212, 168, 83, 0.3);
}

/* 轮播容器 */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 轮播图片 */
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
}

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

/* 图片遮罩 */
.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 17, 23, 0.25) 0%,
    rgba(13, 17, 23, 0.05) 40%,
    rgba(13, 17, 23, 0.35) 100%
  );
  pointer-events: none;
}

/* 指示器 */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

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

.carousel-indicator.active {
  width: 24px;
  border-radius: 4px;
  background: var(--brand-primary);
}

/* 左右箭头 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.carousel-arrow:hover {
  background: rgba(212, 168, 83, 0.3);
  border-color: var(--brand-primary);
}

.carousel-arrow.prev {
  left: 16px;
}

.carousel-arrow.next {
  right: 16px;
}

.hero-carousel:hover .carousel-arrow {
  opacity: 1;
}

/* 进度条 */
.carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.carousel-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-light));
  width: 0%;
  transition: width 0.1s linear;
}

/* 浮动信息卡 */
.carousel-info-card {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 14px;
  padding: 14px 18px;
  z-index: 10;
  animation: floatCard 3s ease-in-out infinite;
}

.carousel-info-card .card-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1;
}

.carousel-info-card .card-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 蜂窝装饰背景 */
.hero-hex-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  overflow: hidden;
}

.hero-hex-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cdefs%3E%3Cpattern id='hex' width='50' height='43.4' patternUnits='userSpaceOnUse'%3E%3Cpath d='M25 0 L50 12.5 L50 30.9 L25 43.4 L0 30.9 L0 12.5 Z' fill='none' stroke='rgba(212,168,83,0.1)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hex)'/%3E%3C/svg%3E");
  animation: hexFloat 30s ease-in-out infinite;
}

@keyframes hexFloat {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(0, -2%); }
  75% { transform: translate(2%, 1%); }
}

/* 移动端隐藏 */
@media (max-width: 1024px) {
  .hero-carousel {
    display: none;
  }
}
