/* 3D建模小助手 — 少量自定义，其余用 Tailwind */
:root {
  --app-blue: #3b82f6;
  --app-blue-dark: #2563eb;
  --app-bg-top: #60a5fa;
  --app-bg-bot: #1e3a8a;
}
/* 全站背景图：文件放在 assets/，命名 20260422-144849.png（或改扩展名如 .jpg） */
.app-gradient {
  background-color: var(--app-bg-bot);
  background-image: url("../20260422-144849.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 亮面毛玻璃：不压暗整页；略提高白度 + 更强模糊，让背后底图「柔化」后托住白字 */
.app-panel {
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

/* 白字在浅底/花底上：极轻阴影增强轮廓，亮度仍保持 */
body.app-gradient {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
#app-frame {
  transition: opacity 0.2s ease;
}
#app-frame.is-fade {
  opacity: 0.35;
}
model-viewer {
  width: 100%;
  height: 100%;
  --progress-bar-color: #3b82f6;
  --poster-color: #e0f2fe;
}
/* 作品页/成功页拉满 1080p 视高 */
.app-fill {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app-fill-main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.app-mv-box {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
}
.app-mv-box model-viewer {
  min-height: 100%;
  display: block;
}
#v-main-box {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* 全屏图片预览 */
.app-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}
.app-img-lightbox[hidden] {
  display: none;
}
.app-img-lightbox .app-img-lightbox-x {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.app-img-lightbox .app-img-lightbox-x:hover {
  background: rgba(255, 255, 255, 0.25);
}
.app-img-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
}
/* 可放大图：多格为双击，其余为单击（见 navigation.js） */
img.zoomable {
  cursor: zoom-in;
}
/* 多格内单击仍用于选格，双击可全屏看大图 */
img.zoomable.zoom-dbl {
  cursor: zoom-in;
}

/* 作品广场：独立定义网格，避免子项高度塌陷导致上下行视觉重叠 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: max-content;
  gap: 0.75rem;
  align-content: start;
}
@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.gallery-grid > .gallery-tile,
.gallery-grid > .gallery-placeholder {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.gallery-tile {
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  z-index: 0;
  isolation: isolate;
  -webkit-appearance: none;
  appearance: none;
}
.gallery-tile-media {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}
.gallery-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-placeholder {
  aspect-ratio: 1 / 1;
  width: 100%;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}
