/* ============================================================
   影像实验室 VDLAB — 深色科技感主题
   ============================================================ */

:root {
  --bg: #05070c;
  --bg-soft: #080b13;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #e9eef7;
  --text-dim: #a7b3c6;
  --muted: #767f92;
  --cyan: #35e0f2;
  --violet: #8b7cff;
  --grad: linear-gradient(115deg, var(--cyan), var(--violet));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .85);
  --ease: cubic-bezier(.22, .68, .16, 1);
  --colw: 320px;
  --gap: 22px;
  --shell: 1560px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

::selection { background: rgba(53, 224, 242, .28); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05070c; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(53,224,242,.35), rgba(139,124,255,.35));
  border-radius: 20px;
  border: 2px solid #05070c;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(53,224,242,.6), rgba(139,124,255,.6)); }

/* ------------------------------ 背景 ------------------------------ */

.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.backdrop__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  opacity: .85;
}

.backdrop__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.backdrop__glow--a {
  width: 720px; height: 720px; top: -280px; left: -140px;
  background: radial-gradient(circle, rgba(53,224,242,.32), transparent 68%);
}
.backdrop__glow--b {
  width: 760px; height: 760px; top: -180px; right: -220px;
  background: radial-gradient(circle, rgba(139,124,255,.28), transparent 68%);
}

.backdrop__scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.014) 0 1px, transparent 1px 3px);
  opacity: .6;
}

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

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(18px, 4vw, 46px);
  background: rgba(5, 7, 12, .55);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.topbar.is-stuck {
  background: rgba(5, 7, 12, .86);
  border-bottom-color: var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand__mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; color: var(--cyan);
  background: linear-gradient(150deg, rgba(53,224,242,.16), rgba(139,124,255,.12));
  border: 1px solid rgba(53, 224, 242, .28);
  box-shadow: inset 0 0 20px rgba(53,224,242,.12), 0 6px 20px -8px rgba(53,224,242,.6);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16px; letter-spacing: .06em; font-weight: 650; }
.brand__text em {
  font-style: normal; font-size: 11px; letter-spacing: .34em;
  color: var(--muted); font-weight: 500;
}

.topbar__meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 0 rgba(53,224,242,.6);
  animation: ping 2.4s infinite;
}
.dot.is-off { background: #f0a13c; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(53,224,242,.55); }
  70% { box-shadow: 0 0 0 9px rgba(53,224,242,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,224,242,0); }
}
.topbar__domain {
  font-size: 12.5px; letter-spacing: .12em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.btn-refresh {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--text-dim);
  border: 1px solid var(--line);
  font-size: 13px; font-family: inherit;
  transition: all .25s var(--ease);
}
.btn-refresh svg { width: 15px; height: 15px; }
.btn-refresh:hover {
  color: #fff; border-color: rgba(53,224,242,.5); background: rgba(53,224,242,.1);
  box-shadow: 0 0 22px -6px rgba(53,224,242,.55);
}
.btn-refresh.is-busy { pointer-events: none; opacity: .6; }
.btn-refresh.is-busy svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .topbar__meta { display: none; }
  .btn-refresh span { display: none; }
  .btn-refresh { padding: 9px; }
}

/* ------------------------------ 主体 ------------------------------ */

.shell {
  position: relative; z-index: 1;
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(46px, 8vw, 96px) clamp(18px, 4vw, 46px) 80px;
}

/* 首屏 */
.hero { max-width: 900px; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(53, 224, 242, .07);
  border: 1px solid rgba(53, 224, 242, .22);
  font-size: 11.5px; letter-spacing: .16em; color: #9fe9f3;
  text-transform: uppercase;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  animation: blink 1.8s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.hero__title {
  margin: 26px 0 0;
  font-size: clamp(38px, 7.2vw, 84px);
  line-height: 1.02; letter-spacing: -.02em; font-weight: 700;
  background: linear-gradient(180deg, #ffffff 10%, #b9c6da 62%, rgba(185,198,218,.55) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__intro {
  margin-top: 22px; max-width: 660px;
  color: var(--text-dim); font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.85; white-space: pre-wrap;
}
.hero__intro p { margin: 0 0 .7em; }
.hero__intro p:last-child { margin-bottom: 0; }

/* 业务范围标签 */
.scope {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0; padding: 0; list-style: none;
}
.scope li {
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; letter-spacing: .02em; color: #cfe0ea;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid rgba(53, 224, 242, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  white-space: nowrap;
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}
.scope li:hover {
  border-color: rgba(53, 224, 242, .55);
  color: #ffffff;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .scope li { font-size: 12px; padding: 6px 11px; }
}

.stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 34px 0 0; padding: 0;
}
.stats__item {
  flex: 1 1 150px; min-width: 132px;
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.stats__item::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53,224,242,.55), transparent);
}
.stats__item dt { font-size: 11.5px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.stats__item dd {
  margin: 6px 0 0; font-size: clamp(20px, 2.4vw, 27px); font-weight: 650;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__hint {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px; font-size: 13px; color: var(--muted);
}
.hero__hint svg { width: 16px; height: 16px; color: rgba(53,224,242,.75); }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: clamp(48px, 6vw, 74px) 0 26px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.toolbar[hidden] { display: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line);
  font-size: 13px; font-family: inherit;
  transition: all .22s var(--ease);
}
.chip span { opacity: .6; font-variant-numeric: tabular-nums; margin-left: 3px; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active {
  color: #041016; font-weight: 600;
  background: var(--grad); border-color: transparent;
  box-shadow: 0 8px 24px -10px rgba(53,224,242,.9);
}
.chip.is-active span { opacity: .75; }

.toolbar__right { margin-left: auto; }
.sort { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.sort select {
  appearance: none; -webkit-appearance: none;
  padding: 8px 32px 8px 13px; border-radius: 999px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767f92' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center/14px;
  border: 1px solid var(--line); color: var(--text-dim);
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: all .22s var(--ease);
}
.sort select:hover { border-color: var(--line-2); color: #fff; }

/* ------------------------------ 瀑布流 ------------------------------ */

.wall { position: relative; width: 100%; min-height: 40vh; }

.tile {
  position: absolute; top: 0; left: 0;
  width: var(--colw);
  transition: transform .55s var(--ease), opacity .5s ease;
  will-change: transform;
}
.tile.is-out { opacity: 0; pointer-events: none; }
.tile.is-hidden { display: none; }

.tile__inner {
  position: relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease),
              border-color .35s var(--ease), box-shadow .45s var(--ease);
}
.tile.is-in .tile__inner { opacity: 1; transform: translateY(0); }

.tile__inner::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(53,224,242,.85), rgba(139,124,255,.5) 55%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
}
.tile__inner:hover {
  transform: translateY(-7px);
  border-color: transparent;
  box-shadow: 0 30px 60px -26px rgba(0,0,0,.95), 0 0 44px -18px rgba(53,224,242,.55);
}
.tile__inner:hover::after { opacity: 1; }
.tile__inner:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.tile__media {
  position: relative; width: 100%;
  background: linear-gradient(140deg, #101725, #0a0e17);
  overflow: hidden;
}
.tile__media img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; background: transparent;
  transition: transform 1.1s var(--ease), opacity .5s ease;
  opacity: 0;
}
.tile__media img.is-ready { opacity: 1; }
.tile__inner:hover .tile__media img { transform: scale(1.055); }

.tile__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(3,5,10,.86) 0%, rgba(3,5,10,.28) 32%, rgba(3,5,10,0) 58%);
  opacity: .9; transition: opacity .35s var(--ease);
}
.tile__inner:hover .tile__scrim { opacity: 1; }

.tile__play {
  position: absolute; left: 50%; top: 50%;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(5,10,16,.5); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; transform: scale(.7); opacity: 0;
  transition: all .4s var(--ease);
}
.tile__play svg { width: 22px; height: 22px; margin-left: 2px; }
.tile__inner:hover .tile__play { transform: scale(1); opacity: 1; }

.tile__corner {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 7px;
  background: rgba(4,7,13,.62); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 11px; letter-spacing: .08em; color: #dbe5f2;
  font-variant-numeric: tabular-nums;
}
.tile__corner i {
  font-style: normal; width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
.tile__corner.is-portrait i { background: var(--violet); box-shadow: 0 0 8px var(--violet); }

.tile__dur {
  position: absolute; right: 12px; bottom: 12px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(4,7,13,.7); border: 1px solid rgba(255,255,255,.12);
  font-size: 11.5px; color: #e6edf7; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

.tile__body { padding: 16px 18px 18px; }
.tile__title {
  margin: 0; font-size: 15.5px; font-weight: 620; letter-spacing: -.005em;
  color: #f2f6fb; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__desc {
  margin: 8px 0 0; font-size: 13px; line-height: 1.68; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.tile__meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07);
}
.tile__meta span {
  font-size: 11px; color: #6d7789; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.tile__meta span + span::before {
  content: "·"; margin: 0 7px 0 1px; color: rgba(255,255,255,.18);
}

/* 骨架屏 */
.tile.is-skeleton .tile__media {
  background: linear-gradient(100deg, #0d121c 20%, #151d2b 40%, #0d121c 60%);
  background-size: 250% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }
.tile.is-skeleton .tile__inner { opacity: 1; transform: none; }

/* 提示条 */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 26px; padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(240, 161, 60, .09);
  border: 1px solid rgba(240, 161, 60, .32);
  color: #f2d3a4; font-size: 13.5px; line-height: 1.65;
}
.notice[hidden] { display: none; }
.notice__icon {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(240, 161, 60, .22); color: #ffce85;
  font-size: 12px; font-weight: 700;
}
.notice__text { flex: 1; }
.notice__text code {
  padding: 1px 6px; border-radius: 5px; font-size: 12.5px;
  background: rgba(240, 161, 60, .16); border: 1px solid rgba(240, 161, 60, .28);
}
.notice__close {
  flex: none; background: none; border: 0; cursor: pointer;
  color: #f2d3a4; font-size: 18px; line-height: 1; opacity: .6; padding: 0 2px;
}
.notice__close:hover { opacity: 1; }

/* 空状态 */
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty[hidden] { display: none; }
.empty__icon { color: rgba(53,224,242,.55); margin-bottom: 18px; }
.empty__icon svg { width: 54px; height: 54px; }
.empty h3 { margin: 0 0 10px; font-size: 19px; color: var(--text); font-weight: 600; }
.empty p { margin: 0; font-size: 14px; }
.empty code {
  padding: 2px 7px; border-radius: 5px; background: rgba(53,224,242,.1);
  border: 1px solid rgba(53,224,242,.22); color: #9fe9f3; font-size: 13px;
}

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

.foot { position: relative; z-index: 1; padding: 0 clamp(18px, 4vw, 46px) 54px; max-width: var(--shell); margin: 0 auto; }
.foot__line { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }
.foot__inner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding-top: 22px; font-size: 12.5px; color: #5f6a7d;
}
.foot__sep { opacity: .35; }
.foot__src { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; opacity: .8; }

/* ------------------------------ 播放器 ------------------------------ */

.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox__bg {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, .9);
  backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%);
  animation: fadeIn .28s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }

.lightbox__stage {
  position: relative; z-index: 2;
  width: min(1240px, 94vw);
  display: flex; flex-direction: column; gap: 16px;
  animation: popIn .34s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.player {
  position: relative; align-self: center;
  background: #000; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 50px 110px -30px rgba(0,0,0,.95), 0 0 60px -30px rgba(53,224,242,.5);
}
.player video { display: block; width: 100%; height: 100%; background: #000; }
.player__spinner {
  position: absolute; inset: 0; margin: auto;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.16); border-top-color: var(--cyan);
  animation: spin .8s linear infinite; opacity: 0; transition: opacity .25s;
}
.player.is-loading .player__spinner { opacity: 1; }

.lightbox__info { max-width: 860px; }
.lightbox__head { display: flex; align-items: baseline; gap: 14px; }
.lightbox__head h2 {
  margin: 0; font-size: clamp(18px, 2.4vw, 24px); font-weight: 640; letter-spacing: -.01em;
}
.lightbox__index {
  margin-left: auto; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: .1em;
}
.lightbox__info p {
  margin: 9px 0 0; font-size: 14px; line-height: 1.75; color: var(--text-dim);
  white-space: pre-wrap; max-height: 5.4em; overflow: auto;
}
.lightbox__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  padding: 5px 11px; border-radius: 7px; font-size: 11.5px; color: var(--text-dim);
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

.lightbox__close, .lightbox__nav {
  position: absolute; z-index: 3; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(10, 14, 22, .72); border: 1px solid var(--line);
  color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: all .25s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover {
  background: rgba(53,224,242,.16); border-color: rgba(53,224,242,.5);
  box-shadow: 0 0 26px -8px rgba(53,224,242,.8);
}
.lightbox__close { top: 22px; right: 22px; width: 42px; height: 42px; }
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__nav { top: 50%; margin-top: -26px; width: 52px; height: 52px; }
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__nav--prev { left: max(14px, 2vw); }
.lightbox__nav--next { right: max(14px, 2vw); }
.lightbox__nav:disabled { opacity: .3; pointer-events: none; }

@media (max-width: 860px) {
  .lightbox__nav { width: 44px; height: 44px; margin-top: -22px; }
  .lightbox__stage { gap: 12px; }
}

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 560px) {
  .stats__item { flex: 1 1 100%; }
  .toolbar { gap: 12px; }
  .toolbar__right { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
