:root {
    --mode-switcher-offset: 16px;
    --history-visible-count: 8;
    --history-item-size: 58px;
    --history-item-gap: 16px;
    --history-list-padding: 12px;
    --history-extra-space: 96px; /* 58px 新建按钮 + 上下内边距余量 */
    --input-area-fixed-height: 0px;
    --history-sidebar-max-height: calc(
        var(--history-visible-count) * var(--history-item-size) +
        (var(--history-visible-count) - 1) * var(--history-item-gap) +
        2 * var(--history-list-padding) +
        var(--history-extra-space)
    );
}

@media (max-width: 768px) {
    :root {
        --mode-switcher-offset: 14px;
        --history-item-size: 96px;
        --history-item-gap: 18px;
        --history-extra-space: 120px;
        --history-sidebar-max-height: calc(
            var(--history-visible-count) * var(--history-item-size) +
            (var(--history-visible-count) - 1) * var(--history-item-gap) +
            2 * var(--history-list-padding) +
            var(--history-extra-space)
        );
    }
}

@media (max-height: 900px) {
    :root {
        --history-visible-count: 6;
        --history-sidebar-max-height: calc(
            var(--history-visible-count) * var(--history-item-size) +
            (var(--history-visible-count) - 1) * var(--history-item-gap) +
            2 * var(--history-list-padding) +
            var(--history-extra-space)
        );
    }
}

@media (max-height: 720px) {
    :root {
        --history-visible-count: 5;
        --history-sidebar-max-height: calc(
            var(--history-visible-count) * var(--history-item-size) +
            (var(--history-visible-count) - 1) * var(--history-item-gap) +
            2 * var(--history-list-padding) +
            var(--history-extra-space)
        );
    }
}

/* 占位符相关样式 */
.placeholder-header {
    margin-bottom: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.placeholder-header h5 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.placeholder-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.placeholder-info span {
    color: #6c757d;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
}

/* 图片占位符网格 */
.image-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin: 12px 0 12px;
    width: 100%;
    align-items: stretch;
}

/* 占位符网格在不同数量下的布局优化，确保并排显示 */
.image-placeholder-grid.single-image {
    grid-template-columns: repeat(auto-fit, minmax(140px, min(230px, 100%)));
    justify-content: center;
    max-width: 260px;
    margin: 12px auto 0;
}

/* 🎬 视频容器使用更大的最大宽度（不影响图片） */
.image-placeholder-grid.single-image.has-landscape-video {
    max-width: 720px;
    grid-template-columns: 1fr;
}

.image-placeholder-grid.two-images {
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}

.image-placeholder-grid.multiple-images {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.image-placeholder-grid.wide-two-col {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    max-width: 920px;
}

/* 单个图片占位符 */
.image-placeholder {
    position: relative;
    background: #f7f8fb;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    min-height: 120px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.image-placeholder:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* 占位符内容 */
.placeholder-content {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 🎬 视频占位符移除最小高度限制，避免横屏视频下方空白过大 */
.image-placeholder:has(.generated-video),
.image-placeholder:has(video) {
    min-height: unset;
}

.image-placeholder:has(.generated-video) .placeholder-content,
.image-placeholder:has(video) .placeholder-content {
    min-height: unset;
}

/* 🔥 新增：骨架屏动画样式 */
.history-skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.history-skeleton-item {
    display: flex;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 8px;
    gap: 10px;
    opacity: 0.8;
}

.skeleton-thumbnail {
    width: 48px;
    height: 48px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}

.skeleton-line.skeleton-title {
    width: 70%;
    height: 14px;
}

.skeleton-line.skeleton-text {
    width: 90%;
    height: 12px;
}

.skeleton-line.skeleton-meta {
    width: 50%;
    height: 10px;
    margin-top: 4px;
}

/* 骨架屏动画关键帧 */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 骨架屏项目的显示动画 */
.history-skeleton-item:nth-child(1) {
    animation-delay: 0s;
}

.history-skeleton-item:nth-child(2) {
    animation-delay: 0.1s;
}

.history-skeleton-item:nth-child(3) {
    animation-delay: 0.2s;
}

.history-skeleton-item:nth-child(4) {
    animation-delay: 0.3s;
}

/* 骨架屏项目的显示动画 */
.history-skeleton-item {
    animation: fadeInSkeleton 0.3s ease-out;
}

@keyframes fadeInSkeleton {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* 🔥 注释：原有的骨架屏样式已更新为上面的新样式 */

/* 占位符覆盖层 */
.placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f7f8fb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    gap: 22px;
    z-index: 1;
    backdrop-filter: blur(1px);
    border-radius: inherit;
    box-shadow: none;
}

.placeholder-skeleton {
    background: transparent;
    box-shadow: none;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3d4656;
    font-weight: 600;
    font-size: 46px;
    letter-spacing: 0.4px;
}

.placeholder-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    position: absolute;
    top: 16px;
    right: 18px;
}

.progress-percentage .percent-sign {
    font-size: 18px;
    color: #a3acb9;
    margin-left: 4px;
}

.placeholder-progress {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.placeholder-progress .progress-bar {
    width: 100%;
    height: 4px;
    background: transparent;
    border-radius: 999px;
    overflow: hidden;
}

.placeholder-progress .progress-fill {
    height: 100%;
    background: #4f5b6b;
    border-radius: 999px;
    transition: width 0.3s ease;
    min-width: 0;
}

.placeholder-progress .progress-text {
    font-size: 13px;
    color: #a3acb9;
    font-weight: 600;
}

.placeholder-no-result {
    width: 100%;
    height: 100%;
    background: #f7f8fb;
}

/* 完成动画 */
.image-placeholder.completing {
    border-color: #e9ecef; /* 去掉绿色边框，保持中性边框 */
    animation: completing-pulse 1s ease-in-out;
}

.image-placeholder.completed {
    border-color: #e9ecef; /* 去掉绿色边框，保持中性边框 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* 与默认一致 */
}

.image-placeholder.completed .placeholder-overlay {
    display: none;
}

@keyframes completing-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); /* 去掉绿色高亮 */
    }
}

/* 错误状态 */
.image-placeholder.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.placeholder-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc3545;
    font-size: 14px;
    gap: 8px;
}

.placeholder-error i {
    font-size: 24px;
    margin-bottom: 8px;
}

/* 超时状态 */
.image-placeholder.timeout {
    border-color: #ffc107;
    background: #fffaf0;
}

.placeholder-timeout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #856404;
    font-size: 14px;
    gap: 8px;
}

.placeholder-timeout i {
    font-size: 24px;
    margin-bottom: 8px;
}

/* 生成完成状态 */
.generation-completed {
    opacity: 1;
}

.generation-completed .placeholder-header {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
}

.generation-completed .placeholder-header h5 {
    color: #155724;
}

/* 用户消息样式扩展 - 支持多图 */

/* 图片网格布局 - 复用单图样式 */
.user-images-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.user-images-grid.count-1 {
    grid-template-columns: 1fr;
}

.user-images-grid.count-2 {
    grid-template-columns: 1fr 1fr;
}

.user-images-grid.count-3,
.user-images-grid.count-4 {
    grid-template-columns: repeat(2, 1fr);
}

.user-images-grid.count-5,
.user-images-grid.count-6 {
    grid-template-columns: repeat(3, 1fr);
}

.user-image-item {
    overflow: hidden;
    border-radius: 8px;
}

.user-image-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.user-image-item:hover img {
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-images-grid.count-5,
    .user-images-grid.count-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .user-images-grid {
        grid-template-columns: 1fr;
    }
    
    .user-images-grid.count-2 {
        grid-template-columns: 1fr;
    }
}

/* 原有样式保留（向下兼容） */
.image-placeholder-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.image-placeholder {
    min-height: 220px;
}

/* 🎬 视频占位符移除固定高度（避免横屏视频空白） */
.image-placeholder:has(.generated-video),
.image-placeholder:has(video) {
    min-height: unset;
}

.placeholder-content {
    min-height: 220px;
}

.placeholder-content:has(.generated-video),
.placeholder-content:has(video) {
    min-height: unset;
}

.skeleton-image {
    min-height: 80px;
}

@media (max-width: 480px) {
    .image-placeholder-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .image-placeholder {
        min-height: 120px;
    }

    /* 🎬 移动端视频占位符也移除固定高度 */
    .image-placeholder:has(.generated-video),
    .image-placeholder:has(video) {
        min-height: unset;
    }

    .placeholder-content {
        min-height: 120px;
    }

    .placeholder-content:has(.generated-video),
    .placeholder-content:has(video) {
        min-height: unset;
    }

    .placeholder-overlay {
        padding: 12px;
        gap: 8px;
    }
    
    .placeholder-text {
        font-size: 11px;
    }

    .overlay-progress {
        top: 12px;
        left: 12px;
    }

    .progress-badge {
        min-width: 42px;
        padding: 3px 8px;
        border-radius: 8px;
        font-size: 12px;
    }

    .progress-badge .progress-percentage {
        font-size: 12px;
    }
}

/* 🔥 进度徽章基础样式 */
.progress-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #3d4656;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.progress-badge .progress-percentage {
    font-size: 13px;
    font-weight: 600;
    color: #3d4656;
}

.loading-message.skeleton-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7f9fc;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    padding: 16px;
    gap: 14px;
    min-height: 120px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.loading-message.skeleton-loading .skeleton-preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.loading-message.skeleton-loading .skeleton-preview-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 12px;
}

.loading-message.skeleton-loading[data-preview-count="1"] .skeleton-preview-grid {
    grid-template-columns: repeat(1, minmax(140px, 1fr));
}

.loading-message.skeleton-loading[data-preview-count="2"] .skeleton-preview-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.loading-message.skeleton-loading[data-preview-count="3"] .skeleton-preview-grid {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
}

.loading-message.skeleton-loading .skeleton-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f2f5 25%, #e3e7ef 50%, #f0f2f5 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.loading-message.skeleton-loading.skeleton-complete .skeleton-thumb,
.loading-message.skeleton-loading.skeleton-complete .skeleton-line {
    animation-duration: 2.4s;
    opacity: 0.7;
}

.loading-message.skeleton-loading .skeleton-overlay-progress {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .loading-message.skeleton-loading {
        padding: 14px;
        gap: 12px;
    }

    .loading-message.skeleton-loading .skeleton-preview-wrapper {
        max-width: 100%;
    }

    .loading-message.skeleton-loading .skeleton-preview-grid {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    }

    .loading-message.skeleton-loading .skeleton-overlay-progress {
        top: 14px;
        left: 14px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .loading-message {
        padding: 12px;
        gap: 8px;
    }

    .loading-spinner {
        width: 16px;
        height: 16px;
    }

    .loading-text {
        font-size: 13px;
    }

    .progress-text {
        font-size: 11px;
        min-width: 30px;
    }
}

.image-edit-chat-container {
    height: 100vh;
    /* 使用全视口高度 */
    max-height: 100vh;
    /* 确保不超过视口高度 */
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    /* 防止容器本身产生滚动条 */
    position: fixed;
    /* 固定定位，避免受body padding影响 */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding-top: var(--mode-switcher-offset);
    /* 为导航栏留出空间 */
    box-sizing: border-box;
    /* 确保padding包含在总高度内 */
}

/* 移动端需要更高的z-index以显示在侧边栏之上 */
@media (max-width: 768px) {
    .image-edit-chat-container {
        z-index: 100;
        /* 移动端提高z-index使内容可见，但低于侧边栏(1100)，允许侧边栏滑出覆盖 */
    }
}

/* 主内容区域 */
.main-content-wrapper {
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    min-height: 0;
    /* 确保在flex容器中正确收缩 */
    max-height: 100%;
    /* 限制最大高度 */
    width: 100%;
    padding-top: var(--mode-switcher-offset);
    box-sizing: border-box;
}

/* 历史记录面板 (支持左侧和右侧) */
.history-sidebar {
    width: 90px;
    flex-shrink: 0;
    background: white;
    border: none; /* 移除所有边框 */
    border-left: 1px solid #e9ecef; /* 只保留左边框用于分隔 */
    display: flex; /* 默认显示，永远可见 */
    flex-direction: column;
    transition: width 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    min-height: 0;
    height: min(
        max(0px, calc(100vh - var(--mode-switcher-offset) - var(--input-area-fixed-height, 0px))),
        var(--history-sidebar-max-height)
    );
    max-height: min(
        max(0px, calc(100vh - var(--mode-switcher-offset) - var(--input-area-fixed-height, 0px))),
        var(--history-sidebar-max-height)
    );
    box-sizing: border-box;
    overflow: hidden;
    position: sticky;
    top: var(--mode-switcher-offset);
    z-index: 5;
}

/* 🆕 右侧历史记录面板样式 */
.history-sidebar.right-sidebar {
    border-right: none;
    border-left: 1px solid #e9ecef;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
}

/* 当用户已登录时显示侧边栏 */
.history-sidebar.visible {
    display: flex;
}


/* 新建对话按钮区域 */
.new-chat-section {
    padding: 0.75rem;
    border-bottom: none; /* 移除边框，避免与侧栏边框产生双重边框 */
}

.new-chat-btn {
    width: 58px;
    height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.new-chat-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.new-chat-btn i {
    font-size: 18px;
}

.new-chat-btn span {
    display: none;
    /* 隐藏文字，只显示加号图标 */
}

/* 历史记录列表 */
.history-list {
    flex: 1;
    overflow-y: auto; /* 🔥 保持auto以支持程序化滚动 */
    overflow-x: hidden;
    padding: var(--history-list-padding);
    display: flex;
    flex-direction: column;
    gap: var(--history-item-gap);
    /* 🔥 自适应高度：支持无滚动条滚动 */
    min-height: 0; /* 确保flex子项可以收缩 */
    scrollbar-width: thin; /* Firefox: 显示细滚动条 */
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    /* 🔥 启用平滑滚动 */
    scroll-behavior: smooth;
    /* 🔥 支持触摸滚动 */
    -webkit-overflow-scrolling: touch;
    position: relative;
    max-height: calc(var(--history-sidebar-max-height) - var(--history-extra-space));
}

/* 🔥 Webkit 浏览器滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 6px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.45);
}

/* 🔥 添加滚动提示样式 */
.history-list::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,123,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.history-list:hover::before {
    opacity: 1;
}

/* 历史记录项 */
.history-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

/* 缩略图样式的历史记录项 */
.history-item.thumbnail-style {
    padding: 0 !important;
    overflow: hidden;
    width: var(--history-item-size) !important;
    height: var(--history-item-size) !important;
    margin: 0 auto !important;
    /* 水平居中 */
    border: 2px solid #e9ecef !important;
    background: #f8f9fa;
    display: flex !important;
    flex-direction: column;
    flex-shrink: 0;
    /* 防止收缩 */
    border-radius: 8px !important;
}

.history-item.thumbnail-style:hover {
    border-color: #007bff;
}

.history-item.thumbnail-style.selected {
    border-color: #007bff;
    border-width: 2px;
}

.history-item.thumbnail-style .history-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0;
    padding: 0;
}

.history-item.thumbnail-style video.history-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    pointer-events: none;
    /* 防止video元素拦截点击事件 */
}

.history-item.thumbnail-style .history-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 6px;
}

/* 移除info区域，因为58x58太小无法容纳文字 */
.history-item.thumbnail-style .history-info {
    display: none;
}

/* Tooltip 样式 */
.history-tooltip {
    position: absolute;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 250px;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-tooltip.show {
    opacity: 1;
}

.history-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* 删除了所有旧的文本显示样式 */

/* 调整历史记录项的样式 */
/* 删除重复的基础历史记录项样式 */

/* 删除了旧的悬停样式 */


.history-loading,
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
    text-align: center;
}

.history-loading i {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.history-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

.history-empty p {
    margin: 0.5rem 0;
    font-weight: 500;
    color: #495057;
}

.history-empty small {
    color: #6c757d;
}

/* 删除了重复的旧历史记录项样式，使用新的缩略图样式 */

/* 页面标题 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-icon {
    width: 40px;
    height: 40px;
    background: #6c757d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 18px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* 聊天内容区域 */
.chat-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    min-height: 0;
    /* 确保flex子项可以收缩 */
}

.chat-content-area.with-fixed-input {
    padding-bottom: 160px;
    /* 为固定底部的输入框留出更多空间，确保内容不被遮挡 */
    margin-bottom: 0;
    /* 输入框固定在底部时移除底部空间 */
}

.messages-container {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    transition: max-width 0.2s ease;
    padding-top: 64px; /* 为 tab 留出空间，滚动时内容可穿过玻璃 tab */
}

.messages-container.media-grid-mode {
    max-width: 1000px;
    padding-left: 88px;
    padding-right: 16px;
}

/* 欢迎消息 */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.welcome-message .message-content p {
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

/* 消息项 */
.message-item {
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease-out;
}

.user-message {
    display: flex;
    justify-content: flex-end;
}

.ai-message {
    display: flex;
    justify-content: flex-start;
}

.system-message {
    display: flex;
    justify-content: center;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .message-bubble {
    background: white;
    color: #2c3e50;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.system-message .message-bubble {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
    background: #f8f9fc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #334155;
    border-radius: 14px;
    padding: 14px 18px;
}

.system-message .system-message-icon {
    font-size: 18px;
    line-height: 1.2;
    color: inherit;
}

.system-message .system-message-text {
    font-size: 14px;
    line-height: 1.6;
}

.system-message.error .message-bubble {
    background: #fff5f5;
    border-color: rgba(220, 53, 69, 0.3);
    color: #b02a37;
}

.system-message.warning .message-bubble {
    background: #fffdf2;
    border-color: rgba(255, 193, 7, 0.3);
    color: #b78103;
}

.system-message.success .message-bubble {
    background: #f4fbf7;
    border-color: rgba(25, 135, 84, 0.3);
    color: #1e7b4d;
}

.system-message.info .message-bubble {
    background: #f8f9fc;
    border-color: rgba(15, 23, 42, 0.08);
    color: #334155;
}

/* 失败提示与重试入口 */
.retry-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px auto;
    padding: 14px 16px;
    max-width: 80%;
    width: 100%;
    background: #fff5f5;
    border: 1px solid rgba(220, 53, 69, 0.22);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(220, 53, 69, 0.08);
    color: #7f1d1d;
}

.retry-notice .retry-icon {
    font-size: 18px;
    line-height: 1.2;
    color: #d6336c;
}

.retry-notice .retry-body {
    flex: 1;
}

.retry-notice .retry-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #b02a37;
}

.retry-notice .retry-text {
    font-size: 13px;
    line-height: 1.6;
    color: #7f1d1d;
}

.retry-notice .retry-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.retry-notice .retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #b02a37;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(176, 42, 55, 0.18);
    transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.retry-notice .retry-btn:hover {
    background: #a12530;
    box-shadow: 0 10px 22px rgba(176, 42, 55, 0.2);
}

.retry-notice .retry-btn:active {
    transform: translateY(1px);
    box-shadow: 0 6px 14px rgba(176, 42, 55, 0.18);
}

.retry-notice .retry-btn:focus-visible {
    outline: 2px solid rgba(176, 42, 55, 0.4);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .retry-notice {
        max-width: 100%;
    }
}

/* 当包含占位符网格时，气泡采用更宽布局，避免占位符竖排 */
.ai-message .message-bubble.wide-bubble,
.message-item.has-media-grid .message-bubble {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
    padding: 14px 14px 12px;
    border-radius: 18px;
}

.media-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    flex-wrap: nowrap;
    padding-left: 8px;
}

.prompt-panel {
    flex: 0 0 200px;
    max-width: 220px;
    min-width: 160px;
    width: clamp(170px, 18vw, 220px);
    background: linear-gradient(135deg, #f9fafb, #edf2f7);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: calc(var(--mode-switcher-offset) + 12px);
}

.prompt-panel .prompt-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-panel .prompt-title .prompt-action-btn {
    margin-left: auto;
}

.prompt-action-btn {
    border: 0;
    background: transparent;
    color: #334155;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.prompt-action-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.prompt-action-btn:active {
    transform: translateY(1px);
}

.prompt-panel .prompt-title i {
    color: #2563eb;
}

.message-item.user-message.hidden-prompt {
    display: none;
}

.prompt-text {
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
    word-break: break-word;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}
.prompt-text::-webkit-scrollbar {
    width: 6px;
}
.prompt-text::-webkit-scrollbar-track {
    background: transparent;
}
.prompt-text::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
}

.prompt-model {
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}

.prompt-ref-list {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
}

.prompt-ref-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    min-height: 64px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.prompt-ref-item img {
  
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prompt-ref-item.ref-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.media-grid {
    flex: 1 1 auto;
    min-width: 300px;
}

/* 图片消息 */
.image-message {
    margin: 16px 0;
}

.generated-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
    justify-content: stretch;
    align-items: stretch;
    width: 100%;
}

/* 单张图片时居中显示 */
.generated-images.single-image {
    grid-template-columns: repeat(auto-fit, minmax(140px, min(230px, 100%)));
    justify-content: center;
    width: 100%;
    max-width: 260px;
    margin: 12px auto 0;
}

/* 🎬 单个横屏视频：放大展示（竖屏保持原尺寸） */
.generated-images.single-image.has-landscape-video {
    grid-template-columns: 1fr;
    max-width: 720px;
}

/* 两张图片时并排显示 */
.generated-images.two-images {
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
}

/* 三张或更多图片时自适应显示 */
.generated-images.multiple-images {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.generated-images.wide-two-col {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    max-width: 920px;
}

.generated-image,
.generated-video {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
    height: auto;
    margin: 0;
    background: transparent;
    display: block;
}

.generated-image:hover,
.generated-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.generated-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.generated-video video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.generated-image:hover .image-actions {
    opacity: 1;
}

.generated-video:hover .image-actions,
.generated-image:focus-within .image-actions,
.generated-video:focus-within .image-actions {
    opacity: 1;
}

@media (hover: none) {
    .generated-image .image-actions,
    .generated-video .image-actions {
        opacity: 1;
    }
}

.image-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.image-action-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* 加载状态 */
.loading-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
    margin-top: 2px;
}

.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-text {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 3px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.progress-text {
    font-size: 12px;
    color: #6c757d;
    min-width: 35px;
    text-align: right;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 带动画效果的输入框 - 保留用于平滑过渡 */
.input-area.with-transition {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 点击生成按钮后固定在底部 */
.input-area.fixed-bottom {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.chat-input-form {
    max-width: 800px;
    margin: 0 auto;
}

/* 图片上传区域 */
.image-upload-section {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.uploaded-image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
    font-size: 0;
    line-height: 0;
    width: 80px;
    height: 80px;
}

.upload-progress-overlay {
    position: absolute;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    font-size: 13px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.upload-progress-overlay .loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    margin: 0;
    transform: translate(-50%, -50%);
    animation: none;
    box-sizing: border-box;
}

.upload-progress-overlay .loading-spinner::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-sizing: border-box;
}

.uploaded-image-preview.uploading .upload-progress-overlay {
    opacity: 1;
    pointer-events: auto;
}

.upload-progress-text {
    display: none;
}

#previewImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-progress-overlay .loading-spinner {
    margin: 0;
}

.remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 3;
}

.remove-image-btn:hover {
    background: #ff2e43;
    transform: scale(1.1);
}

/* 主输入容器 */
.main-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 底部输入区域 */
.input-area {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    /* 默认在中间位置，提供更好的视觉焦点 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 20px;
    z-index: 100;
    box-sizing: border-box;
    overflow: visible;
}

.prompt-welcome-message {
    position: absolute;
    top: -72px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

.chat-content-area .welcome-message {
    display: none !important;
}

.input-area.fixed-bottom .prompt-welcome-message {
    display: none !important;
}

.referral-invite-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 24px 0 16px;
    border: 1px solid #d6e4ff;
    border-radius: 12px;
    background: #f0f5ff;
    color: #1d39c4;
    font-size: 15px;
}

.referral-invite-banner .referral-invite-link {
    font-weight: 600;
    color: #0958d9;
    text-decoration: none;
}

.referral-invite-banner .referral-invite-link:hover {
    text-decoration: underline;
}

/* 文本输入区域 */
.text-input-wrapper {
    display: flex;
    align-items: flex-end;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    padding: 12px 16px;
    transition: border-color 0.2s ease;
    gap: 8px;
}

.text-input-wrapper:focus-within {
    border-color: #007bff;
}

.text-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 16px;
    line-height: 1.4;
    min-height: 24px;
    max-height: 120px;
    font-family: inherit;
    color: #2c3e50;
}

.text-input-wrapper textarea::placeholder {
    color: #adb5bd;
}

/* 输入框内的按钮组 */
.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 输入框内的按钮基础样式 */
.input-action-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 上传按钮样式 */
.input-action-btn.upload-btn {
    color: #6c757d;
    padding: 6px;
    font-size: 16px;
}

.input-action-btn.upload-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}


/* 生成按钮样式 */
.input-action-btn.generate-btn {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.input-action-btn.generate-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.input-action-btn.generate-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-action-btn.generate-btn i {
    font-size: 12px;
    transition: all 0.3s ease;
    animation: boltFlash 2s infinite;
}

@keyframes boltFlash {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

.input-action-btn.generate-btn span {
    font-size: 14px;
}

/* Agent 流式占位：转圈（替代“我先理解一下你的需求…”） */
.agent-streaming-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: rgba(37, 99, 235, 0.95);
    animation: agentSpinner 0.9s linear infinite;
    margin: 2px 0;
    flex: 0 0 auto;
}

.agent-tool-status {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.1px;
}

.agent-thinking-text {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.1px;
    background: linear-gradient(110deg, #94a3b8 10%, #e2e8f0 35%, #94a3b8 60%);
    background-size: 200% 100%;
    animation: agentThinkingSweep 2.4s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.agent-streaming .message-bubble {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.agent-streaming .generated-text {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 6px 0;
}

.agent-streaming .text-content {
    gap: 8px;
}

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

@keyframes agentThinkingSweep {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* Agent 开关按钮：更像“可见的开关”而不是透明图标 */
.input-action-btn.agent-mode-btn {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    height: 32px;
    gap: 6px;
    line-height: 1;
}

.input-action-btn.agent-mode-btn i {
    font-size: 13px;
}

.input-action-btn.agent-mode-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.input-action-btn.agent-mode-btn[aria-pressed="true"],
.input-action-btn.agent-mode-btn.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.input-action-btn.agent-mode-btn[aria-pressed="true"]:hover,
.input-action-btn.agent-mode-btn.active:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
}

/* 平板端优化 */
@media (max-width: 1024px) and (min-width: 769px) {
    .messages-container.media-grid-mode {
        max-width: 900px;
    }

    .media-row {
        gap: 10px;
        flex-wrap: wrap;
    }

    .prompt-panel {
        flex-basis: 200px;
        min-width: 170px;
        max-width: 230px;
        position: static;
    }

    .generated-images.wide-two-col,
    .image-placeholder-grid.wide-two-col {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        max-width: 720px;
    }

    .generated-images.single-image {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 520px;
    }

    /* 🎬 平板端视频容器也使用更大宽度 */
    .generated-images.single-image.has-landscape-video,
    .image-placeholder-grid.single-image.has-landscape-video {
        max-width: 720px;
        grid-template-columns: 1fr;
    }

    .generated-images.two-images {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .generated-images.multiple-images {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .text-input-wrapper {
        padding: 10px 12px;
    }

    .input-actions {
        gap: 6px;
    }

    .input-action-btn.generate-btn {
        padding: 14px 24px; /* 大幅增加内边距，特别是垂直方向 */
        font-size: 16px; /* 再次增加字体大小 */
        align-self: auto !important; /* 移除拉伸，保持按钮原始大小 */
        flex-shrink: 0; /* 防止按钮收缩 */
        width: auto !important; /* 确保宽度自动调整 */
        min-width: 90px; /* 增加最小宽度 */
        min-height: 44px; /* 设置最小高度确保足够空间显示文字 */
        line-height: 1.2; /* 调整行高 */
    }

    .input-action-btn.generate-btn i {
        display: none !important; /* 移动端隐藏图标 */
    }

    .input-action-btn.generate-btn span {
        font-size: 16px; /* 与按钮字体大小保持一致 */
        font-weight: 600; /* 增加字体粗细 */
        line-height: 1.2; /* 调整行高确保文字显示完整 */
    }

    .input-action-btn.upload-btn {
        padding: 4px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .input-action-btn.generate-btn span {
        display: inline !important; /* 移动端显示文字，不隐藏 */
        font-size: 16px !important;
        font-weight: 600 !important;
    }

    .input-action-btn.generate-btn {
        padding: 14px 24px; /* 与上面的移动端样式保持一致 */
        min-height: 44px;
        min-width: 90px;
    }
    
    .input-action-btn.generate-btn i {
        display: none !important; /* 隐藏图标 */
    }
}

/* 保留原上传按钮样式作为备用 */
.upload-btn:not(.input-action-btn) {
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease;
    margin-left: 8px;
}

.upload-btn:not(.input-action-btn):hover {
    color: #007bff;
}


/* 参数按钮组 */
.params-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.param-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.param-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.param-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.param-btn i {
    font-size: 12px;
}

.param-btn .param-dropdown-icon {
    font-size: 12px;
    margin-left: 2px;
    color: inherit;
}

/* 图片上传按钮特殊样式 - 只显示+号，更大更突出 */
.param-btn.image-upload-btn {
    padding: 10px 14px;
    min-width: 44px;
    justify-content: center;
}

.param-btn.image-upload-btn i {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.param-btn.disabled,
.param-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.param-btn.disabled:hover,
.param-btn:disabled:hover {
    border-color: #e9ecef;
    color: inherit;
}

.frame-param-btn i {
    font-size: 13px;
}

/* 原生成按钮样式（已移到输入框内，保留作为备用） */
.generate-btn:not(.input-action-btn) {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
    align-self: flex-end;
}

.generate-btn:not(.input-action-btn):hover {
    background: #0056b3;
}

.generate-btn:not(.input-action-btn):disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* 参数面板 */
.params-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
    pointer-events: auto !important;
    /* 确保面板可交互 */
    display: block;
    /* 确保面板可见 */
}

/* 当输入框固定在底部时，参数面板需要更高的z-index */
.input-area.fixed-bottom~.params-panel {
    z-index: 1001;
}

.params-panel.show {
    transform: translateY(0);
    pointer-events: auto !important;
    /* 确保显示时可交互 */
    display: block;
    /* 确保显示时可见 */
}

/* 确保参数面板内容可见 */
.params-content {
    position: relative;
    z-index: 1001;
    pointer-events: auto !important;
    /* 确保内容可交互 */
}

.params-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.param-section {
    margin-bottom: 20px;
}

.param-section h6 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.custom-prompt-box {
    border: 1px solid #edf1f5;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.custom-prompt-header {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.custom-prompt-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-prompt-input {
    flex: 1;
    border: 1px solid #e1e6eb;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: #1f2937;
    background: #ffffff;
}

.custom-prompt-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.12);
}

.custom-prompt-add-btn {
    border: 1px solid #1890ff;
    background: #1890ff;
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.custom-prompt-add-btn:hover {
    background: #0f7ae5;
    border-color: #0f7ae5;
}

.custom-prompt-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.custom-prompt-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.custom-prompt-item .template-option {
    margin: 0;
}

.custom-prompt-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    color: #94a3b8;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1005;
}

.custom-prompt-remove:hover {
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.custom-prompt-remove i {
    font-size: 10px;
}

.custom-prompt-empty {
    font-size: 12px;
    color: #94a3b8;
}

/* 选项按钮样式 */
.style-options,
.template-options,
.image-style-options,
.ratio-options,
.quality-options,
.num-images-options,
.duration-options,
.resolution-options,
.video-resolution-options,
.fps-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.template-options {
    max-height: 400px;
    /* 模板选项更多，需要更大的高度 */
}

.style-option,
.template-option,
.image-style-option,
.ratio-option,
.quality-option,
.num-images-option,
.param-option,
.duration-option,
.resolution-option,
.video-resolution-option {
    padding: 8px 16px;
    border: 1px solid #e9ecef;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.template-option {
    font-size: 13px;
    /* 模板选项字体稍小 */
    padding: 8px 12px;
    /* 增加内边距提高点击区域 */
    pointer-events: auto !important;
    /* 确保可点击 */
    z-index: 999 !important;
    /* 确保在最上层 */
    position: relative !important;
    /* 确保定位正确 */
    min-height: 32px;
    /* 确保最小点击区域 */
    display: inline-flex;
    /* 使用flex布局 */
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
}

.style-option:hover,
.template-option:hover,
.image-style-option:hover,
.ratio-option:hover,
.quality-option:hover,
.num-images-option:hover,
.param-option:hover,
.duration-option:hover,
.resolution-option:hover,
.video-resolution-option:hover {
    border-color: #1890FF;
    color: #1890FF;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
}

.style-option.active,
.template-option.active,
.image-style-option.active,
.ratio-option.active,
.quality-option.active,
.num-images-option.active,
.param-option.active,
.duration-option.active,
.resolution-option.active,
.video-resolution-option.active {
    background: #1890FF;
    border-color: #1890FF;
    color: white;
}

/* 视频宽高比选项 */
.video-ratio-popup h6 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.video-ratio-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.video-ratio-option {
    flex: 1 1 calc(50% - 6px);
    min-width: 100px;
    border-radius: 12px;
    border: 2px solid #e6e6e6;
    background: #ffffff;
    color: #333333;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-ratio-option .ratio-icon {
    width: 32px;
    height: 44px;
    border: 2px solid #d9d9d9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
}

.video-ratio-option .ratio-icon-inner {
    display: none;
}

.video-ratio-option .ratio-icon.landscape {
    width: 44px;
    height: 24px;
}

.video-ratio-option .ratio-icon.portrait {
    width: 24px;
    height: 44px;
}

.video-ratio-option .ratio-value {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.video-ratio-option:hover {
    border-color: #1890FF;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.video-ratio-option:hover .ratio-icon {
    border-color: #1890FF;
}

.video-ratio-option.active {
    border-color: #1890FF;
    background: #f0f8ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.video-ratio-option.active .ratio-icon {
    border-color: #1890FF;
    background: #e6f7ff;
}

.video-ratio-option.active .ratio-value {
    color: #1890FF;
}

/* 模板选项的滚动条样式 */
.template-options::-webkit-scrollbar {
    width: 4px;
}

.template-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.template-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.template-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 高级选项 */
.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-item label {
    font-size: 14px;
    color: #2c3e50;
    min-width: 80px;
}

.option-item input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.option-item select {
    padding: 4px 8px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.option-item input[type="checkbox"] {
    margin-right: 8px;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-edit-chat-container {
        /* 移动端使用固定高度布局确保滚动正常工作 */
        height: 100vh;
        max-height: 100vh;
        padding-top: var(--mode-switcher-offset);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* 防止整体页面滚动 */
    }

    .page-header {
        padding: 16px;
        flex-shrink: 0; /* 防止头部被压缩 */
    }

    .page-header h1 {
        font-size: 24px;
    }

    .media-row {
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }

    .prompt-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: static;
        flex-basis: auto;
    }

    .generated-images.wide-two-col,
    .image-placeholder-grid.wide-two-col {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        max-width: 100%;
    }

    .chat-content-area {
        padding: 16px;
        flex: 1;
        height: calc(100vh - 64px - 180px); /* 精确计算：视口高度 - 头部高度 - 输入框高度 */
        max-height: calc(100vh - 64px - 180px);
        overflow-y: auto; /* 确保垂直滚动可用 */
        overflow-x: hidden; /* 防止水平滚动 */
        padding-bottom: 20px; /* 适度的底部间距 */
    }

    .input-area {
        padding: 16px;
    }

    .params-buttons {
        justify-content: center;
    }

    .param-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* 移动端生成按钮布局调整 */
    .generate-btn:not(.input-action-btn) {
        align-self: stretch;
        justify-content: center;
    }
    
    /* 输入框内的生成按钮不拉伸 */
    .input-action-btn.generate-btn {
        align-self: auto !important;
        justify-content: center;
        flex-shrink: 0;
        width: auto !important;
        padding: 14px 24px; /* 移动端更大的按钮，增加垂直内边距 */
        min-width: 90px;
        min-height: 44px; /* 确保足够高度显示文字 */
        line-height: 1.2;
    }
    
    /* 移动端生成按钮隐藏图标 */
    .input-action-btn.generate-btn i {
        display: none !important;
    }

    .message-bubble {
        max-width: 85%;
    }

    .generated-images.single-image {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        max-width: 100%;
        margin: 12px auto 0;
    }
    
    .generated-images.two-images {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        justify-content: center;
        gap: 10px;
    }
    
    .generated-images.multiple-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        justify-content: center;
        gap: 10px;
    }

    .image-placeholder-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .image-placeholder-grid.single-image {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        max-width: 100%;
        margin: 12px auto 0;
    }

    /* 🎬 移动端横屏视频占满可用宽度（竖屏保持原尺寸） */
    .generated-images.single-image.has-landscape-video,
    .image-placeholder-grid.single-image.has-landscape-video {
        max-width: 100%;
        grid-template-columns: 1fr;
    }

    .image-placeholder-grid.two-images {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        justify-content: center;
        gap: 10px;
    }
    
    .image-placeholder-grid.multiple-images {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        justify-content: center;
        gap: 10px;
    }
    
    .generated-image img,
    .generated-video video {
        max-width: 100%; /* 移动端最大宽度为容器宽度 */
        height: auto;
        object-fit: contain;
    }
}

/* 滚动条样式 */
.chat-content-area::-webkit-scrollbar {
    width: 6px;
}

.chat-content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-content-area::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-content-area::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 拖拽效果 */
.text-input-wrapper.drag-over {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.05);
}

/* 用户消息中的图片样式 */
.user-image img {
    max-width: 120px;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-prompt {
    font-size: 14px;
    line-height: 1.4;
}

/* 改进的按钮悬停效果 */
.param-btn:hover i,
.generate-btn:hover i {
    transform: scale(1.1);
}

/* 改进的消息动画 */
.message-item {
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 改进的加载动画 */
.loading-spinner {
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* ===================== 任务状态指示器样式 ===================== */

/* 任务状态覆盖层 */
.history-item.task-pending .history-task-overlay,
.history-item.task-processing .history-task-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* 转圈动画 */
.history-task-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 任务状态边框 */
.history-item.task-pending {
    border-color: #ffc107;
    /* 黄色边框表示等待中 */
    border-width: 2px;
}

.history-item.task-processing {
    border-color: #007bff;
    /* 蓝色边框表示处理中 */
    border-width: 2px;
    animation: task-pulse 2s ease-in-out infinite;
}

/* 处理中的脉冲动画 */
@keyframes task-pulse {

    0%,
    100% {
        border-color: #007bff;
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    50% {
        border-color: #0056b3;
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0);
    }
}

/* 任务状态角标 - 去掉完成状态的对勾 */
.history-task-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 3;
}

.history-task-badge.pending {
    background: #ffc107;
    color: white;
}

.history-task-badge.processing {
    background: #007bff;
    color: white;
}

/* 任务完成时不显示角标，避免显示对勾 */
.history-task-badge.completed {
    background: #28a745;
    color: white;
}

.history-task-badge.failed {
    background: #dc3545;
    color: white;
}

/* 进度指示器（环形进度条） */
.history-task-progress {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1.5px;
    overflow: hidden;
    z-index: 3;
}

.history-task-progress-fill {
    height: 100%;
    background: #007bff;
    border-radius: 1.5px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 任务计数徽章（显示任务数量） */
.task-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    border: 2px solid white;
}

/* 悬停效果增强 */
.history-item.task-pending:hover,
.history-item.task-processing:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

/* 任务完成状态 */
.history-item.task-completed {
    border-color: #28a745;
}

.history-item.task-failed {
    border-color: #dc3545;
}

/* 改进的图片悬停效果 */
.generated-image,
.generated-video {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.generated-image:hover,
.generated-video:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 参数面板动画优化 */
.params-panel {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 输入框聚焦效果 */
.text-input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 按钮点击效果 */
.generate-btn:active {
    transform: scale(0.98);
}

.param-btn:active,
.style-option:active,
.template-option:active,
.image-style-option:active,
.ratio-option:active,
.quality-option:active,
.num-images-option:active {
    transform: scale(0.95);
}

/* 复制链接对话框样式 */
.copy-url-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.copy-dialog-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.copy-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
}

.copy-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.copy-dialog-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.copy-dialog-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-dialog-close:hover {
    background: #e9ecef;
    color: #495057;
}

.copy-dialog-body {
    padding: 1.5rem;
}

.copy-dialog-body p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.copy-url-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: #f8f9fa;
    color: #495057;
    margin-bottom: 1rem;
    word-break: break-all;
    resize: none;
    min-height: 80px;
}

.copy-url-input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
}

.copy-dialog-actions {
    display: flex;
    gap: 0.75rem;
}

.copy-dialog-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.copy-dialog-btn.primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.copy-dialog-btn.primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.copy-dialog-btn.secondary {
    background: white;
    color: #6c757d;
    border-color: #e9ecef;
}

.copy-dialog-btn.secondary:hover {
    background: #f8f9fa;
    border-color: #ced4da;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 🔥 新增：加载更多指示器样式 */
.loading-more-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 10px 0;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.loading-more-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #6c757d;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 🔥 注释：历史记录无限滚动样式已合并到.history-list中 */

/* 历史记录项滑动动画 */
.history-item {
    transition: all 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

/* 新加载的历史记录项动画 */
.history-item.newly-loaded {
    animation: slideInFromBottom 0.5s ease-out;
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 无更多内容提示 */
.no-more-content {
    text-align: center;
    padding: 15px;
    color: #9ca3af;
    font-size: 13px;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

.no-more-content i {
    margin-right: 5px;
}

/* ========== 多图上传预览样式 ========== */

/* 多图预览网格容器 */
.multi-image-preview-grid {
    /* Fixed-size thumbnail grid to keep previews consistent */
    --thumb-size: 140px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), var(--thumb-size)));
    grid-auto-rows: auto;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    height: auto;
    max-height: none;
    overflow: visible;
}

/* 响应式布局：2张图片时并排显示 */
/* Keep the same fixed-size layout even for two images */
.multi-image-preview-grid.two-images {
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), var(--thumb-size)));
}

/* 响应式布局：3张及以上图片时使用网格 */
/* And for 3+ images, keep fixed-size thumbnails as well */
.multi-image-preview-grid.multiple-images {
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), var(--thumb-size)));
}

/* 单个多图预览项 */
.multi-image-preview-item {
    position: relative;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    aspect-ratio: 1;
    width: 100%;
    height: 100%;
     max-width: 80px;
    max-height: 80px;
}

.multi-image-preview-item:hover {
    border-color: #1890FF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

/* 多图预览中的图片 */
.multi-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
      max-width: 80px;
    max-height: 80px;
}

.multi-image-preview-item .image-role-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.image-role-badge.badge-primary {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
}

.image-role-badge.badge-warning {
    background: linear-gradient(135deg, #fa8c16, #ffc069);
}

.image-role-badge.badge-info {
    background: linear-gradient(135deg, #13c2c2, #36cfc9);
}

.image-role-badge.badge-muted {
    background: rgba(0, 0, 0, 0.45);
}

.multi-image-preview-item .image-role-selector {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-image-preview-item .image-role-selector label {
    font-size: 12px;
    color: #697a8d;
    white-space: nowrap;
}

.multi-image-preview-item .image-role-selector select {
    flex: 1;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.multi-image-preview-item .image-role-selector select:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
}

.multi-image-preview-item.uploading {
    opacity: 0.78;
}

.video-remix-preview {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    background: #f9fafb;
}

.video-remix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.video-remix-remove-btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
}

.video-remix-remove-btn:hover {
    color: #ef4444;
}

.video-remix-player video {
    width: 100%;
    height: 240px;
    object-fit: contain;
    border-radius: 8px;
    background: #000;
}

.video-remix-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

.generated-video-block {
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.generated-video-block video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.generated-video-block .video-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.generated-video-block:hover .video-actions,
.generated-video-block:focus-within .video-actions {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .generated-video-block .video-actions {
        opacity: 1;
        pointer-events: auto;
    }
}

.generated-video-block .video-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generated-video-block .video-action-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.multi-image-uploading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    z-index: 3;
}

.multi-image-uploading-overlay .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


.user-multi-image-item {
    position: relative;
    display: inline-block;
}

.user-multi-image-item .image-role-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: rgba(24, 144, 255, 0.9);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.25);
}

/* 多图移除按钮 */
.multi-image-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 10px;
    z-index: 2;
}

.multi-image-preview-item:hover .multi-image-remove-btn {
    opacity: 1;
}

.multi-image-remove-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
}

/* 多图序号标识 */
.multi-image-index {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(24, 144, 255, 0.9);
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 500;
    line-height: 1;
}

/* 多图上传信息区域 */
.multi-upload-info {
    background: #f0f8ff;
    border: 1px solid #d4edda;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
}

/* 内联编辑模式切换，展示在“最多支持X张”附近 */
.inline-edit-mode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.inline-edit-mode .inline-label {
    font-size: 12px;
    color: #495057;
}

.inline-edit-mode .inline-options {
    display: flex;
    gap: 8px;
}

.inline-edit-mode .edit-mode-option.inline.small {
    border: 1px solid #e9ecef;
    background: #ffffff;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-edit-mode .edit-mode-option.inline.small:hover {
    border-color: #1890FF;
}

.inline-edit-mode .edit-mode-option.inline.small.active {
    background: #1890FF;
    color: #fff;
    border-color: #1890FF;
}

.inline-edit-mode .edit-mode-option[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 上传统计信息 */
.upload-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.current-count, .max-limit {
    font-size: 12px;
    color: #495057;
}

.current-count strong, .max-limit strong {
    color: #1890FF;
    font-weight: 600;
}

/* 上传提示 */
.upload-tip {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #6c757d;
    gap: 4px;
}

.upload-tip i {
    color: #1890FF;
    font-size: 12px;
}

/* 单图和多图模式切换 */
.single-image-preview {
    display: block;
}

.image-upload-section.multi-mode .single-image-preview {
    display: none;
}

.image-upload-section.multi-mode .multi-image-preview-grid {
    display: grid !important;
}

.image-upload-section.multi-mode .multi-upload-info {
    display: block !important;
}

/* 兼容原有单图样式 */
.single-image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* 优化移动端显示 */
@media (max-width: 768px) {
    .multi-image-preview-grid {
        /* Slightly smaller thumbnails on small screens */
        --thumb-size: 110px;
        gap: 6px;
    }
    
    .multi-image-preview-grid.two-images {
        grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), var(--thumb-size)));
    }
    
    .upload-stats {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    
    .upload-tip {
        font-size: 10px;
    }

    .inline-edit-mode {
        flex-wrap: wrap;
        gap: 6px;
    }
    .inline-edit-mode .inline-label {
        width: 100%;
        font-size: 11px;
    }
}

/* 多图编辑模式选择样式 */
.edit-mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.edit-mode-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.edit-mode-option:hover {
    border-color: #1890FF;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transform: translateY(-2px);
}

.edit-mode-option.active {
    border-color: #1890FF;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.04) 100%);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.edit-mode-option.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1890FF 0%, #40a9ff 100%);
}

.edit-mode-option i {
    font-size: 20px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.edit-mode-option.active i,
.edit-mode-option:hover i {
    color: #1890FF;
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.option-title {
    font-weight: 600;
    color: #495057;
    font-size: 15px;
    line-height: 1.2;
}

.option-desc {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.edit-mode-option.active .option-title {
    color: #1890FF;
}

.edit-mode-option.active .option-desc {
    color: #1890FF;
    background: rgba(24, 144, 255, 0.15);
}

/* 模式说明文字 */
.mode-explanation {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, rgba(24, 144, 255, 0.02) 100%);
    border-radius: 12px;
    border: 1px solid rgba(24, 144, 255, 0.1);
}

.explanation-text {
    font-size: 13px;
    line-height: 1.5;
    color: #495057;
}

.explanation-text strong {
    color: #1890FF;
    font-weight: 600;
}

/* 编辑模式按钮样式 */
#editModeBtn {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.04) 100%);
    border: 2px solid rgba(24, 144, 255, 0.3);
}

#editModeBtn:hover {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%);
    border-color: #1890FF;
}

#editModeBtn i {
    color: #1890FF;
}

#editModeText {
    color: #1890FF;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .edit-mode-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .edit-mode-option {
        padding: 12px;
        gap: 8px;
    }
    
    .edit-mode-option i {
        font-size: 18px;
    }
    
    .option-title {
        font-size: 14px;
    }
    
    .option-desc {
        font-size: 11px;
    }
    
    .mode-explanation {
        padding: 12px;
    }
    
    .explanation-text {
        font-size: 12px;
    }
}

/* 图片选择弹窗中的模型支持信息样式 */
.model-support-info-panel {
    margin: 12px 0 16px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.support-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 13px;
}

.support-info-item i {
    color: #007bff;
    font-size: 14px;
    flex-shrink: 0;
}

#modelSupportInfoText {
    font-weight: 500;
}



/* TEXT:: 文本结果样式 */
.generated-text {
    background: #fafafa;
    border: 0;
    border-left: 3px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 8px 0;
}

.text-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.text-icon {
    color: #6c757d;
    margin-top: 2px;
    font-size: 16px;
}

.text-content p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
    flex: 1;
    word-wrap: break-word;
}

.text-actions {
    margin-top: 12px;
    text-align: right;
}

/* MIXED:: 混合结果样式（文本+图片） */
.mixed-result {
    background: transparent;
    border: 0;
    border-radius: 12px;
    padding: 0;
    margin: 12px 0;
    box-shadow: none;
}

.mixed-result .generated-text {
    background: #fafafa;
    border: 0;
    border-left: 3px solid #e5e7eb;
    margin: 12px 0 0;
    border-radius: 8px;
}

.mixed-result .generated-image {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
}

.mixed-result .generated-image img {
    border-radius: 8px;
}

/* 历史记录骨架屏样式 */
.history-loading-skeleton {
    padding: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

.skeleton-item {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-button {
    height: 40px;
    width: 100%;
    border-radius: 20px;
}

.skeleton-list {
    margin-top: 16px;
}

.skeleton-history-item {
    height: 60px;
    width: 100%;
    margin-bottom: 8px;
}

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

@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}

/* 历史记录延迟加载过渡效果 */
.history-sidebar {
    transition: opacity 0.3s ease-in-out;
}

/* 🔥 移动端历史侧边栏样式修复 - 已迁移到 universal_history_manager.css 和 Vue 组件 */
@media (max-width: 768px) {
    /* 注释掉旧的样式，现在由 universal_history_manager.css 统一管理 */
    /* .history-sidebar {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - var(--mode-switcher-offset)) !important;
        max-height: calc(100vh - var(--mode-switcher-offset)) !important;
        z-index: 1100 !important;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .history-sidebar.visible {
        display: flex !important;
        transform: translateX(0);
    } */

    /* 历史列表在移动端需要完整高度 */
    .history-list {
        height: calc(100vh - var(--mode-switcher-offset) - 96px) !important;
        min-height: calc(100vh - var(--mode-switcher-offset) - 96px) !important;
        max-height: calc(100vh - var(--mode-switcher-offset) - 96px) !important;
    }

    /* 主内容区域占满宽度 */
    .main-content-wrapper {
        padding-left: 0 !important;
        /* 移动端保持flex布局，只是调整padding */
    }

    .chat-content-area {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* 给消息容器添加底部内边距，避免被输入框遮挡 */
    .messages-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: 150px !important;  /* 给底部输入框留出空间 */
    }

    /* 移动端避免整体右偏：重置媒体模式左右内边距 */
    .messages-container.media-grid-mode {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100%;
    }

    /* 移动端输入框高度调整 */
    .text-input-wrapper textarea {
        min-height: 50px !important;  /* 移动端设置合适高度 */
    }

    /* 移动端参数按钮优化 */
    .params-buttons {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    .param-btn {
        font-size: 12px !important;
        padding: 5px 8px !important;
        min-width: auto !important;
    }

    .param-btn span {
        font-size: 11px !important;
    }

    .param-btn i {
        font-size: 12px !important;
    }
}

.history-content {
    transition: all 0.3s ease-in-out;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 移动端历史记录缩略图放大 - 高权重选择器 */
@media (max-width: 768px) {
    .history-sidebar .history-item .history-thumbnail,
    .history-sidebar .history-item img.history-thumbnail,
    .history-sidebar .history-item video.history-thumbnail {
        width: 96px !important; /* 原来48px，现在96px，大了一倍 */
        height: 96px !important;
        min-width: 96px !important;
        min-height: 96px !important;
        max-width: 96px !important;
        max-height: 96px !important;
    }
    
    /* 移动端历史记录项目调整以适应更大的图片 */
    .history-sidebar .history-item {
        padding: 12px !important; /* 增加内边距 */
    }
    
    /* 移动端骨架屏缩略图也要相应调整 */
    .history-sidebar .skeleton-thumbnail,
    .history-loading-skeleton .skeleton-thumbnail {
        width: 96px !important;
        height: 96px !important;
        min-width: 96px !important;
        min-height: 96px !important;
    }
}

/* 🔥 模式切换器样式 */
.mode-switcher-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    padding: 4px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.mode-switcher {
    display: flex;
    gap: 4px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 26px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.mode-btn:hover {
    background: rgba(0, 123, 255, 0.05);
    color: #333;
}

.mode-btn.active {
    background: #1890FF;
    color: white;
    box-shadow: 0 4px 15px rgba(24, 144, 255, 0.3);
}

.mode-btn i {
    font-size: 16px;
}

/* 视频模式专用按钮样式 */
.param-btn.video-only {
    transition: all 0.3s ease;
}

/* 移动端响应式 - 模式切换器 */
@media (max-width: 768px) {
    .mode-switcher-container {
        top: 60px;
        left: 50%;
        transform: translateX(-50%) scale(0.9);
    }

    .mode-btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    .mode-btn span {
        display: none;
    }

    .mode-btn i {
        font-size: 18px;
    }
}

/* ===== Veo Video Role Enhancements ===== */
.video-role-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(24, 144, 255, 0.08);
    border: 1px solid rgba(24, 144, 255, 0.25);
    color: #1d39c4;
    font-size: 12px;
    line-height: 1.4;
    display: none;
    align-items: center;
    gap: 8px;
}

.video-role-hint i {
    color: #1890FF;
    font-size: 14px;
}

.video-role-hint span {
    flex: 1;
}

@media (max-width: 768px) {
    .referral-invite-banner {
        margin: 16px 0;
        font-size: 14px;
    }

    .multi-image-preview-item .image-role-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .multi-image-preview-item .image-role-selector select {
        width: 100%;
    }

    .video-role-hint {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== 滚动提示样式 ==================== */

/* 滚动提示 - 简洁版（无按钮，用于placeholder模式） */
.scrolling-tips-simple {
    padding: 8px 12px;
    background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #91d5ff;
    font-size: 13px;
    color: #096dd9;
    line-height: 1.4;
    text-align: center;
}

.scrolling-tips-simple span {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 滚动提示 - 完整版（带按钮） */
.scrolling-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f0f9ff, #e6f7ff);
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #91d5ff;
    transition: all 0.3s ease;
}

.scrolling-tips:hover {
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.tip-nav-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #91d5ff;
    background: white;
    color: #1890FF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tip-nav-btn:hover:not(:disabled) {
    background: #1890FF;
    color: white;
    transform: scale(1.1);
}

.tip-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tip-nav-btn i {
    font-size: 12px;
}

.tip-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #096dd9;
    min-height: 24px;
}

.tip-content i {
    color: #faad14;
    font-size: 14px;
    flex-shrink: 0;
}

.tip-content span {
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

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