/* AI 生成结果媒体组件（模型广场 / Skills 共用）：图片卡片、视频卡片、视频查看器 */

.ai-chat-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.ai-chat-assets img {
  height: 182px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  cursor: zoom-in;
  background: #e5e9f2;
}

.ai-chat-assets video {
  height: 182px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
}

.ai-chat-video {
  position: relative;
  margin: 0;
  display: inline-block;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  line-height: 0;
}

.ai-chat-video video {
  display: block;
  height: 182px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: none;
}

.ai-chat-video-chrome {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1;
}

.ai-chat-video-duration {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.ai-chat-video-duration[hidden] {
  display: none !important;
}

.ai-chat-video-play {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(2px);
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}

.ai-chat-video-play svg {
  width: 14px;
  height: 14px;
  display: block;
}

.ai-chat-video:hover .ai-chat-video-chrome,
.ai-chat-video.is-playing .ai-chat-video-chrome {
  opacity: 0;
}

.ai-chat-video-btn {
  position: absolute;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.ai-chat-video-btn svg {
  width: 15px;
  height: 15px;
}

.ai-chat-video-btn:hover {
  background: rgba(15, 23, 42, 0.78);
}

.ai-chat-video-dl {
  left: auto;
  right: 46px;
}

.ai-chat-video-fs {
  right: 8px;
}

.ai-chat-video:hover .ai-chat-video-btn {
  opacity: 1;
}

.ai-chat-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-video-lightbox[hidden] {
  display: none !important;
}

.ai-chat-video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
}

.ai-chat-video-lightbox-body {
  position: relative;
  width: min(92vw, 56rem);
  height: min(88vh, 36rem);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
  background: #000;
  z-index: 1;
}

.ai-chat-video-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.ai-chat-video-lightbox-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.ai-chat-video-lightbox-player::-webkit-media-controls-enclosure {
  bottom: var(--ai-mark-controls-lift, 0px) !important;
}

.ai-chat-video-lightbox-body:fullscreen,
.ai-chat-video-lightbox-body:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
}

.ai-chat-video-lightbox-player::-webkit-media-controls-download-button {
  display: none !important;
}

.ai-chat-video-lightbox-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 2;
}

.ai-chat-video-lightbox-btn {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.ai-chat-video-lightbox-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.ai-chat-video-lightbox-btn:hover {
  background: rgba(37, 99, 235, 0.85);
}

.ai-chat-video-lightbox-lock {
  overflow: hidden;
}

.ai-chat-video-lightbox-stage > .ai-gen-mark {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  padding: 0.22em;
}

.ai-chat-asset .ai-gen-mark,
.ai-chat-video .ai-gen-mark {
  top: auto;
  bottom: 8px;
  left: 8px;
}

.ai-chat-asset {
  position: relative;
  margin: 0;
  cursor: zoom-in;
}

.ai-chat-asset img {
  display: block;
}

.ai-chat-asset-view {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(15, 32, 51, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.ai-chat-asset-view svg {
  width: 16px;
  height: 16px;
}

.ai-chat-asset:hover .ai-chat-asset-view {
  opacity: 1;
}

@media (max-width: 768px) {
  .ai-chat-assets img,
  .ai-chat-assets video,
  .ai-chat-video video {
    height: 151px;
  }
}
