.exhibit-detail {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f1e8 0%, #e8e0d3 50%, #f5f1e8 100%);
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

.back-button {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1000;
  color: #2c2c2c;
  text-decoration: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-family: 'SimSun', 'STSong', serif;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 60px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

/* 背景海报层（用于展品背景图的模糊与遮罩） */
.exhibit-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(30px) saturate(0.9);
  transform: scale(1.05);
  opacity: 0;
  transition: opacity 0.6s ease, filter 0.6s ease;
  z-index: 0;
}

.exhibit-bg.visible {
  opacity: 1;
}

.exhibit-bg::after {
  /* 遮罩，增强前景可读性，不使背景和展品割裂 */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.25) 0%, rgba(255,255,255,0.02) 35%, rgba(10,10,10,0.35) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.detail-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.exhibit-id {
  font-size: 1.2rem;
  color: rgba(0, 0, 0, 0.4);
  margin-bottom: 20px;
  font-family: 'SimSun', 'STSong', serif;
}

.detail-title-zh {
  font-size: 3rem;
  color: #1a1a1a;
  margin-bottom: 20px;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-weight: 700;
  line-height: 1.3;
}

.detail-title-en {
  font-size: 1.5rem;
  color: #4a4a4a;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  margin: 0 0 15px 0;
}

/* ensure titles, authors and descriptions wrap on small screens and long words break */
.detail-title-zh,
.detail-title-en,
.detail-authors,
.detail-description p {
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.detail-authors {
  font-size: 0.95rem;
  color: #666;
  margin-top: 10px;
  font-family: 'SimSun', 'STSong', serif;
  line-height: 1.6;
}

.detail-authors span:first-child {
  font-weight: 600;
  color: #4a4a4a;
}

.detail-content {
  display: grid;
  /* left: main media column, right: metadata/description column */
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
  gap: 48px;
  margin-top: 60px;
}

.detail-media {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: stretch;
}

.detail-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  max-width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.detail-image-placeholder img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 15px;
}

.detail-image-placeholder.has-image {
  border: none;
  background: transparent;
}

.detail-image-placeholder.has-image::before {
  display: none;
}

.detail-image-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.image-placeholder-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: rgba(0, 0, 0, 0.3);
  font-size: 1.2rem;
  font-family: 'SimSun', 'STSong', serif;
}

.detail-video-container {
  width: 100%;
}

.detail-video-container h3 {
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 20px;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-weight: 600;
}

.detail-video-container video {
  width: 100%;
  height: auto;
  max-height: 500px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.digital-collection-container {
  width: 100%;
  margin-top: 30px;
}

.digital-collection-container h3 {
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 20px;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-weight: 600;
}

.collection-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.collection-videos {
  flex: 1;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}

/* picturebook horizontal slider (for exhibit 11) */
.picturebook-images {
  flex: 1;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}
.picturebook-images .illustration-image-item {
  flex: 0 0 280px;
  max-width: 32%;
}
.picturebook-images::-webkit-scrollbar {
  height: 8px;
}
.picturebook-images::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}
.picturebook-images::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.picturebook-images::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.collection-videos::-webkit-scrollbar {
  height: 8px;
}

.collection-videos::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.collection-videos::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.collection-videos::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.collection-video-item {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collection-video-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.collection-video-name {
  text-align: center;
  font-size: 0.95rem;
  color: #2c2c2c;
  font-family: 'SimSun', 'STSong', serif;
  margin: 0;
  font-weight: 500;
}

/* 作品图示板块 */
/* (work illustrations module removed; vertical picture-book uses .illustrations-images.vertical styles below) */

.illustration-image-item {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.illustration-image-item img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* vertical illustrations layout (for long picture books) */
.illustrations-images.vertical {
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 640px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.illustrations-images.vertical .illustration-image-item {
  flex: 0 0 auto;
  width: 100%;
}

/* make vertical picture-book snap nicely while scrolling */
.illustrations-images.vertical {
  scroll-snap-type: y mandatory;
}
.illustrations-images.vertical .illustration-image-item {
  scroll-snap-align: start;
  padding-bottom: 12px;
}

.illustrations-images.vertical::-webkit-scrollbar {
  width: 8px;
}

.illustrations-images.vertical::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
}

.illustrations-images.vertical::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 4px;
}

/* when rendering a vertical picture book inside the poster placeholder */
.detail-image-placeholder.vertical {
  aspect-ratio: auto;
  max-height: 720px;
  padding: 12px;
}

.detail-image-placeholder.vertical .illustrations-images.vertical {
  max-height: 680px;
  width: 100%;
}

.detail-image-placeholder.vertical .illustration-image-item img {
  max-height: none;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Desktop: increase visual scale and spacing */
@media (min-width: 1200px) {
  .detail-container {
    max-width: 1400px;
    padding: 80px;
  }
  .detail-title-zh { font-size: 3.6rem; }
  .detail-image-placeholder { aspect-ratio: 4/3; }
  .illustrations-images.vertical { max-height: calc(80vh - 200px); }
  .illustration-image-item img { max-height: 720px; }
}

/* Picturebook horizontal slider snapping */
.picturebook-images {
  scroll-snap-type: x mandatory;
}
.picturebook-images .illustration-image-item {
  scroll-snap-align: start;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .detail-container {
    padding: 24px;
  }
  .detail-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .detail-image-placeholder.vertical {
    max-height: 70vh;
    padding: 8px;
  }
  .illustrations-images.vertical {
    max-height: calc(70vh - 120px);
  }
  /* make picturebook show one large page per swipe on mobile */
  .picturebook-images .illustration-image-item {
    flex: 0 0 82%;
  }
  .picturebook-images { gap: 12px; }
  .slider-btn { width: 34px; height: 34px; font-size: 20px; }
}

.slider-btn {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  color: #2c2c2c;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-family: 'SimSun', 'STSong', serif;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-btn:active {
  transform: scale(0.95);
}

/* floating prev/next buttons */
.nav-floating {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 1200;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.nav-floating:hover { transform: translateY(-50%) scale(1.05); background: rgba(255,255,255,1); }
.nav-floating:active { transform: translateY(-50%) scale(0.98); }
.nav-floating.prev-floating { left: 18px; }
.nav-floating.next-floating { right: 18px; }

@media (max-width: 768px) {
  .nav-floating { width: 40px; height: 40px; font-size: 18px; left: 10px; right: 10px; }
  .nav-floating.prev-floating { left: 10px; }
  .nav-floating.next-floating { right: 10px; }
}

.detail-description {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-description h3 {
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 30px;
  font-family: 'KaiTi', 'STKaiti', serif;
  font-weight: 600;
}

.detail-description p {
  font-size: 1.1rem;
  line-height: 2;
  color: #2c2c2c;
  font-family: 'SimSun', 'STSong', serif;
  text-indent: 2em;
}

.navigation-links {
  max-width: 1200px;
  margin: 60px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.nav-link-prev,
.nav-link-next {
  color: #2c2c2c;
  text-decoration: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-family: 'SimSun', 'STSong', serif;
}

.nav-link-prev:hover,
.nav-link-next:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-message {
  text-align: center;
  padding: 100px 20px;
}

.error-message h2 {
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 30px;
  font-family: 'KaiTi', 'STKaiti', serif;
}

.back-link {
  color: #2c2c2c;
  text-decoration: none;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-family: 'SimSun', 'STSong', serif;
  display: inline-block;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 968px) {
  .detail-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .detail-media {
    gap: 20px;
  }
  
  .detail-video-container video {
    max-height: 400px;
  }
  
  .collection-video-item {
    flex: 0 0 250px;
  }
  
  .collection-video-item video {
    height: 150px;
  }
  
  .illustration-image-item {
    flex: 0 0 250px;
  }
  
  .illustration-image-item img {
    max-height: 300px;
  }
  
  .slider-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .detail-title-zh {
    font-size: 2rem;
  }

  .detail-title-en {
    font-size: 1.2rem;
  }

  .detail-container {
    padding: 40px 30px;
  }
  /* on narrow screens make collection videos wrap into rows */
  .collection-videos {
    flex-wrap: wrap;
  }
  .collection-video-item {
    flex: 0 0 48%;
    max-width: 48%;
  }
}

@media (max-width: 768px) {
  .exhibit-detail {
    padding: 100px 20px 60px;
  }

  .detail-container {
    padding: 30px 20px;
  }

  .detail-title-zh {
    font-size: 1.8rem;
  }

  .navigation-links {
    flex-direction: column;
  }
  
  .collection-video-item {
    flex: 0 0 200px;
  }
  
  .collection-video-item video {
    height: 120px;
  }
  
  .illustration-image-item {
    flex: 0 0 200px;
  }
  
  .illustration-image-item img {
    max-height: 250px;
  }
  
  .slider-btn {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  
  .collection-videos {
    gap: 15px;
  }
}

