/* ===========================================================
   Lumina Gallery — 新版主页皮肤「暗夜玻璃」(neo)
   深色 3D 星野背景 + 毛玻璃面板 + 胶囊选项卡 + 瀑布流瀑布
   本文件独立于 Tailwind / Material Symbols，零外部依赖。
   =========================================================== */

:root {
  --color-bg: #08080a;
  --color-fg: #f6f6f8;
  --color-muted: rgba(246, 246, 248, 0.62);
  --color-line: rgba(255, 255, 255, 0.1);
  --color-accent: #7c8cff;
  --color-accent2: #ff7ad9;
  --radius: 14px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Consolas,
    'Noto Sans Mono CJK SC', monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--color-bg); }

body {
  margin: 0;
  min-height: 100%;
  background: transparent;
  color: var(--color-fg);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.ico { display: inline-flex; flex-shrink: 0; }
.ico svg { display: block; }

.focus-ring:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ---------- 3D 立体背景 ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 92% 58% at 50% 112%, rgba(124, 140, 255, 0.16), transparent 72%),
    var(--color-bg);
}

.scene-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.scene-stage {
  position: absolute;
  inset: 0;
  perspective: 1200px;
  perspective-origin: 50% 46%;
}

.scene-space {
  --px: 0;
  --py: 0;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--py) * -2.4deg)) rotateY(calc(var(--px) * 4deg));
}

.grid-plane {
  position: absolute;
  left: -30vw;
  width: 160vw;
  height: 900px;
  overflow: hidden;
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.28) 14%, #000 52%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.28) 14%, #000 52%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.grid-plane--floor { top: 46%; transform: rotateX(70deg); }

.grid-plane--roof {
  bottom: 54%;
  transform-origin: 50% 100%;
  transform: rotateX(-70deg);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, 0.22) 16%, rgba(0, 0, 0, 0.62) 58%);
  mask-image: linear-gradient(to top, transparent 0%, rgba(0, 0, 0, 0.22) 16%, rgba(0, 0, 0, 0.62) 58%);
}

.grid-plane__run {
  position: absolute;
  top: -56px;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    linear-gradient(to bottom, rgba(163, 174, 255, 0.09) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: grid-run 4.2s linear infinite;
  will-change: transform;
}

@keyframes grid-run { to { transform: translate3d(0, 56px, 0); } }

.scene-beam {
  position: absolute;
  left: -20%;
  top: 46%;
  width: 140%;
  height: 3px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(124, 140, 255, 0.5) 22%, rgba(255, 255, 255, 0.78) 50%, rgba(255, 122, 217, 0.45) 78%, transparent);
  box-shadow: 0 0 70px 12px rgba(124, 140, 255, 0.2);
  animation: beam-pulse 7.5s ease-in-out infinite alternate;
}

@keyframes beam-pulse { from { opacity: 0.34; } to { opacity: 0.72; } }

.dust { position: absolute; }
.dust__run { position: absolute; inset: 0; will-change: transform; }

.dust--far { left: -60%; top: -60%; width: 220%; height: 220%; transform: translateZ(-1000px); }
.dust--far .dust__run {
  background-image:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.42) 1px, transparent 1.7px),
    radial-gradient(circle at 67% 12%, rgba(124, 140, 255, 0.5) 1.2px, transparent 2px),
    radial-gradient(circle at 38% 71%, rgba(255, 255, 255, 0.3) 1px, transparent 1.7px),
    radial-gradient(circle at 86% 58%, rgba(255, 122, 217, 0.42) 1.2px, transparent 2px);
  background-size: 300px 300px;
  animation: dust-far 96s linear infinite;
}

.dust--mid { left: -35%; top: -35%; width: 170%; height: 170%; transform: translateZ(-500px); }
.dust--mid .dust__run {
  background-image:
    radial-gradient(circle at 24% 36%, rgba(255, 255, 255, 0.34) 1.2px, transparent 2px),
    radial-gradient(circle at 78% 64%, rgba(124, 140, 255, 0.4) 1.4px, transparent 2.2px),
    radial-gradient(circle at 52% 8%, rgba(255, 122, 217, 0.3) 1.2px, transparent 2px);
  background-size: 380px 380px;
  animation: dust-mid 64s linear infinite;
}

.dust--near { left: -16%; top: -16%; width: 132%; height: 132%; transform: translateZ(-120px); }
.dust--near .dust__run {
  background-image:
    radial-gradient(circle at 18% 74%, rgba(255, 255, 255, 0.26) 1.4px, transparent 2.4px),
    radial-gradient(circle at 82% 26%, rgba(163, 174, 255, 0.28) 1.6px, transparent 2.6px);
  background-size: 520px 520px;
  animation: dust-near 46s linear infinite;
}

@keyframes dust-far { to { transform: translate3d(-300px, 0, 0); } }
@keyframes dust-mid { to { transform: translate3d(380px, 380px, 0); } }
@keyframes dust-near { to { transform: translate3d(-520px, 520px, 0); } }

.wire { position: absolute; transform-style: preserve-3d; will-change: transform; }
.wire__f {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(124, 140, 255, 0.28);
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.055), rgba(255, 122, 217, 0.03));
  box-shadow: inset 0 0 32px rgba(124, 140, 255, 0.07);
}
.wire__f--ft { transform: translateZ(var(--half)); }
.wire__f--bk { transform: rotateY(180deg) translateZ(var(--half)); }
.wire__f--lt { transform: rotateY(-90deg) translateZ(var(--half)); }
.wire__f--rt { transform: rotateY(90deg) translateZ(var(--half)); }
.wire__f--tp { transform: rotateX(90deg) translateZ(var(--half)); }
.wire__f--bt { transform: rotateX(-90deg) translateZ(var(--half)); }

.wire--a {
  --half: 105px;
  left: 78%;
  top: 24%;
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  transform: translate3d(0, 0, -430px) rotateX(-16deg) rotateY(28deg);
  animation: wire-spin-a 58s linear infinite;
}

.wire--b {
  --half: 68px;
  left: 14%;
  top: 76%;
  width: 136px;
  height: 136px;
  margin: -68px 0 0 -68px;
  transform: translate3d(0, 0, -240px) rotateX(20deg) rotateZ(8deg);
  animation: wire-spin-b 42s linear infinite;
}

@keyframes wire-spin-a {
  from { transform: translate3d(0, 0, -430px) rotateX(-16deg) rotateY(0deg); }
  to { transform: translate3d(0, 0, -430px) rotateX(-16deg) rotateY(360deg); }
}
@keyframes wire-spin-b {
  from { transform: translate3d(0, 0, -240px) rotateX(20deg) rotateZ(8deg) rotateY(360deg); }
  to { transform: translate3d(0, 0, -240px) rotateX(20deg) rotateZ(8deg) rotateY(0deg); }
}

.scene-glow { position: absolute; inset: 0; }
.scene-glow::before,
.scene-glow::after {
  content: '';
  position: absolute;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  will-change: transform;
}
.scene-glow::before {
  top: -28vw;
  left: -18vw;
  background: radial-gradient(circle, rgba(124, 140, 255, 0.55), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.scene-glow::after {
  right: -22vw;
  bottom: -30vw;
  background: radial-gradient(circle, rgba(255, 122, 217, 0.42), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12vw, 8vh, 0) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-10vw, -10vh, 0) scale(0.92); }
}

.scene-fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 54% at 50% 44%, rgba(8, 8, 10, 0) 0%, rgba(8, 8, 10, 0.34) 62%, rgba(8, 8, 10, 0.76) 100%),
    linear-gradient(to bottom, rgba(8, 8, 10, 0.7) 0%, rgba(8, 8, 10, 0.1) 24%, rgba(8, 8, 10, 0) 48%, rgba(8, 8, 10, 0.34) 100%);
}

.scene[data-lite='true'] .grid-plane--roof,
.scene[data-lite='true'] .dust--far,
.scene[data-lite='true'] .dust--mid,
.scene[data-lite='true'] .wire--b { display: none; }

.scene[data-lite='true'] .scene-glow::before,
.scene[data-lite='true'] .scene-glow::after { filter: blur(80px); }

@media (max-width: 720px) {
  .scene-stage { perspective: 900px; }
  .grid-plane--roof,
  .dust--far,
  .wire { display: none; }
  .grid-plane__run { animation-duration: 6s; }
  .scene-glow::before,
  .scene-glow::after { filter: blur(72px); opacity: 0.4; }
}

/* ---------- 玻璃面板 ---------- */

.glass {
  position: relative;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
}

.glass-soft {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hairline { border-bottom: 1px solid var(--color-line); }

/* ---------- 顶栏 ---------- */

.neo-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(16px, 3vw);
  background: rgba(8, 8, 10, 0.55);
  border: 0;
  border-bottom: 1px solid var(--color-line);
  border-radius: 0;
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.neo-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.neo-brand:hover { opacity: 0.82; }
.neo-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  box-shadow: 0 8px 22px -10px rgba(124, 140, 255, 0.9);
}

.neo-header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }

.neo-search { position: relative; display: none; }
@media (min-width: 720px) { .neo-search { display: block; } }
.neo-search .ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}
.neo-search input {
  width: 190px;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-fg);
  font-size: 0.85rem;
  outline: none;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
}
.neo-search input::placeholder { color: rgba(255, 255, 255, 0.36); }
.neo-search input:focus {
  width: 250px;
  border-color: rgba(124, 140, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.neo-auth { display: inline-flex; align-items: center; gap: 8px; }
.neo-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}
.neo-auth-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* ---------- 主区 ---------- */

.neo-main {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 30px max(16px, 3vw) 96px;
}

.neo-hero {
  max-width: 720px;
  margin: 0 auto 26px;
  text-align: center;
}
.neo-hero h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #ffffff, #c9d2ff 55%, #ffc9ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.neo-hero p {
  margin-top: 12px;
  font-size: 0.94rem;
  color: var(--color-muted);
}

/* ---------- 选项卡 ---------- */

.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 104px;
  justify-content: center;
  padding: 0.5rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: color 0.25s ease;
}
.tab[data-active='true'] { color: #0a0a0c; }

.tab-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.82));
  box-shadow: 0 8px 22px -10px rgba(255, 255, 255, 0.7);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

/* ---------- 工具条（计数 + 选项卡 + 排序） ---------- */

.neo-toolbar {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.neo-toolbar-inner { position: relative; z-index: 30; }

.count-anchor {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sort-anchor {
  position: absolute;
  left: 100%;
  top: 0;
  bottom: 0;
  margin-left: 10px;
  z-index: 70;
}

.sort-btn {
  display: grid;
  place-items: center;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sort-btn:hover,
.sort-btn[aria-expanded='true'] {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 70;
  min-width: 138px;
  padding: 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: top right;
  animation: menu-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.8rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sort-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sort-item.is-active {
  color: #fff;
  font-weight: 600;
  background: rgba(124, 140, 255, 0.16);
}

/* ---------- 分类胶囊 ---------- */

.neo-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.chip-btn {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}
.chip-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.chip-btn.is-active {
  color: #0a0a0c;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.82));
  border-color: transparent;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 42px;
  padding: 0 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.94);
  color: #0a0a0c;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.btn:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-fg);
  border-color: rgba(255, 255, 255, 0.14);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }

.btn-sm { height: 34px; padding: 0 0.8rem; font-size: 0.8rem; border-radius: 9px; }

/* ---------- 画廊瀑布流 ---------- */

.masonry { display: flex; gap: 14px; align-items: flex-start; }
.masonry-col { display: flex; flex-direction: column; gap: 14px; flex: 1 1 0; min-width: 0; }

.tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  aspect-ratio: var(--ar, 1);
  animation: tile-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}
.tile[data-loaded='true'] { aspect-ratio: auto; }

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 22px 46px -20px rgba(0, 0, 0, 0.95);
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tile[data-loaded='true'] img { height: auto; transform: none; }
.tile img[data-loaded='true'] { opacity: 1; transform: scale(1); }
.tile:hover img[data-loaded='true'] { transform: scale(1.045); }

.tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.7rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}
.tile:hover .tile-meta,
.tile:focus-visible .tile-meta { opacity: 1; transform: translateY(0); }

.tile-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.skeleton {
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.5rem;
  padding: 4rem 1.5rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}
.empty-card .ico { color: rgba(255, 255, 255, 0.32); }

.dots { display: inline-flex; gap: 6px; }
.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: dot 1s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-5px); opacity: 1; }
}

.neo-loadmore { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- 螺旋斜卡总览（参照线上 tuchuang 的 helix 布局） ---------- */

.helix-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 相机：透视容器，卡片围绕它中轴排成螺旋 */
.helix-stage {
  position: relative;
  width: 100%;
  height: min(72vh, 720px);
  perspective: 2600px;
  perspective-origin: 50% center;
  overflow: hidden;
  cursor: grab;
  /* 关键：必须允许竖向触摸滚动（pan-y）。
     之前用 touch-action: none 把整个舞台的触摸滚动都禁掉了，
     平铺模式下所有图片都在舞台里 → 手机上一整页都划不动。 */
  touch-action: pan-y;
  /* 拖动翻卡时不要触发浏览器默认的蓝色整页选中高亮 */
  user-select: none;
  -webkit-user-select: none;
}
.helix-stage:active { cursor: grabbing; }

/* 螺旋原点：舞台正中，preserve-3d 让卡片的 3D 变换真实生效 */
.helix-space {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.helix-card {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.9);
  backface-visibility: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s,
    box-shadow 0.4s,
    border-color 0.4s;
}

.helix-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.helix-card img[data-loaded='true'] { opacity: 1; }

/* 图片文件丢失时的占位卡片（不再让整页变空）
   注意：这里刻意不用条纹/网格图案 —— 细密的斜纹在手机上看很像「马赛克」，
   只用一块素色底 + 文字说明 */
.helix-card.is-broken { border-style: dashed; }
.helix-card.is-broken img { display: none; }
.helix-card.is-broken::after {
  content: '图片文件丢失';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(14, 14, 18, 0.72);
}

/* 平铺（展开）模式是「一眼看全」，所以整张图完整显示，
   不然 855×57 这种极宽截图会被 cover 放大成一块看不出内容的色块 */
.helix-space--spread .helix-card img {
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px;
}

.helix-card[data-active='true'] {
  cursor: zoom-in;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 40px 90px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(124, 140, 255, 0.35);
}

/* 正面卡片右上角的「打开原图」小徽标 */
.helix-card-open {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.helix-card[data-active='true'] .helix-card-open { opacity: 1; transform: scale(1); }

/* 上一张 / 下一张 */
.helix-nav {
  position: absolute;
  left: 50%;
  z-index: 4500;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.2s;
}
.helix-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  transform: scale(1.06);
}
.helix-nav:disabled { opacity: 0.28; cursor: not-allowed; }
.helix-nav--up { top: 14px; }
.helix-nav--down { bottom: 14px; }

/* 图片左右两侧的「上一个 / 下一个」：垂直居中，比上下箭头稍大一点便于点 */
.helix-nav--left,
.helix-nav--right {
  top: 50%;
  bottom: auto;
  margin-left: 0;
  margin-top: -25px;
  width: 50px;
  height: 50px;
}
.helix-nav--left { left: 12px; right: auto; }
.helix-nav--right { left: auto; right: 12px; }

/* 按当前排布切换：斜卡模式用上/下，平铺（不斜着 / 展开）模式用左/右 */
.helix-stage[data-mode='slant'] .helix-nav--left,
.helix-stage[data-mode='slant'] .helix-nav--right,
.helix-stage:not([data-mode]) .helix-nav--left,
.helix-stage:not([data-mode]) .helix-nav--right { display: none; }

.helix-stage[data-mode='flat'] .helix-nav--up,
.helix-stage[data-mode='flat'] .helix-nav--down,
.helix-stage[data-mode='spread'] .helix-nav--up,
.helix-stage[data-mode='spread'] .helix-nav--down { display: none; }

@media (max-width: 720px) {
  .helix-nav--left, .helix-nav--right { width: 42px; height: 42px; margin-top: -21px; }
  .helix-nav--left { left: 6px; }
  .helix-nav--right { right: 6px; }
}

/* 底部信息条：尺寸 / 大小 / 格式 / 分类 + 当前位置 */
.helix-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
  min-height: 24px;
}
.helix-pos {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.helix-hint {
  margin-top: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.76rem;
  text-align: center;
}

@media (max-width: 720px) {
  /* 手机上计数不再挤在选项卡左边（会被挤出屏幕看不见），
     改成单独一行放在选项卡上方 */
  .neo-toolbar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .count-anchor {
    position: static;
    transform: none;
    margin-right: 0;
    order: -1;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.5);
  }
}

/* 「加载更多」：平铺模式下贴在图片区下方 */
.neo-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  min-height: 0;
}
.neo-more-wrap .btn { min-width: 180px; justify-content: center; }

/* 原图放大层 */
.helix-zoom {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 3.4rem 1rem 1.4rem;
  /* 接近纯黑：避免背后的蓝色星野透过遮罩显得「一片蓝」 */
  background: #07070a;
  animation: fade-in 0.2s ease both;
  cursor: zoom-out;
  user-select: none;
  -webkit-user-select: none;
  /* 小屏时万一内容高于视口，允许在遮罩层内滚动 */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.helix-zoom-img {
  width: auto;
  height: auto;
  max-width: min(94vw, 1600px);
  max-height: 76vh;
  border-radius: 12px;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
}
.helix-zoom-close {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 22, 30, 0.55);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.helix-zoom-close:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.06); }

/* 原图页里的上一张 / 下一张箭头：固定在左右两侧、垂直居中 */
.helix-zoom-nav {
  position: fixed;
  top: 50%;
  z-index: 210;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 22, 30, 0.55);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s, border-color 0.2s, opacity 0.2s;
}
.helix-zoom-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
  transform: scale(1.07);
}
.helix-zoom-nav:disabled { opacity: 0.22; cursor: not-allowed; }
.helix-zoom-nav--prev { left: max(12px, 2vw); }
.helix-zoom-nav--next { right: max(12px, 2vw); }

@media (max-width: 720px) {
  .helix-zoom-nav { width: 44px; height: 44px; margin-top: -22px; }
  .helix-zoom-nav--prev { left: 8px; }
  .helix-zoom-nav--next { right: 8px; }
}
.helix-zoom-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: min(94vw, 1600px);
  cursor: default;
}
.helix-zoom-title { font-size: 0.9rem; font-weight: 600; }
.helix-zoom-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}
.helix-zoom-meta .chip { font-weight: 600; }
.helix-zoom-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .helix-stage { height: min(64vh, 560px); perspective: 1100px; }
}

@media (prefers-reduced-motion: reduce) {
  .helix-card { transition-duration: 0.01ms; }
}

/* ---------- 全部展开平铺（spread）：所有图片一起铺开、尺寸更小 ---------- */

.helix-space--spread {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: auto;
  transform: none;
}

/* 平铺模式下舞台高度自适应（图片多时整页滚动，左右箭头不会跟着滚走）
   另外加一层很淡的底：避免背景 3D 场景的网格/星点从图片缝里透出来
   —— 在细长的手机屏上，那层网格看起来会很像「马赛克」 */
.helix-stage[data-mode='spread'] {
  display: flex;
  height: auto;
  min-height: min(60vh, 520px);
  max-height: none;
  overflow: visible;
  cursor: default;
  background: radial-gradient(120% 80% at 50% 0%, rgba(10, 11, 17, 0.55), rgba(8, 8, 12, 0.34));
  border-radius: 18px;
}

.helix-space--spread .helix-card {
  position: static;
  width: 104px;
  height: 156px;
  margin: 0;
  transform: none;
  opacity: 1;
  z-index: auto;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.95);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.helix-space--spread .helix-card.is-landscape {
  width: 156px;
  height: 104px;
}

.helix-space--spread .helix-card[data-active='true'] {
  transform: scale(1.08);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 2px rgba(124, 140, 255, 0.5),
    0 20px 44px -22px rgba(0, 0, 0, 0.95);
}

.helix-space--spread .helix-card[data-active='true'] .helix-card-open {
  opacity: 1;
  transform: scale(1);
  width: 22px;
  height: 22px;
}

@media (max-width: 720px) {
  .helix-space--spread { gap: 7px; }
  .helix-space--spread .helix-card { width: 78px; height: 117px; }
  .helix-space--spread .helix-card.is-landscape { width: 117px; height: 78px; }
  /* 平铺模式下高度自适应，别再限制高度（否则手机上会溢出重叠） */
  .helix-stage[data-mode='spread'] { max-height: none; overflow: visible; }
}

/* 文件选择框：视觉上隐藏但仍能被 <label> 激活
   （手机上比 display:none 更可靠，系统也会给出「相册多选」） */
.neo-file-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}

/* ---------- 上传：模式切换（普通上传 / 混淆 / 解混淆） ---------- */

.tabs--sm { align-self: center; }
.tabs--sm .tab { min-width: 86px; padding: 0.36rem 0.9rem; font-size: 0.82rem; }

.neo-mode-pane { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.neo-mode-pane[hidden] { display: none; }

.neo-hint { font-size: 0.74rem; color: rgba(255, 255, 255, 0.42); line-height: 1.5; }

/* 处理前 / 处理后的勾选预览网格 */
.neo-preview-wrap { display: flex; flex-direction: column; gap: 10px; }
.neo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}
.neo-preview-card {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.18s ease;
}
.neo-preview-card:hover { transform: translateY(-2px); }
.neo-preview-card.is-selected { border-color: rgba(124, 140, 255, 0.75); }
.neo-preview-card img { display: block; width: 100%; height: 96px; object-fit: cover; }
.neo-preview-card input[type="checkbox"] {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  width: 17px;
  height: 17px;
  accent-color: #7c8cff;
  cursor: pointer;
}
.neo-preview-card .neo-preview-index {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.66rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* 处理 / 上传进度卡片 */
.neo-progress-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.neo-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.neo-progress-name { font-size: 0.85rem; font-weight: 600; }
.neo-progress-card.is-done { border-color: rgba(94, 234, 150, 0.35); }

/* ---------- 上传：拖拽区 ---------- */

.neo-upload { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 3.2rem 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}
.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--spin, 0deg), rgba(124, 140, 255, 0.9), rgba(255, 122, 217, 0.9), rgba(124, 226, 255, 0.9), rgba(124, 140, 255, 0.9));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: spin-border 6s linear infinite;
  pointer-events: none;
}
.dropzone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 120%, rgba(124, 140, 255, 0.28), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.dropzone:hover { background: rgba(255, 255, 255, 0.055); }
.dropzone:hover::before { opacity: 0.9; }
.dropzone[data-drag='true'] { transform: scale(1.015); background: rgba(124, 140, 255, 0.1); }
.dropzone[data-drag='true']::before { opacity: 1; animation-duration: 1.6s; }
.dropzone[data-drag='true']::after { opacity: 1; }

@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin-border { to { --spin: 360deg; } }

.drop-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 140, 255, 0.28), rgba(255, 122, 217, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}
.drop-orb::before,
.drop-orb::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  animation: ripple 2.8s ease-out infinite;
}
.drop-orb::after { animation-delay: 1.4s; }
.dropzone[data-drag='true'] .drop-orb { animation: bob 0.9s ease-in-out infinite; }

@keyframes ripple {
  0% { transform: scale(0.9); opacity: 0.65; }
  100% { transform: scale(1.55); opacity: 0; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.float-slow { animation: bob 3.4s ease-in-out infinite; }

.dropzone-title { font-size: 1rem; font-weight: 600; }
.dropzone-hint { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); }

/* ---------- 上传表单字段 ---------- */

.neo-fields { display: flex; flex-direction: column; gap: 14px; }
.neo-field { display: flex; flex-direction: column; gap: 6px; }
.neo-field label { font-size: 0.75rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.neo-input,
.neo-select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-fg);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.neo-input::placeholder { color: rgba(255, 255, 255, 0.32); }
.neo-input:focus,
.neo-select:focus { border-color: rgba(124, 140, 255, 0.6); background: rgba(255, 255, 255, 0.07); }
.neo-select option { background: #14141a; color: #fff; }

/* ---------- 上传队列 ---------- */

.queue-item {
  animation: slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.neo-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.neo-queue-item { display: flex; align-items: center; gap: 12px; padding: 12px; }

.progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2));
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55) 50%, transparent);
  animation: sweep 1.1s linear infinite;
}
.progress[data-done='true'] .progress-bar::after { animation: none; opacity: 0; }
@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.thumb-box {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.thumb-box img { width: 100%; height: 100%; object-fit: cover; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tick { stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.05s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.pop-in { animation: pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes pop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}

.mono-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.82);
}

.neo-queue-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.neo-pct { width: 42px; text-align: right; font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.neo-queue-name { font-size: 0.85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neo-queue-size { font-size: 0.72rem; color: rgba(255, 255, 255, 0.45); flex-shrink: 0; }
.neo-queue-body { min-width: 0; flex: 1; }
.neo-queue-err { color: #fcd34d; font-size: 0.72rem; }
.neo-queue-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 图片详情 ---------- */

.neo-detail { position: fixed; inset: 0; z-index: 60; background: rgba(6, 6, 9, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade-in 0.25s ease both; }
.imgpage { min-height: 100vh; display: flex; flex-direction: column; }
.imgpage-head { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; gap: 12px; padding: 12px 16px; }
.imgpage-head .neo-head-title { min-width: 0; flex: 1; text-align: center; }
.imgpage-head .neo-head-title p:first-child { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imgpage-head .neo-head-sub { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); flex-wrap: wrap; }
.imgpage-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; user-select: none; -webkit-user-select: none; }
.imgpage-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 200px);
  border-radius: 12px;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 34px 90px -42px rgba(0, 0, 0, 0.95);
}
.imgpage-actions { display: flex; align-items: stretch; gap: 10px; padding: 14px 16px 24px; }

.imgpage-actions .btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  height: 46px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0.04));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 14px 34px -16px rgba(0, 0, 0, 0.85),
    0 2px 8px -4px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.imgpage-actions .btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}
.imgpage-actions .btn:active { transform: scale(0.97); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 灯箱 / 提示 ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(4, 4, 6, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fade-in 0.25s ease both;
}
.backdrop-card { width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; padding: 24px; }
.backdrop-card h2 { font-size: 1.05rem; margin-bottom: 12px; }
.backdrop-card .body {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: pre-line;
  line-height: 1.7;
}
.backdrop-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}
.backdrop-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0c;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  animation: toast-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.toast.leaving { animation: toast-out 0.3s ease both; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* ---------- 页脚 ---------- */

.neo-footer {
  position: relative;
  z-index: 5;
  margin-top: 40px;
  padding: 28px max(16px, 3vw);
  border-top: 1px solid var(--color-line);
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.neo-footer-inner {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.neo-footer-copy { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.neo-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.neo-footer-links a { font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); transition: color 0.2s ease; }
.neo-footer-links a:hover { color: #fff; }
.neo-footer-note { max-width: 760px; font-size: 0.76rem; color: rgba(255, 255, 255, 0.34); }

/* ---------- 降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grid-plane__run, .dust__run, .wire, .scene-beam, .scene-glow::before, .scene-glow::after { animation: none; }
  .scene-beam { opacity: 0.5; }
}

/* ===========================================================
   手机端优化（≤720px）
   1) 输入框 ≥16px —— 否则 iOS Safari 一点输入框就自动放大整页
   2) 所有可点元素 ≥44px —— 手指点得准
   3) 芯片/信息字号放大到可读
   4) 平铺模式不再留一大片空白
   5) 刘海屏与底部横条安全区留白
   6) 去掉点按高亮与长按图片菜单
   =========================================================== */

@media (max-width: 720px) {
  /* 1) 输入框字号与高度 */
  .neo-input,
  .neo-select,
  .neo-search input,
  .neo-field input,
  .neo-field select,
  #neo-upload-title,
  #neo-process-key { font-size: 16px; }

  .neo-input, .neo-select { height: 48px; }
  .neo-search input { height: 42px; }

  /* 2) 点击区 */
  .neo-brand { display: inline-flex; align-items: center; min-height: 44px; }
  .neo-auth-link { height: 44px; padding: 0 16px; font-size: 0.9rem; }
  .tab { min-height: 44px; padding: 0.6rem 1.1rem; font-size: 0.95rem; }
  .tabs--sm .tab { min-height: 42px; }
  .btn { min-height: 44px; }
  .btn-sm { height: 44px; padding: 0 1rem; font-size: 0.86rem; }
  .helix-nav--left, .helix-nav--right { width: 46px; height: 46px; margin-top: -23px; }
  .helix-zoom-nav { width: 46px; height: 46px; margin-top: -23px; }
  .neo-footer-links { gap: 8px 14px; }
  .neo-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 6px;
    font-size: 0.84rem;
  }

  /* 3) 字号可读性 */
  .chip { font-size: 0.78rem; padding: 5px 10px; }
  .helix-info { gap: 6px; }
  .helix-zoom-meta { font-size: 0.8rem; }
  .helix-hint { font-size: 0.8rem; line-height: 1.5; }
  .neo-footer-note { font-size: 0.8rem; }

  /* 4) 平铺模式：贴近内容，不占满一屏空白 */
  .helix-stage[data-mode='spread'] {
    min-height: 0;
    padding: 12px 0;
  }
  .helix-space--spread { gap: 6px; }

  /* 5) 斜卡模式：舞台略降，首屏能露出信息条 */
  .helix-stage { height: min(58vh, 470px); }
  /* 手机屏幕矮：整块内容往上提，标题更靠上、首屏能多看到图片 */
  .neo-main { padding-top: 12px; }
  .neo-hero { margin-top: 0; margin-bottom: 12px; }
  .neo-hero h1 { font-size: clamp(1.85rem, 8.4vw, 2.5rem); }
  .neo-hero p { font-size: 0.9rem; margin-top: 8px; }

  /* 6) 安全区（刘海 / 底部横条） */
  .neo-header {
    padding-top: env(safe-area-inset-top);
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .neo-main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .neo-footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .helix-zoom {
    padding-top: calc(3rem + env(safe-area-inset-top));
    padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .helix-zoom-close { top: calc(0.85rem + env(safe-area-inset-top)); right: max(0.85rem, env(safe-area-inset-right)); }
  .helix-zoom-nav--prev { left: max(8px, env(safe-area-inset-left)); }
  .helix-zoom-nav--next { right: max(8px, env(safe-area-inset-right)); }

  /* 7) 点按体验：去掉默认高亮、长按图片菜单、避免误选文字 */
  .neo-header a, .neo-header button, .tab, .btn, .helix-card, .helix-nav,
  .helix-zoom-nav, .dropzone, .neo-footer-links a, .queue-item button {
    -webkit-tap-highlight-color: transparent;
  }
  .helix-card, .helix-nav, .dropzone, .helix-zoom-img { -webkit-touch-callout: none; }
  .dropzone, .neo-queue-item, .helix-zoom-bar { user-select: none; -webkit-user-select: none; }
}

