/* ============================================================
   作品详情页 — Dark Premium 风格（与首页统一）
   ============================================================ */
:root {
  --bg: #060a1c;
  --bg-2: #0a1130;
  --surface: rgba(120, 150, 255, 0.05);
  --border: rgba(150, 180, 255, 0.12);
  --border-str: rgba(150, 180, 255, 0.24);
  --text: #eef2ff;
  --text-40: rgba(214, 224, 255, 0.42);
  --grad: linear-gradient(120deg, #8b5cff, #4d8cff 55%, #38d6ff);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* 兼容历史 dark 主题缓存 */
.dark body, body.dark { background: var(--bg); color: var(--text); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(124, 92, 255, .4); color: #fff; }

/* 背景辉光 — 深邃蓝调氛围 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -8%, #1a2c66 0%, #0d1640 32%, #060a1c 70%),
    radial-gradient(40vw 40vw at 12% -4%, rgba(124,92,255,.26), transparent 70%),
    radial-gradient(40vw 40vw at 92% 6%, rgba(56,140,255,.22), transparent 70%);
}

/* 返回按钮 */
.back-btn {
  position: fixed; top: 22px; left: 22px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; font-size: 13px; font-weight: 600; color: var(--text);
  background: rgba(10,17,48,.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .2s, transform .2s, background .2s;
}
.back-btn:hover { border-color: var(--border-str); transform: translateX(-3px); background: rgba(10,17,48,.85); }
.back-btn svg { width: 15px; height: 15px; }

/* 主内容 */
main.work-main { max-width: 1100px; margin: 0 auto; padding: 100px 20px 64px; }
@media (min-width: 640px) { main.work-main { padding-inline: 32px; } }

.gallery-img {
  border-radius: 16px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--border);
  transition: transform .4s var(--ease), box-shadow .4s ease, border-color .3s;
}
.gallery-img:hover { transform: translateY(-5px); box-shadow: 0 40px 90px rgba(0,0,0,.6); border-color: var(--border-str); }
.gallery-img img { width: 100%; }

/* 下一个项目 */
.work-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.work-footer-link {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 52px 20px; transition: padding-left .3s var(--ease);
}
.work-footer-link:hover { padding-left: 40px; }
@media (min-width: 640px) { .work-footer-link { padding-inline: 32px; } }
.work-footer-eyebrow {
  margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.work-footer-title { margin: 12px 0 0; font-size: clamp(22px, 3vw, 34px); font-weight: 800; letter-spacing: -.02em; }
.work-footer-arrow { width: 30px; height: 30px; color: var(--text-40); flex-shrink: 0; transition: transform .3s var(--ease), color .2s; }
.work-footer-link:hover .work-footer-arrow { transform: translateX(8px); color: #7cc8ff; }

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,9,24,.95);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; cursor: zoom-out;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; transform: scale(.96); transition: transform .35s var(--ease); }
.lightbox.active img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 22px; right: 22px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border-str); background: rgba(255,255,255,.08); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.18); }
.lightbox-close svg { width: 18px; height: 18px; }
