/* ========== 林间陈列馆 · 页面氛围 ========== */
#pageGallery {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 139, 122, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(90, 122, 158, 0.06) 0%, transparent 50%),
    var(--qq-bg, #f4f8f6);
}

#pageGallery .page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.gallery-hero {
  text-align: center;
  margin-bottom: 28px;
  padding: 36px 20px 8px;
}

.gallery-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--qq-primary, #3d8b7a);
  background: rgba(61, 139, 122, 0.1);
  border: 1px solid rgba(61, 139, 122, 0.2);
}

.gallery-hero h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 300;
  letter-spacing: 6px;
  color: var(--qq-primary, #3d8b7a);
  margin: 0 0 8px;
}

.gallery-hero-sub {
  color: var(--qq-text-sub, #6b7c74);
  font-size: 15px;
  margin: 0;
  line-height: 1.7;
}

.gallery-hero-note {
  color: var(--qq-text-sub, #6b7c74);
  font-size: 13px;
  margin: 10px 0 0;
  opacity: 0.85;
}

.gallery-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 4px 22px;
}

.gallery-tag {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--qq-text-sub, #6b7c74);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  border: 1px solid rgba(61, 139, 122, 0.12);
  box-shadow: 0 2px 8px rgba(45, 74, 66, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gallery-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45, 74, 66, 0.08);
  color: var(--qq-primary, #3d8b7a);
}

.gallery-tag.active {
  background: linear-gradient(135deg, #3d8b7a 0%, #2d6a5a 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(61, 139, 122, 0.35);
}

.gallery-submit-bar {
  margin-top: 18px;
}

.gallery-submit-btn {
  padding: 10px 28px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3d8b7a, #2d6a5a);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(61, 139, 122, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 139, 122, 0.38);
}

/* ========== 3D 展厅舞台 ========== */
.gallery-3d-stage {
  position: relative;
  width: 100%;
  height: min(74vh, 680px);
  min-height: 440px;
  margin-bottom: 36px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, #1e3640 0%, #0c141c 68%),
    linear-gradient(180deg, #0a1018 0%, #060a10 100%);
  box-shadow:
    0 12px 48px rgba(8, 20, 24, 0.4),
    0 0 0 1px rgba(126, 184, 168, 0.12),
    inset 0 0 120px rgba(61, 139, 122, 0.07);
}

.gallery-3d-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

.gallery-3d-stage::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(126, 184, 168, 0.1);
  pointer-events: none;
  z-index: 1;
}

.gallery-3d-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: rgba(126, 184, 168, 0.35);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

.gallery-3d-corner--tl { top: 16px; left: 16px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.gallery-3d-corner--tr { top: 16px; right: 16px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.gallery-3d-corner--bl { bottom: 16px; left: 16px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.gallery-3d-corner--br { bottom: 16px; right: 16px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.gallery-3d-mount {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  position: relative;
  z-index: 0;
}

.gallery-3d-mount:active {
  cursor: grabbing;
}

.gallery-3d-mount canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

.gallery-3d-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.gallery-3d-count {
  position: absolute;
  top: 16px;
  left: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgba(220, 240, 232, 0.92);
  background: rgba(8, 18, 22, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(126, 184, 168, 0.22);
}

.gallery-3d-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.gallery-3d-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(126, 184, 168, 0.28);
  background: rgba(8, 18, 22, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(220, 240, 232, 0.9);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.gallery-3d-ctrl-btn:hover {
  background: rgba(61, 139, 122, 0.35);
  border-color: rgba(126, 184, 168, 0.5);
  transform: scale(1.06);
}

.gallery-3d-ctrl-btn.is-paused {
  background: rgba(61, 139, 122, 0.4);
}

.gallery-3d-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(8, 16, 20, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(126, 184, 168, 0.22);
  pointer-events: none;
  z-index: 2;
}

.gallery-3d-hint span {
  font-size: 12px;
  color: rgba(220, 240, 232, 0.88);
  white-space: nowrap;
  letter-spacing: 0.4px;
}

.gallery-3d-hint span::before {
  content: '·';
  margin-right: 8px;
  opacity: 0.45;
}

.gallery-3d-hint span:first-child::before {
  content: none;
  margin: 0;
}

.gallery-3d-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 16, 24, 0.55);
  color: rgba(220, 240, 232, 0.92);
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 4;
  pointer-events: none;
}

.gallery-3d-loading-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(126, 184, 168, 0.2);
  border-top-color: rgba(126, 184, 168, 0.85);
  border-radius: 50%;
  animation: gallery-spin 0.9s linear infinite;
}

@keyframes gallery-spin {
  to { transform: rotate(360deg); }
}

.gallery-status {
  text-align: center;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .gallery-3d-stage {
    min-height: 380px;
    height: min(60vh, 540px);
    border-radius: 18px;
  }
  .gallery-hero h1 { letter-spacing: 3px; }
  .gallery-3d-hint {
    bottom: 12px;
    padding: 7px 12px;
    max-width: 92%;
  }
  .gallery-3d-hint span { font-size: 11px; }
  .gallery-3d-count { font-size: 11px; padding: 5px 11px; }
  .gallery-3d-ctrl-btn { width: 32px; height: 32px; font-size: 13px; }
}
