/* ================= AI 影像页 ================= */
.page-videos .section { padding-top: calc(var(--nav-h) + 40px); }

/* —— 顶部大图 —— */
.vid-feature { margin-bottom: 34px; }
.vid-feature-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 30px 80px -40px rgb(10 30 80 / .55); padding: 0; cursor: pointer; text-align: left; color: #fff; font: inherit; }
.vid-feature-media .vid-thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.vid-feature-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 40%, rgb(0 4 16 / .78)); pointer-events: none; }
.vid-feature-text { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 3vw, 34px); display: grid; gap: 6px; }
.vid-feature-text h3 { font-size: clamp(22px, 3.2vw, 38px); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.vid-feature-text p { color: rgb(255 255 255 / .82); max-width: 62ch; font-size: 15px; }
.vid-feature-text .vid-meta { color: rgb(255 255 255 / .66); }
.vid-badge { justify-self: start; font-size: 11.5px; letter-spacing: .14em; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* —— 播放按钮：玻璃圆 —— */
.vid-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .3); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 12px 30px rgb(0 0 0 / .3); transition: transform .25s var(--ease-out), background .25s var(--ease); }
.vid-play svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }
.vid-play.sm { width: 52px; height: 52px; margin: -26px 0 0 -26px; opacity: 0; transform: scale(.9); transition: opacity .2s var(--ease-out), transform .25s var(--ease-out); }
.vid-play.sm svg { width: 22px; height: 22px; margin-left: 3px; }

/* —— 筛选条 —— */
.vid-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.vid-bar .chips { max-width: 100%; }
.vid-bar .chips[hidden] { display: none; }
.vid-count { font-size: 13px; color: var(--text-3); white-space: nowrap; margin-left: auto; }

/* —— 卡片网格 —— */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.vid-card { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .25s var(--ease), box-shadow .3s var(--ease), transform .16s var(--ease-out); }
.vid-card[hidden] { display: none; }
.vid-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #02060f; }
.vid-thumb img, .vid-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease-out); }
.vid-dur { position: absolute; right: 10px; bottom: 10px; font-size: 12px; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; color: #fff; background: rgb(0 0 0 / .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vid-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.vid-body h3 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.vid-body p { font-size: 13.5px; color: var(--text-2); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.vid-meta .dot { margin: 0 6px; opacity: .6; }

@media (hover: hover) and (pointer: fine) {
  .vid-card:hover { border-color: var(--line-2); box-shadow: 0 24px 50px -30px rgb(10 30 80 / .45); }
  .vid-card:hover .vid-thumb img, .vid-card:hover .vid-thumb video, .vid-feature-media:hover .vid-thumb img, .vid-feature-media:hover .vid-thumb video { transform: scale(1.03); }
  .vid-card:hover .vid-play.sm { opacity: 1; transform: none; }
  .vid-feature-media:hover .vid-play { transform: scale(1.06); background: rgb(255 255 255 / .24); }
}

/* —— 还没有视频：极光占位 —— */
.vid-empty { cursor: default; display: grid; place-items: center; color: var(--text); background: #030a1c; }
.vid-aurora { position: absolute; inset: -20%; background:
  radial-gradient(40% 50% at 30% 40%, rgb(46 103 177 / .7), transparent 70%),
  radial-gradient(35% 45% at 70% 60%, rgb(77 139 255 / .55), transparent 70%),
  radial-gradient(30% 40% at 55% 30%, rgb(110 200 255 / .35), transparent 70%);
  filter: blur(30px); animation: vidAurora 16s var(--ease-in-out) infinite alternate; }
@keyframes vidAurora { from { transform: translate3d(-4%, -2%, 0) rotate(0deg); } to { transform: translate3d(4%, 3%, 0) rotate(8deg); } }
.vid-empty-inner { position: relative; text-align: center; color: #fff; display: grid; gap: 8px; justify-items: center; padding: 20px; }
.vid-empty-inner h3 { font-size: clamp(20px, 2.6vw, 30px); font-weight: 600; letter-spacing: -.005em; }
.vid-empty-inner p { color: rgb(255 255 255 / .7); font-size: 14px; }
.vid-empty-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.vid-empty-icon svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
:root[data-theme="light"] .vid-empty { background: #0b1c3f; }

.vid-card.is-placeholder { cursor: default; }
.vid-card.is-placeholder .vid-body h3 { color: var(--text-2); }
.vid-shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(var(--ink), .03) 30%, rgba(var(--ink), .08) 50%, rgba(var(--ink), .03) 70%); background-size: 220% 100%; animation: vidShimmer 2.4s linear infinite; animation-delay: calc(var(--i, 0) * .2s); }
:root[data-theme="light"] .vid-card.is-placeholder .vid-thumb { background: #eef3fb; }
@keyframes vidShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* —— 播放器弹层 —— */
.vid-modal { position: fixed; inset: 0; z-index: 1200; display: none; place-items: center; padding: 16px; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; background: transparent; color: inherit; }
.vid-modal[open] { display: grid; }
.vid-modal::backdrop { background: transparent; }
.vid-modal[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
.vid-modal-backdrop { position: absolute; inset: 0; background: rgb(0 2 8 / .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s var(--ease-out); }
.vid-modal.open .vid-modal-backdrop { opacity: 1; }
.vid-modal:not(.open) .vid-modal-backdrop { transition-duration: .2s; }
.vid-modal-panel { position: relative; width: min(1100px, 100%); max-height: calc(100vh - 32px); border-radius: 22px; overflow: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 40px 120px -30px rgb(0 0 0 / .7); transform-origin: 0 0; }
.vid-player { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 160px); background: #000; }
.vid-player video, .vid-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.vid-modal-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px 18px; }
.vid-modal-info h3 { font-size: 18px; font-weight: 600; }
.vid-modal-info p { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.vid-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.vid-tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.vid-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); background: rgb(0 0 0 / .45); color: #fff; font-size: 14px; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 2; }
body.vid-open { overflow: hidden; }

@media (max-width: 760px) {
  .page-videos .section { padding-top: calc(var(--nav-h) + 20px); }
  .vid-feature-media { border-radius: 18px; }
  .vid-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .vid-feature-text p { display: none; }
  .vid-grid { grid-template-columns: 1fr; gap: 14px; }
  .vid-modal { padding: 0; place-items: end stretch; }
  .vid-modal-panel { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .vid-modal-info { flex-direction: column; }
  .vid-tags { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .vid-aurora, .vid-shimmer { animation: none; }
  .vid-thumb img, .vid-thumb video { transition: none; }
  .vid-modal-backdrop { transition: none; }
}
