.card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 20px 0;
  max-width: 1024px;
  width: 100%;
  animation: cardFadeIn 0.3s ease-out;
  border-bottom: 1px solid var(--color-border-soft);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}

.refColumn {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.headerRight {
  flex: 1;
  min-width: 0;
}

/* Reference thumbnails row (legacy) */
.refRow {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.refThumb {
  height: 56px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-dropdown-elevated);
  flex-shrink: 0;
  border: 1px solid var(--color-border-modal);
}

.audioThumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
}

.refMedia {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prompt with tooltip */
.promptWrapper {
  position: relative;
}

.promptLine {
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.6;
  word-break: break-word;
  max-height: calc(1.6em * 2);
  overflow: hidden;
}

/* hover 展开 prompt 面板 — V2 玻璃面 */
.promptExpanded {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  font-size: 14px;
  color: var(--color-text-primary);
  line-height: 1.6;
  word-break: break-word;
  background: var(--color-bg-glass-strong);
  backdrop-filter: var(--bf-glass-sm);
  -webkit-backdrop-filter: var(--bf-glass-sm);
  border: 1px solid var(--color-border-card);
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow:
    0 8px 24px var(--color-shadow-dropdown),
    inset 0 1px 0 var(--color-inset-highlight);
}

.mentionTag {
  display: inline;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--color-mention-bg);
  color: var(--color-mention-text);
  font-size: 13px;
  white-space: nowrap;
  cursor: default;
}

.mentionPreview {
  position: fixed;
  z-index: 9999;
  transform: translate(-50%, -100%);
  background: var(--color-bg-modal-hover);
  border: 1px solid var(--color-border-modal);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 24px var(--color-overlay-soft);
  pointer-events: none;
}

.mentionPreviewImg {
  display: block;
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.mentionPreviewLabel {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 11px;
  margin-top: 4px;
}


/* Inline labels after prompt text */
.labelsInline {
  display: inline;
  margin-left: 6px;
  white-space: nowrap;
}


.label {
  display: inline-flex;
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 1px 6px;
  background: var(--color-bg-card);
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Detail info link + tooltip */
.detailLink {
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: default;
  margin-left: 6px;
  position: relative;
  vertical-align: middle;
}

.detailTooltip {
  position: fixed;
  z-index: 1000;
  background: var(--color-bg-glass-strong);
  backdrop-filter: var(--bf-glass-sm);
  -webkit-backdrop-filter: var(--bf-glass-sm);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  padding: 12px 20px;
  min-width: 260px;
  /* V2 玻璃面 — 阴影 + 顶边白高光 */
  box-shadow:
    0 8px 24px var(--color-shadow-dropdown),
    inset 0 1px 0 var(--color-inset-highlight);
  animation: detailTooltipFadeIn 0.15s ease-out;
}

@keyframes detailTooltipFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.detailRow {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0;
  font-size: 13px;
  white-space: nowrap;
}

.detailRow span:first-child {
  color: var(--color-text-secondary);
}

.detailRow span:last-child {
  color: var(--color-text-primary);
}

/* Content */
.content {
  margin-bottom: 8px;
}

/* Result area */
.resultArea {
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-overlay-medium);
  aspect-ratio: 16 / 9;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.resultMedia {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Video hover overlay with download */
.videoOverlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px;
  animation: overlayFadeIn 0.15s ease-out;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.downloadBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-bg-on-media);
  backdrop-filter: blur(4px);
  border: 1px solid var(--color-progress-track);
  color: var(--color-on-overlay);
  cursor: pointer;
  transition: background 0.15s;
}

.downloadBtn:hover {
  background: var(--color-bg-on-media-hover);
}

.resultPlaceholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 40px;
}

/* Generating state — shimmer background */
.shimmerBg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    var(--color-shimmer-purple-soft) 0%,
    var(--color-shimmer-purple-mid) 40%,
    var(--color-shimmer-purple-2-mid) 50%,
    var(--color-shimmer-purple-mid) 60%,
    var(--color-shimmer-purple-soft) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s ease-in-out infinite;
  z-index: 0;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 40px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.loadingSpinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--color-mention-bg-active);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loadingText {
  font-size: 13px;
  color: var(--color-text-secondary);
  letter-spacing: 0.5px;
}

.progressBar {
  width: 100%;
  max-width: 200px;
  height: 3px;
  background: var(--color-bg-card);
  border-radius: 2px;
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-2));
  border-radius: 2px;
  transition: width 1.5s ease-out;
}

.progressText {
  font-size: 11px;
  color: var(--color-text-disabled);
}

/* Failed state — no video box, just text */
.errorText {
  color: var(--color-danger);
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 0;
}

/* Action buttons */
.actions {
  display: flex;
  gap: 8px;
}

.actionBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  background: var(--color-bg-upload);
  border: 1px solid var(--color-border-upload);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.actionBtn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.deleteBtn:hover {
  color: var(--color-danger-hover);
  border-color: var(--color-danger-hover-border);
  background: var(--color-danger-hover-bg);
}

/* More menu */
.moreMenu {
  position: relative;
  margin-left: auto;
}
.moreBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  color: var(--color-text-disabled);
  background: var(--color-bg-upload);
  border: 1px solid var(--color-border-upload);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.moreBtn:hover {
  color: var(--color-text-secondary);
  background: var(--color-bg-hover);
  border-color: var(--color-border-glass-hover);
}
.moreDropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--color-bg-glass-strong);
  backdrop-filter: var(--bf-glass-md);
  -webkit-backdrop-filter: var(--bf-glass-md);
  border: 1px solid var(--color-border-card);
  border-radius: 10px;
  padding: 4px;
  min-width: 100px;
  z-index: 10;
  /* V2 玻璃面 — 阴影 + 顶边白高光 */
  box-shadow:
    0 8px 24px var(--color-shadow-dropdown),
    inset 0 1px 0 var(--color-inset-highlight-strong);
  animation: dropdownFadeIn 0.12s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.moreDropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--color-danger-hover);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
  transition: background 0.12s;
}
.moreDropdown button:hover {
  background: var(--color-danger-hover-bg-strong);
}

