/* 奖项展示的 3D 旋转轮播效果 */
/* 特殊处理：奖项部分置顶且不留空隙 */
#awards {
  padding: 0 !important;
  scroll-margin-top: 0;
  height: 100vh; /* 全屏占位 */
  width: 100%;
  position: relative;
  /* 背景透明，因为内容会在 wrapper 里 */
}

#awards h2 {
    display: none;
}

.awards-container-3d-wrapper {
  position: fixed; /* 固定定位 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* 充满屏幕 */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  margin-top: 0;
  z-index: 100; /* 高层级，保证在顶部显示 */
  pointer-events: none; /* 允许点击穿透下面的内容 */
  
  /* 初始变换状态由 JS 控制，但设置基准 */
  transform-origin: center center;
}

/* 让内部的卡片可以点击 */
.awards-inner-3d {
  pointer-events: auto;
}

/* 下滑提示样式 */
.scroll-down-indicator {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-color);
  animation: bounce 2s infinite;
  z-index: 10;
  pointer-events: none;
}

.scroll-down-indicator .scroll-text {
  font-size: 0.9rem;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

.scroll-down-indicator i {
  font-size: 1.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.awards-inner-3d {
  --w: 240px; /* 正方形容器，作为最大边界 */
  --h: 240px;
  --translateZ: calc((var(--w) + var(--h)) + 20px);
  --rotateX: -5deg;
  --perspective: 1000px;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: 23%; /* 调低初始位置，从 15% -> 28% */
  left: calc(50% - (var(--w) / 2));
  z-index: 2;
  transform-style: preserve-3d;
  transform: perspective(var(--perspective));
  animation: awards-rotating 30s linear infinite;
}

/* 悬停时暂停动画 */
.awards-container-3d-wrapper:hover .awards-inner-3d {
  animation-play-state: paused;
}

@keyframes awards-rotating {
  from {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX))
      rotateY(0);
  }
  to {
    transform: perspective(var(--perspective)) rotateX(var(--rotateX))
      rotateY(1turn);
  }
}

.award-card-3d {
  position: absolute;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
    translateZ(var(--translateZ));
  /* 移除背景和边框，使其均在内部 wrapper 上 */
  background: transparent;
  border: none;
  box-shadow: none;
  
  display: flex;       /* Flex 居中 */
  align-items: center;
  justify-content: center;
  
  transform-style: preserve-3d; /* 确保子元素 z-index 生效 */
}

/* 新增：内容包裹层，紧贴图片大小 */
.award-content-wrapper {
  position: relative;
  display: flex; /* 消除 img底部的空隙 */
  
  /* 边框和背景移到这里 */
  border: 1px solid rgba(var(--color-card), 0.5);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.4); 
  backdrop-filter: blur(2px);
  overflow: hidden;
  
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  
  /* 限制最大尺寸，但允许根据内容收缩 */
  max-width: 100%;
  max-height: 100%;
}

.award-card-3d:hover .award-content-wrapper {
  border-color: rgba(var(--color-card), 1);
  box-shadow: 0 0 20px rgba(var(--color-card), 0.6);
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.05); /* 整体轻微放大 */
  z-index: 10;
}

.award-img-3d {
  display: flex; /* 包裹 img */
  width: auto;
  height: auto;
}

.award-img-3d img {
  display: block;
  /* 关键：限制最大宽高，保持比例，auto 宽高让容器收缩 */
  max-width: 100%;
  max-height: 240px; /* 显式限制高度不能超过父容器(由于 flex 嵌套有时候需要显式声明) */
  width: auto;
  height: auto;
  object-fit: contain;
}

/* 悬停时显示信息遮罩 */
.award-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6), rgba(0,0,0,0));
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-align: left;
  border-top: 1px solid rgba(var(--color-card), 0.3);
}

.award-content-wrapper:hover .award-info-overlay {
  transform: translateY(0);
}

.award-info-overlay h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.award-info-overlay p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .awards-inner-3d {
    --w: 120px;
    --h: 160px;
    --translateZ: calc((var(--w) + var(--h)) + 20px);
    --perspective: 800px;
  }
}

/* ==========================================================================
   🏆 3D 奖项展示 - 用于全屏预览的高级弹窗样式增强
   ========================================================================== */

/* 覆盖默认的模态框样式，增加高级感 */
.image-preview-modal {
  background-color: transparent; /* 完全透明，不仅是淡阴影，直接去掉 */
  backdrop-filter: none; /* 去掉磨砂玻璃效果 */
  -webkit-backdrop-filter: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* 丝滑的淡入淡出 */
  
  /* 初始状态：透明且不可交互 */
  opacity: 0;
  pointer-events: none;
}

/* 激活状态 */
.image-preview-modal.open {
  opacity: 1;
  pointer-events: auto;
}

/* 图片容器：提供3D透视上下文 */
/* 图片容器：提供3D透视上下文 */
.image-preview-modal .image-container {
  perspective: 1500px;
  transform-style: preserve-3d;
  overflow: visible;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 预览图片本体样式 */
.image-preview-modal img {
  /* 初始状态：缩小并带一点点旋转，营造"飞入"感 */
  transform: scale(0.85) rotateX(15deg) translateY(20px);
  opacity: 0;
  
  /* 移除边框和阴影，保留纯净图片 */
  border-radius: 4px; /* 只有轻微圆角 */
  /* box-shadow removed */
    
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹性物理动画 */
  backface-visibility: hidden;
  max-width: 85vw;
  max-height: 85vh;
}

/* 图片激活状态：还原并放大 */
/* 图片激活状态：还原并放大 */
.image-preview-modal.open img {
  transform: scale(1) rotateX(0deg) translateY(0);
  opacity: 1;
  box-shadow: none !important; /* 彻底移除阴影和框 */
  border: none !important;
  outline: none !important;
}

/* 优化关闭按钮样 */
.image-preview-modal .close-button {
  display: none !important;
}

.image-preview-modal .close-button:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
  color: #00ff88;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* 错误提示框的美化 */
.image-preview-modal .error-message {
  background: rgba(10, 25, 47, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-radius: 12px;
  padding: 2rem;
  color: #ef4444;
}

.image-preview-modal .loading-spinner {
  border-color: rgba(255, 255, 255, 0.1);
  border-top-color: #00ff88;
  width: 50px;
  height: 50px;
  border-width: 3px;
}
