/**
 * AI 生成内容标识样式
 * 纯前端展示，不修改图片本身，下载时无此标识
 */

/* 图片右上角标识（避免与左上角 UI 返回按钮、标签冲突） */
.ai-gen-image-label {
    position: absolute;
    top: 8px;
    right: 8px;
    left: auto;
    /* 100：高于封面图本身与卡片内的其它标签（.rec-type-label / .rec-heat /
       .rec-cover-summary 均为 2）；移动端的固定头部是 999，不受影响。
       注意 PC 端：吸顶页面头部原先也是 100，同值时按 DOM 顺序绘制，
       头部先渲染、卡片后渲染 → 标签会压住头部。该问题已在 index.html 的
       「PC 端内容布局统一层」内用 body.pc-mode 前缀单独下调为 11，
       本文件保持原值不动，移动端零影响。 */
    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-type-label）下方，降低背景更沉浸。
   【间距修正】分类标签位于 top:8px、padding 3px + font-size 10px × line-height 1.2，
   实际高度 18px，即底边在 26px（阴影视觉溢出约 1px）。
   原值 22px（small）/ 26px 会与红框直接压在一起，故下移到 32px，留出约 6px 间隙。 */
.rec-cover-wrap .ai-gen-image-label {
    top: 32px;
    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;
}

/* small 变体与上面保持同一 top，避免两种尺寸在同一列表里错位 */
.rec-cover-wrap .ai-gen-image-label.small {
    top: 32px;
    left: 8px;
    font-size: 8px;
    padding: 1px 3px;
}
