/* 作品集页面专属样式 - 3D画廊 */
.cases-container {
  position: relative;
  z-index: 5;
  padding: 8vw;
  transform: rotate(-0.3deg);
}

/* 左侧标题区域 */
.case-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 60px;
}
.case-header .title-en {
  font-size: clamp(56px,8vw,110px);
  font-weight: 900;
  letter-spacing: .25em;
  margin: 0 0 18px 0;
  color: #ffffff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  animation: textWarp 8s ease-in-out infinite alternate;
  line-height: 1.2;
  opacity: 1 !important;
  animation: fadeUp 2.5s ease forwards 0.5s, textWarp 8s ease-in-out infinite alternate 3s !important;
}
.case-header .title-cn {
  font-size: clamp(26px,2.8vw,40px);
  letter-spacing: .6em;
  color: #c00000;
  margin: 0 0 56px 4px;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(200,0,0,0.5);
  opacity: 1 !important;
  animation: fadeUp 2.5s ease forwards 1s !important;
}

/* 3D画廊容器 */
.case-gallery {
  position: relative;
  perspective: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 0 auto;
}

/* 3D画廊项 */
.case-item {
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
  overflow: visible;
  aspect-ratio: auto;
  display: block;
  margin-bottom: 40px;
  width: 100%;
}

/* 3D效果：悬停时抬升 */
.case-item:hover {
  transform: none;
  box-shadow: none;
}

/* 3D效果：仅图片悬停时抬升 */
.case-item:hover .case-cover-container {
  transform: translateZ(20px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 
              inset 0 0 20px rgba(200, 0, 0, 0.2);
}

/* 图片容器 */
.case-cover-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* 1920x1080分辨率 */
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  margin-bottom: 15px;
}

/* 作品封面图 */
.case-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 1;
  transition: all 0.3s ease;
  object-fit: cover;
}

.case-item:hover .case-cover {
  opacity: 0.9;
}

/* 图片上的文字内容 */
.case-image-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px;
  color: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-transform: uppercase;
}

/* 图片上的主标题 */
.case-image-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  max-width: 80%;
  line-height: 1.3;
}

/* 图片上的副标题 */
.case-image-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 底部信息栏 - 移到图片下方 */
.case-bottom-info {
  position: static;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

/* 底部标题 */
.case-bottom-title {
  display: none;
}

/* 底部日期 */
.case-bottom-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  margin: 0;
}

/* 底部类型 */
.case-bottom-type {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  margin: 0;
}

/* 作品主标题 - 移到图片下方 */
.case-main-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.3;
  font-family: "Segoe Print", "Bradley Hand", cursive;
}

/* 作品标题 */
.case-title {
  display: none;
}

/* 作品标签 */
.case-tag {
  display: none;
}

/* 作品描述 */
.case-desc {
  display: none;
}

/* 档案编号 */
.case-item::before {
  content: "CASE-" attr(data-case-id);
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 10px;
  color: rgba(200, 0, 0, 0.4);
  font-family: "Segoe Print", "Bradley Hand", cursive;
  letter-spacing: 0.2em;
  z-index: 2;
}

/* 放大查看模态框 */
.case-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-modal.active {
  opacity: 1;
  visibility: visible;
}

/* 模态框内容 */
.case-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(200, 0, 0, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.8) rotateX(-10deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: auto;
  padding: 40px;
  transform-style: preserve-3d;
}

.case-modal.active .case-modal-content {
  transform: scale(1) rotateX(0deg);
}

/* 关闭按钮 */
.case-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #c00000;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-modal-close:hover {
  transform: scale(1.2) rotate(90deg);
  color: #fff;
}

/* 模态框标题 */
.case-modal-title {
  font-size: clamp(30px, 5vw, 60px);
  color: #c00000;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* 模态框标签 */
.case-modal-tag {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 30px;
  font-family: "Segoe Print", "Bradley Hand", cursive;
}

/* 模态框内容区域 */
.case-modal-body {
  font-size: 16px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

/* 媒体展示区域 */
.case-media {
  margin: 30px 0;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid rgba(200, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-media img,
.case-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 测试用的模态框样式 */
.test-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  background: rgba(20, 20, 20, 0.98);
  border: 1px solid rgba(200, 0, 0, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  padding: 40px;
  z-index: 2000;
  border-radius: 8px;
}

.test-modal h2 {
  color: #c00000;
  font-size: 24px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.test-modal p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.test-modal .test-modal-close {
  background: none;
  border: 1px solid rgba(200, 0, 0, 0.4);
  color: #c00000;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.test-modal .test-modal-close:hover {
  background: rgba(200, 0, 0, 0.2);
  transform: scale(1.05);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .cases-container {
    padding: 10vw 5vw 15vw;
  }
  
  .case-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .case-item {
    aspect-ratio: 3/4;
  }
  
  .case-item-content {
    padding: 20px;
  }
  
  .case-modal-content {
    padding: 25px;
    max-width: 95%;
    max-height: 95vh;
  }
  
  .case-modal-close {
    top: 15px;
    right: 15px;
    font-size: 25px;
    width: 35px;
    height: 35px;
  }
}

/* Blender画廊样式 */
.blender-gallery {
  margin-top: 80px;
}

.blender-header {
  margin-bottom: 30px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.blender-title {
  font-size: 28px;
  color: #c00000;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.blender-subtitle {
  font-size: 20px;
  color: #ffffff;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
  font-weight: 600;
}

.blender-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  letter-spacing: 0.05em;
  margin: 0;
}

.blender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 40px;
}

.blender-item {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  aspect-ratio: 3/2;
}

.blender-item:hover {
  transform: scale(1.03);
  z-index: 10;
}

.blender-thumb-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.blender-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blender-item:hover .blender-thumb {
  transform: scale(1.1);
}

.blender-item-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 12px;
  color: #ffffff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 10px;
  margin: 0;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blender-item:hover .blender-item-title {
  opacity: 1;
}

/* 生活展示样式 */
.life-gallery {
  margin-top: 80px;
}

.life-header {
  margin-bottom: 30px;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.life-title {
  font-size: 28px;
  color: #c00000;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.life-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  letter-spacing: 0.05em;
  margin: 0;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 40px;
}

.life-item {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  aspect-ratio: 3/2;
}

.life-item:hover {
  transform: scale(1.03);
  z-index: 10;
}

.life-thumb-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.life-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.life-item:hover .life-thumb {
  transform: scale(1.1);
}

/* Blender图片查看器 */
.blender-viewer {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

.blender-viewer.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.blender-viewer-content {
  margin: auto;
  padding: 20px;
  max-width: 90%;
  max-height: 90vh;
  position: relative;
}

.blender-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 80vh;
}

.blender-image-container .blender-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* 调整箭头位置到图片外侧 */
  width: 50px;
  height: 50px;
}

.blender-image-container .blender-viewer-prev {
  left: -25px;
  margin-left: -10px;
}

.blender-image-container .blender-viewer-next {
  right: -25px;
  margin-right: -10px;
  /* 调整右侧箭头位置，确保与左侧对称 */
  transform: translateY(-50%) translateX(0);
}

.blender-viewer-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(200, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

.blender-viewer-close {
  color: #aaa;
  font-size: 36px;
  font-weight: bold;
  position: absolute;
  top: -40px;
  right: -10px;
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.3s ease;
  z-index: 10;
}

.blender-viewer-close:hover {
  color: #c00000;
  transform: scale(1.2);
}

/* 左右导航按钮样式 */
.blender-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  /* 固定位置在查看器容器两侧，而不是相对于图片 */
}

.blender-viewer-nav:hover {
  background: rgba(200, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.blender-viewer-prev {
  left: -25px;
}

.blender-viewer-next {
  right: -25px;
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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