/**
 * AI 生成内容标识样式
 * 纯前端展示，不修改图片本身，下载时无此标识
 */

/* 图片右上角标识（避免与左上角 UI 返回按钮、标签冲突） */
.ai-gen-image-label {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.8);
    color: rgba(0, 0, 0, 0.7);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 500;
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* 小尺寸图片上的标识 */
.ai-gen-image-label.small {
    top: 4px;
    right: 4px;
    left: auto;
    padding: 1px 4px;
    font-size: 9px;
    border-radius: 3px;
}

/* 文字块标识 */
.ai-gen-text-label {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    background-color: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.45);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 400;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* 包装器：给图片容器加相对定位 */
.ai-gen-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.ai-gen-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
}

/* 固定比例小图列表里的标识 */
.ai-gen-image-wrapper.square .ai-gen-image-label,
.ai-gen-image-wrapper.portrait .ai-gen-image-label {
    top: 4px;
    right: 4px;
    left: auto;
    font-size: 9px;
    padding: 1px 4px;
}

/* 深色背景上的反色标识 */
.ai-gen-image-label.on-dark {
    background-color: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.9);
}

/* 聊天页底部 AI 声明 */
.chat-ai-notice {
    text-align: center;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.4);
    padding: 4px 0 2px;
    line-height: 1.4;
}

.chat-theme-dark .chat-ai-notice,
[class*="chat-theme-"] .chat-ai-notice {
    color: rgba(255, 255, 255, 0.55);
}

/* 角色详情页沉浸式 Hero 右侧竖版 AI 标识 */
.cd-hero {
    position: relative;
}

.cd-hero-ai-label {
    position: absolute;
    right: 14px;
    top: 52%;
    z-index: 50;
    writing-mode: vertical-rl;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    user-select: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* 奇遇结果弹窗 AI 标识：避开右上角关闭按钮 */
.cd-play-story-overlay .ai-gen-image-label {
    top: 46px;
    right: 12px;
}

/* 角色详情页 AI 生成立绘容器定位 */
.cd-hero-bg-wrap,
.cd-album-main-wrap,
.cd-album-fan-item,
.cd-play-album-item,
.cd-play-flip-card,
.cd-play-preview-frame,
.cd-play-story-overlay,
/* 世界详情页地图 */
.wd-map-col,
.wd-map-detail-wrap,
/* 发现页卡片 */
.rec-cover-wrap,
/* 故事列表页封面 */
.ws-story-cover,
.cs-story-cover-wrap {
    position: relative;
}

/* 发现页信息流卡片 AI 标识：放到左上角分类标签下方，降低背景更沉浸 */
.rec-cover-wrap .ai-gen-image-label {
    top: 26px;
    right: auto;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.32);
    color: rgba(255, 255, 255, 0.82);
    font-size: 9px;
    padding: 1px 4px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.rec-cover-wrap .ai-gen-image-label.small {
    top: 22px;
    left: 6px;
    font-size: 8px;
    padding: 1px 3px;
}
