/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --vh: 1vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1;
}

/* iOS Safari 状态栏区域优化 */
@supports (-webkit-touch-callout: none) {
    body {
        /* 确保iOS Safari状态栏区域颜色正确 */
        background-color: #1a1a2e;
        /* 支持安全区域 */
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* 微信浏览器专用样式 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* 微信浏览器检测 */
    body {
        background-color: #1a1a2e !important;
        color: #ffffff !important;
    }
    
    /* 微信浏览器状态栏区域 */
    html {
        background-color: #1a1a2e !important;
    }
    
    /* 微信浏览器顶部导航栏样式 */
    .header {
        background: #1a1a2e !important;
        border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    }
}

/* 微信浏览器特殊处理 */
body.wechat-browser {
    background-color: #1a1a2e !important;
    color: #ffffff !important;
}

body.wechat-browser html {
    background-color: #1a1a2e !important;
}

/* 顶部导航栏 */
.header {
    background: rgba(10, 14, 22, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.5rem 0; /* 减少上下内边距 */
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 减少logo和文字间距 */
    font-size: 1.2rem; /* 减小整体字体大小 */
    font-weight: 700; /* 更粗的字重 */
    cursor: pointer; /* 添加点击效果 */
    transition: all 0.3s ease; /* 平滑过渡 */
    padding: 0.2rem 0.4rem; /* 减少内边距 */
    border-radius: 6px; /* 减小圆角 */
}

.logo:hover {
    transform: translateY(-1px); /* 悬停上移效果 */
    background: rgba(16, 185, 129, 0.08); /* 悬停背景 */
}

.logo-icon {
    width: 1.5rem; /* 减小logo图标尺寸 */
    height: 1.5rem; /* 减小logo图标尺寸 */
    object-fit: contain; /* 保持比例 */
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(16, 185, 129, 0.3)); /* 减小阴影效果 */
}

.logo:hover .logo-icon {
    transform: scale(1.05); /* 轻微放大 */
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.4)); /* 增强阴影 */
}

.logo-text { 
    color: #10B981; 
    font-size: 1.1rem; /* 进一步减小文字大小 */
    font-weight: 700;
    letter-spacing: 0.3px; /* 减少字间距 */
    text-shadow: 0 1px 2px rgba(16, 185, 129, 0.3); /* 添加文字阴影 */
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; /* 优化中文字体 */
}

.logo:hover .logo-text {
    color: #00ff88; /* 悬停时更亮的绿色 */
    text-shadow: 0 2px 4px rgba(0, 255, 136, 0.4); /* 增强阴影 */
}

.menu-icon {
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-icon:hover {
    color: #00ff88;
}

/* 顶部 注册/登录 按钮 */
.auth-btn {
    background: linear-gradient(45deg, #00ff88, #10B981);
    color: #000;
    border: none;
    padding: 0.4rem 0.8rem; /* 减少内边距 */
    border-radius: 8px; /* 减小圆角 */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem; /* 减小字体大小 */
}
.auth-btn:hover { opacity: .9; }

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
    min-height: calc(100vh - 120px);
    position: relative;
}

/* 移动端页面标题 */
.page-header.mobile-header {
    text-align: center;
    margin: 0.5rem auto 1rem;
    max-width: 820px;
    display: block;
}

/* 桌面端页面标题 - 默认隐藏 */
.page-header.desktop-header {
    display: none;
}

/* 主布局 - 左右分栏 */
.main-layout {
    display: flex;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: stretch; /* 拉伸对齐，确保高度一致 */
    height: calc(100vh - 200px); /* 固定高度，考虑头部和移动端标题 */
}

/* 桌面端：右侧主操作区域布局调整 */
@media (min-width: 1025px) {
    /* 隐藏移动端标题 */
    .page-header.mobile-header {
        display: none !important;
    }
    
    .main-operations {
        display: flex;
        flex-direction: column;
        gap: 0.5rem; /* 减少间距，与左侧提示词区域保持一致 */
        flex: 1; /* 占据剩余空间 */
        min-width: 0; /* 允许收缩 */
        height: 100%; /* 继承父容器高度 */
    }
    
    /* 桌面端Banner模块样式 */
    .banner-module.desktop-banner {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.05));
        border: 1px solid rgba(16, 185, 129, 0.2);
        border-radius: 12px;
        padding: 1.5rem;
        margin-bottom: 0.5rem;
        position: relative;
        overflow: hidden;
        flex-shrink: 0; /* 防止被压缩 */
        min-height: 120px; /* 确保最小高度 */
        display: flex;
        align-items: center; /* 垂直居中 */
    }
    
    .banner-content {
        text-align: center;
        width: 100%; /* 占满容器宽度 */
    }
    
    .banner-title {
        font-size: 1.4rem;
        font-weight: 800;
        background: linear-gradient(45deg, #10B981, #059669);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
        color: #9ca3af;
        line-height: 1.4;
    }
    
    /* 图片任务操作区样式 */
    .main-operations .input-card {
        flex: 1; /* 占据剩余空间 */
        min-height: 0; /* 允许收缩 */
        display: flex;
        flex-direction: column;
        overflow: hidden; /* 防止内容溢出 */
    }
    
    /* 桌面端：生成按钮推到底部，与左侧按钮对齐 */
    .main-operations .generate-btn {
        margin-top: auto;
        margin-bottom: 1rem; /* 确保按钮与容器底部有距离 */
        height: 3.2rem; /* 与左侧按钮高度保持同步 */
        padding: 0.8rem 1.5rem; /* 调整内边距以适应新的高度 */
        flex-shrink: 0; /* 防止按钮被压缩 */
    }
    
    /* 桌面端：提示词输入区域优化 */
    .main-operations .prompt-input {
        flex: 1; /* 占据剩余空间 */
        min-height: 0; /* 允许收缩 */
        display: flex;
        flex-direction: column;
        overflow: visible; /* 允许内容可见，支持伸缩 */
    }
    
    .main-operations .prompt-wrapper {
        flex: 1; /* 占据剩余空间 */
        min-height: 0; /* 允许收缩 */
        display: flex;
        flex-direction: column;
    }
    
    .main-operations .prompt-textarea-wrap {
        flex: 1; /* 占据剩余空间 */
        min-height: 0; /* 允许收缩 */
        display: flex;
        flex-direction: column;
    }
    
    /* 桌面端：移除右侧卡片的底部边距，实现底部对齐 */
    .main-operations .input-card {
        margin-bottom: 0;
    }
    
    /* 桌面端：提示词文本区域基础样式 */
    .prompt-textarea {
        width: 100%;
        background: rgba(13, 17, 23, 0.8);
        border: 1px solid rgba(16, 185, 129, 0.15);
        border-radius: 12px;
        padding: 1rem;
        padding-right: 120px; /* 为浮动按钮留出空间 */
        color: #E5E7EB;
        font-size: 1rem; /* 16px 基准，跨端清晰 */
        line-height: 1.6;
        letter-spacing: .2px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
        caret-color: #10B981;
        resize: vertical; /* 允许垂直伸缩 */
        transition: all 0.2s ease;
        overflow-y: auto; /* 超出时显示滚动条 */
        
        /* 滚动条样式 */
        scrollbar-width: thin;
        scrollbar-color: rgba(16, 185, 129, 0.3) rgba(255, 255, 255, 0.1);
    }
    
    /* 不同模式的提示词框高度适配 */
    
    /* 图像编辑模式 - 需要详细描述修改要求 */
    .prompt-textarea[data-mode="image_edit"] {
        min-height: 100px;
        max-height: 180px;
    }
    
    /* 文生图模式 - 需要详细描述生成内容，为底部选项预留空间 */
    .prompt-textarea[data-mode="text_to_image"] {
        min-height: 220px; /* 进一步增加高度 */
        max-height: 400px;
        padding-bottom: 60px; /* 减少预留空间，因为设置区域变小了 */
    }
    
    /* 图生视频模式 - 需要描述视频效果和动作 */
    .prompt-textarea[data-mode="image_to_video"] {
        min-height: 140px;
        max-height: 280px;
    }
    
    /* AI数字人模式 - 需要描述数字人外观和行为 */
    .prompt-textarea[data-mode="digital_human"] {
        min-height: 140px;
        max-height: 280px;
    }
    
    /* 默认模式（兼容性） */
    .prompt-textarea:not([data-mode]) {
        min-height: 120px;
        max-height: 220px;
    }
    
    /* 浮动跟随式生成按钮 - 桌面端 */
    .prompt-textarea-wrap {
        position: relative;
    }
    
    .generate-btn-floating {
        position: absolute;
        bottom: 0.8rem;
        right: 0.8rem;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 10;
        background: linear-gradient(135deg, #10B981, #059669);
        border: none;
        border-radius: 8px;
        color: white;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        display: flex;
        align-items: center;
        gap: 0.3rem;
        /* 添加轻微的内边距，避免与文本重叠 */
        min-width: 100px;
        text-align: center;
        /* 确保按钮在文本区域内有足够空间显示 */
        max-width: calc(100% - 1.6rem);
    }
    
    /* 当用户开始输入时显示按钮 */
    .prompt-textarea:focus + .prompt-controls + .generate-btn-floating,
    .prompt-textarea:not(:placeholder-shown) + .prompt-controls + .generate-btn-floating {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* 当文本区域高度较小时，调整按钮位置 */
    .prompt-textarea[style*="height: 120px"] + .prompt-controls + .generate-btn-floating,
    .prompt-textarea[style*="height: 100px"] + .prompt-controls + .generate-btn-floating {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    /* 首次显示时的引导动画 */
    .generate-btn-floating.show-hint {
        animation: buttonHint 0.6s ease-out;
    }
    
    @keyframes buttonHint {
        0% {
            opacity: 0;
            transform: translateY(10px) scale(0.8);
        }
        50% {
            opacity: 1;
            transform: translateY(-2px) scale(1.05);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    .generate-btn-floating:hover {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }
    
    .generate-btn-floating:active {
        transform: translateY(0);
    }
    
    /* 重复的Banner样式已移除 */
}

/* 移动端样式已移至 mobile-layout.css */

/* 提示词专区样式已移至独立文件 */
/* 桌面端样式：templates-sidebar-desktop.css */
/* 移动端样式：templates-sidebar-mobile.css */


/* 移动端样式已移至 mobile-layout.css */

/* 移动端响应式样式已移至 mobile-layout.css */

/* 桌面端保持原有设计 */
@media (min-width: 769px) {
    .bottom-nav-mobile {
        display: none;
    }
    
    .top-nav {
        display: flex;
    }
    
    /* 桌面端导航菜单字体优化 */
    .top-nav .nav-item span {
        font-size: 1.1rem; /* 桌面端导航文字更大 */
        font-weight: 700; /* 桌面端更粗的字重 */
        letter-spacing: 0.3px; /* 桌面端增加字间距 */
    }
    
    .top-nav .nav-item i {
        font-size: 1.1rem; /* 桌面端图标稍大 */
    }
    
    /* 桌面端激活状态字体优化 */
    .top-nav .nav-item.active span {
        font-size: 1.1rem !important; /* 确保激活状态字体大小一致 */
        font-weight: 700 !important; /* 确保激活状态字重一致 */
        letter-spacing: 0.3px !important; /* 确保激活状态字间距一致 */
    }
    
    /* 桌面端logo优化 */
    .logo {
        font-size: 1.3rem; /* 桌面端适中大小 */
    }
    
    .logo-icon {
        width: 1.8rem; /* 桌面端图标适中 */
        height: 1.8rem;
    }
    
    .logo-text {
        font-size: 1.2rem; /* 桌面端文字适中 */
        font-weight: 800; /* 桌面端更粗的字重 */
        letter-spacing: 0.5px; /* 桌面端增加字间距 */
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .logo {
        font-size: 1.4rem; /* 大屏幕适中 */
        gap: 0.6rem; /* 适中间距 */
    }
    
    .logo-icon {
        width: 2rem; /* 大屏幕图标适中 */
        height: 2rem;
    }
    
    .logo-text {
        font-size: 1.3rem; /* 大屏幕文字适中 */
        font-weight: 800; /* 大屏幕更粗的字重 */
        letter-spacing: 0.6px; /* 大屏幕增加字间距 */
    }
    
    /* 大屏幕导航菜单字体优化 */
    .top-nav .nav-item span {
        font-size: 1.2rem; /* 大屏幕导航文字更大 */
        font-weight: 700; /* 大屏幕更粗的字重 */
        letter-spacing: 0.4px; /* 大屏幕增加字间距 */
    }
    
    .top-nav .nav-item i {
        font-size: 1.2rem; /* 大屏幕图标更大 */
    }
    
    /* 大屏幕激活状态字体优化 */
    .top-nav .nav-item.active span {
        font-size: 1.2rem !important; /* 确保激活状态字体大小一致 */
        font-weight: 700 !important; /* 确保激活状态字重一致 */
        letter-spacing: 0.4px !important; /* 确保激活状态字间距一致 */
    }
}

/* 右侧：主操作区域 */
.main-operations {
    flex: 1;
    min-width: 0;
}

/* 文生图专用设置区域 - 在提示词框底部一行显示 */
.text2image-settings {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    background: transparent; /* 去掉背景 */
    border: none; /* 去掉边框 */
    z-index: 10;
    height: 50px;
    display: flex;
    align-items: center;
}

.settings-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.setting-group {
    flex: 0 0 auto;
    min-width: 0;
}

.setting-group label {
    display: none; /* 隐藏标签 */
}

.aspect-ratio-select,
.style-preset-select {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 500;
    color: #E5E7EB;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 0.8rem;
    padding-right: 1.8rem;
    min-width: 100px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.aspect-ratio-select:focus,
.style-preset-select:focus {
    outline: none;
    border-color: #10B981;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 
        0 0 0 2px rgba(16, 185, 129, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.aspect-ratio-select:hover,
.style-preset-select:hover {
    border-color: #10B981;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 下拉选项样式优化 - 使用更具体的选择器 */
.prompt-textarea-wrap .aspect-ratio-select option,
.prompt-textarea-wrap .style-preset-select option {
    background: #1f2937 !important; /* 深色背景 */
    color: #E5E7EB !important; /* 浅色文字 */
    padding: 0.5rem;
    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.prompt-textarea-wrap .aspect-ratio-select option:hover,
.prompt-textarea-wrap .style-preset-select option:hover {
    background: #374151 !important; /* 悬停时的深灰色背景 */
    color: #10B981 !important; /* 悬停时的绿色文字 */
}

.prompt-textarea-wrap .aspect-ratio-select option:checked,
.prompt-textarea-wrap .style-preset-select option:checked {
    background: #10B981 !important; /* 选中时的绿色背景 */
    color: white !important; /* 选中时的白色文字 */
}

/* 强制覆盖浏览器默认样式 */
.prompt-textarea-wrap .aspect-ratio-select option:focus,
.prompt-textarea-wrap .style-preset-select option:focus {
    background: #374151 !important;
    color: #10B981 !important;
}

.prompt-textarea-wrap .aspect-ratio-select option:active,
.prompt-textarea-wrap .style-preset-select option:active {
    background: #10B981 !important;
    color: white !important;
}

/* 针对不同浏览器的额外覆盖 */
.prompt-textarea-wrap .aspect-ratio-select option::-moz-focus-inner,
.prompt-textarea-wrap .style-preset-select option::-moz-focus-inner {
    background: #374151 !important;
    color: #10B981 !important;
}

/* Webkit 浏览器特殊处理 */
.prompt-textarea-wrap .aspect-ratio-select option::-webkit-option,
.prompt-textarea-wrap .style-preset-select option::-webkit-option {
    background: #1f2937 !important;
    color: #E5E7EB !important;
}

/* 强制覆盖所有可能的蓝色样式 */
.prompt-textarea-wrap .aspect-ratio-select,
.prompt-textarea-wrap .style-preset-select {
    color-scheme: dark !important;
}

.prompt-textarea-wrap .aspect-ratio-select option,
.prompt-textarea-wrap .style-preset-select option {
    background-color: #1f2937 !important;
    color: #E5E7EB !important;
    border: none !important;
    outline: none !important;
}

.prompt-textarea-wrap .aspect-ratio-select option:hover,
.prompt-textarea-wrap .style-preset-select option:hover {
    background-color: #374151 !important;
    color: #10B981 !important;
}

.prompt-textarea-wrap .aspect-ratio-select option:focus,
.prompt-textarea-wrap .style-preset-select option:focus {
    background-color: #374151 !important;
    color: #10B981 !important;
}

.prompt-textarea-wrap .aspect-ratio-select option:active,
.prompt-textarea-wrap .style-preset-select option:active {
    background-color: #10B981 !important;
    color: white !important;
}

/* 文生图生成控制区域 - 在设置区域右侧 */
.text2image-controls {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.5rem 0.75rem; /* 减少上下内边距 */
    background: transparent;
    z-index: 11;
    height: 50px; /* 与设置区域高度一致 */
    display: flex;
    align-items: center;
}

/* 图像编辑生成控制区域 - 与文生图样式保持一致 */
.image-edit-controls {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.5rem 0.75rem; /* 减少上下内边距 */
    background: transparent;
    z-index: 11;
    height: 50px; /* 与设置区域高度一致 */
    display: flex;
    align-items: center;
}

/* 图生视频设置区域 */
.image2video-settings {
	margin-top: .5rem;
	display: block;
}

/* 视频信息展示 */
.settings-info {
	display: flex;
	gap: .75rem;
	align-items: center;
	flex-wrap: wrap;
	margin: .5rem 0 .25rem;
}

.info-item {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: #9CA3AF;
	font-size: .9rem;
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 8px;
	padding: .35rem .6rem;
}

.info-item i { color:#10B981; }

/* 图生视频 - 顶部开关行 */
.i2v-toggle-row {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin-bottom: .75rem;
}

.i2v-switch {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	cursor: pointer;
}
.i2v-switch input { display:none; }
.i2v-slider {
	position: relative;
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: rgba(255,255,255,.15);
	border: 1px solid rgba(255,255,255,.2);
	transition: all .2s ease;
}
.i2v-slider::after {
	content: '';
	position: absolute;
	left: 2px;
	top: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s ease;
}
.i2v-switch input:checked + .i2v-slider {
	background: rgba(16,185,129,.35);
	border-color: rgba(16,185,129,.6);
}
.i2v-switch input:checked + .i2v-slider::after { transform: translateX(18px); }
.i2v-label { color:#10B981; font-weight:700; font-size:.95rem; }

/* 图生视频 - 双上传卡片 */
.i2v-upload-row {
    display: flex;
    gap: .75rem;
    flex-wrap: nowrap;
    margin-bottom: .5rem;
}

.i2v-upload-card {
	position: relative;
	background: transparent;
	border: none;
	border-radius: 12px;
	padding: 0;
    flex: 1 1 0;
    min-width: 0;
    height: 120px;
    overflow: hidden;
}

/* 当有图片预览时，隐藏上传区域 */
.i2v-upload-card.has-preview .i2v-upload-drop {
    display: none;
}

/* 当有图片预览时，给卡片添加边框 */
.i2v-upload-card.has-preview {
    background: rgba(16,185,129,.06);
    border: 2px dashed rgba(16,185,129,.45);
    border-radius: 12px;
    padding: 0;
}

/* 图片预览删除按钮 */
.i2v-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    transition: all 0.2s ease;
}

.i2v-preview-remove:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

.i2v-upload-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .35rem;
	width: 100%;
	height: 100%;
	background: rgba(16,185,129,.06);
	border: 2px dashed rgba(16,185,129,.45);
	border-radius: 12px;
	cursor: pointer;
	transition: all .2s ease;
}
.i2v-upload-drop:hover { background: rgba(16,185,129,.12); border-color:#10B981; }
.i2v-plus { font-size: 22px; color:#10B981; line-height:1; }
.i2v-title { color:#E5E7EB; font-weight:600; font-size:.95rem; }
.i2v-hint { color:#9CA3AF; font-size:.75rem; text-align:center; line-height:1.3; }
.i2v-preview { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 10px; 
    object-fit: contain;
    object-position: center;
    z-index: 1;
}
@media (max-width: 768px) {
    /* 统一移动端与桌面上传样式：保持双卡片横向排列与高度一致 */
    .i2v-upload-row { 
        flex-direction: row;
        gap: .75rem;
    }
    .i2v-upload-card { 
        flex: 1 1 0;
        height: 120px;
        width: auto;
    }
    .i2v-upload-drop { height: 100%; }
    
    /* 移动端图生视频提示词区域调整 */
    .i2v-prompt-grid {
        grid-template-columns: 1fr;
        gap: .5rem;
    }
    
    /* 移动端图生视频设置区域调整 */
    .image2video-settings {
        padding: .5rem;
        margin: .4rem 0;
    }
    
    /* 移动端图生视频控制区域调整 */
    .image2video-controls {
        padding: .5rem;
        margin: .4rem 0;
    }
    
    /* 移动端图生视频操作按钮调整 - 水平布局 */
    .i2v-actions {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .i2v-right-box {
        flex-direction: row;
        gap: .4rem;
        align-items: center;
        flex: 1;
        justify-content: flex-end;
    }
    
    .i2v-count-label {
        display: none; /* 移动端隐藏标签，节省空间 */
    }
    
    .i2v-count-select {
        width: auto;
        min-width: 56px;
        padding: .25rem .45rem;
        font-size: .85rem;
        flex-shrink: 0;
    }
    
    .i2v-credit-pill {
        flex-shrink: 0;
        white-space: nowrap;
        padding: .15rem .4rem;
        font-size: .82rem;
    }
    
    .generate-btn-icon {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
    }

    /* 更紧凑的行距与段落间距 */
    .i2v-toggle-row { margin-bottom: .4rem; }
    .i2v-negative-row { margin-top: .3rem; }
    .i2v-prompt-section { margin-top: .3rem; }
    .i2v-textarea { min-height: 110px; padding: .65rem 1.8rem .65rem .65rem; line-height: 1.6; font-size: 1rem; }

    /* 修复：移动端 I2V 卡片底部被裁切，无法完全滑出 */
    .main-operations .input-card {
        overflow: visible; /* 允许内部底部内容正常显示 */
        background-clip: padding-box;
        margin-bottom: 1rem; /* 与底部导航保持间距 */
    }

    /* 为图生视频底部控制区预留安全距离，避免被固定底部导航遮挡 */
    #image2videoControls,
    .image2video-controls {
        margin-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }
}

/* 单框模式：拉成长扁矩形 */
.i2v-upload-row.single .i2v-upload-card { flex: 1 1 100%; }
.i2v-upload-row.single .i2v-upload-drop { height: 120px; }
.i2v-prompt-grid { display:grid; grid-template-columns: 1fr 1fr; gap:.75rem; margin-top:.5rem; }
@media (max-width: 768px) { .i2v-prompt-grid { grid-template-columns: 1fr; } }

/* 信息与负面提示词行排版微调 */
.i2v-info-inline { margin-top: .25rem; }
.i2v-negative-row { margin-top: .5rem; }

/* I2V 提示词与负面词样式 */
.i2v-prompt-section { margin-top: .5rem; }
.i2v-textarea {
	width: 100%;
	background: rgba(13,17,23,.8);
	border: 1px solid rgba(16,185,129,.15);
	border-radius: 12px;
	padding: .9rem 2.2rem .9rem .9rem;
	color: #E5E7EB;
	font-size: 1rem; /* 与 .prompt-textarea 保持一致 */
	line-height: 1.6;
	letter-spacing: .2px; /* 与 .prompt-textarea 保持一致 */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; /* 与 .prompt-textarea 保持一致 */
	caret-color: #10B981; /* 与 .prompt-textarea 保持一致 */
	resize: vertical;
	min-height: 140px;
	/* 滚动条样式与其他Tab一致 */
	scrollbar-width: thin;
	scrollbar-color: rgba(16, 185, 129, 0.4) rgba(255, 255, 255, 0.1);
}
.i2v-textarea::-webkit-scrollbar { width: 6px; }
.i2v-textarea::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.i2v-textarea::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.4); border-radius: 3px; transition: background .2s ease; }
.i2v-textarea::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, 0.6); }
.i2v-textarea::placeholder { color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.i2v-char { 
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: #6b7280; 
    font-size: .75rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* 标签样式对齐其他Tab */
.i2v-prompt-grid .setting-label { color:#10B981; font-weight:700; display:block; margin-bottom:.4rem; }

/* 聚焦态对齐其他Tab */
.i2v-textarea:focus {
	outline: none;
	border-color: #10B981;
	box-shadow: 0 0 0 3px rgba(16,185,129,.18);
	background: rgba(17,24,39,.85);
}

/* 图生视频 - 底部操作区域 */
.i2v-actions {
	display: flex;
    align-items: center;
    justify-content: flex-end; /* 按钮整体靠右 */
    gap: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.i2v-generate-btn {
	background: rgba(16,185,129,.15);
	border: 1px solid rgba(16,185,129,.35);
	color: #10B981;
	border-radius: 10px;
	padding: .6rem 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: all .2s ease;
}
.i2v-generate-btn:hover { background: rgba(16,185,129,.22); border-color:#10B981; }
.i2v-right-box { display:flex; align-items:center; gap:.75rem; }
.i2v-count-label { color:#10B981; font-weight:700; font-size:.95rem; }
.i2v-count-select {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.7);
    color: #E5E7EB;
    font-size: 0.9rem;
}
.i2v-count-select:focus { outline:none; border-color:#10B981; box-shadow:0 0 0 2px rgba(16,185,129,.2); }
.i2v-credit-pill {
	color:#10B981;
	background: rgba(16,185,129,.12);
	border: 1px solid rgba(16,185,129,.35);
	border-radius: 999px;
	padding: .25rem .5rem;
	font-size: .85rem;
	font-weight: 700;
}

/* 图生视频生成控制区域 - 与文生图样式保持一致 */
.image2video-controls { margin-top: .25rem; }

.control-row {
    display: flex;
    align-items: center;
    gap: 1rem; /* 增加间距，为圆形按钮留出更多空间 */
}

.credit-info {
    display: flex;
    align-items: center;
}

.credit-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(8px); /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(8px);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.generate-actions {
    display: flex;
    align-items: center;
}

.generate-btn-icon {
    width: 32px; /* 减小按钮尺寸，更加合适 */
    height: 32px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%; /* 圆形按钮 */
    background: rgba(16, 185, 129, 0.1); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(10px);
    color: #10B981;
    font-size: 0.9rem; /* 相应减小图标大小 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1); /* 内发光效果 */
    position: relative;
    overflow: hidden;
}

.generate-btn-icon:hover {
    background: rgba(16, 185, 129, 0.2); /* 悬停时增强背景透明度 */
    border-color: rgba(16, 185, 129, 0.5);
    color: #10B981;
    transform: translateY(-2px) scale(1.1); /* 圆形按钮可以稍微放大更多 */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.generate-btn-icon:active {
    transform: translateY(-1px) scale(1.05); /* 圆形按钮的激活状态 */
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 
        0 3px 12px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 添加发光效果 */
.generate-btn-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%); /* 圆形发光效果 */
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%; /* 圆形发光 */
}

.generate-btn-icon:hover::before {
    opacity: 1;
}

/* 移动端设置区域适配 */
@media (max-width: 768px) {
    .settings-row {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .setting-group {
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .text2image-settings {
        padding: 0.4rem 0.5rem;
        background: transparent; /* 移动端也去掉背景 */
        border: none; /* 移动端也去掉边框 */
        height: 45px;
    }
    
    .text2image-controls {
        padding: 0.4rem 0.5rem; /* 减少移动端内边距 */
        right: 0.5rem;
        height: 45px; /* 减少移动端高度 */
    }
    
    .image-edit-controls {
        padding: 0.4rem 0.5rem; /* 减少移动端内边距 */
        right: 0.5rem;
        height: 45px; /* 减少移动端高度 */
    }
    
    .image2video-settings {}
    .image2video-controls {}
    
    .aspect-ratio-select,
    .style-preset-select {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        padding-right: 1.6rem;
        border-radius: 6px;
        min-width: 90px;
        background: rgba(13, 17, 23, 0.6);
        border: 1px solid rgba(16, 185, 129, 0.3);
        backdrop-filter: blur(8px); /* 移动端毛玻璃效果 */
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 
            0 2px 6px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    
    .control-row {
        flex-direction: row;
        gap: 0.75rem; /* 移动端也增加间距 */
        align-items: center;
    }
    
    .credit-text {
        font-size: 0.7rem; /* 减少移动端字体 */
    }
    
    .generate-btn-icon {
        width: 30px; /* 移动端圆形按钮尺寸，更加合适 */
        height: 30px;
        font-size: 0.85rem; /* 移动端图标大小，相应调整 */
        border-radius: 50%; /* 移动端也是圆形 */
        backdrop-filter: blur(8px); /* 移动端稍小的模糊效果 */
        -webkit-backdrop-filter: blur(8px);
    }
    
                /* 移动端文生图模式高度调整 */
                .prompt-textarea[data-mode="text_to_image"] {
                    min-height: 180px; /* 增加移动端高度 */
                    max-height: 300px;
                    padding-bottom: 55px; /* 减少移动端预留空间 */
                }
}

/* 移动端布局样式已移至 mobile-layout.css */

/* 移动端响应式 */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 1rem;
    }
    /* 提示词模板侧边栏样式已移至独立文件 */
}

/* 移动端响应式样式已移至 mobile-layout.css */

/* 首页标语（放在框外顶部） */
.hero-tagline { padding: .25rem 1rem .25rem; }
.hero-title {
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    font-weight: 800;
    background: linear-gradient(45deg, #10B981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.25;
}
.hero-subtitle {
    margin-top: .25rem;
    font-size: clamp(.9rem, 2.8vw, 1.05rem);
    color: #9CA3AF;
    line-height: 1.45;
}

.page-subtitle {
    font-size: clamp(0.88rem, 3.2vw, 1rem); /* 与标题形成更稳定的层级 */
    color: #cccccc;
    opacity: 0.9;
    line-height: 1.35;
    white-space: nowrap; /* 强制单行，通过字体缩放适配 */
}

/* 标题自适应：手机、平板、超宽屏 */
/* 细节微调断点（可按需继续优化） */
@media (max-width: 360px) {
    .page-title { letter-spacing: .1px; }
}

/* 卡片样式 */
.config-card, .input-card, .output-card, .status-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(34, 211, 238, 0.20);
    border-radius: 16px;
    padding: 1rem; /* 进一步减小内边距 */
    margin-bottom: 0.75rem; /* 减小卡片间距 */
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.config-card:hover, .input-card:hover, .output-card:hover, .status-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(34, 211, 238, 0.28);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem; /* 减小头部间距 */
    font-size: 1rem; /* 减小头部字体 */
    font-weight: 600;
}

/* 输入卡片中空的card-header不占位，避免与Tabs之间过大间距 */
.input-card > .card-header:empty { display:none; margin:0; padding:0; }

.blinking {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* API配置区域 */
.config-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-group label {
    font-weight: 600;
    color: #FFD700;
}

.config-select, .config-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.8rem;
    color: #ffffff;
    font-size: 1rem;
}

.config-select:focus, .config-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* 功能切换标签 */
.tab-container {
    display: grid; /* 使用网格布局 */
    grid-template-columns: repeat(3, 1fr); /* 3列等宽布局 */
    gap: 0.5rem; /* 减少标签间距 */
    margin-top: 0; /* 贴近上方 */
    margin-bottom: 0.9rem; /* 稍微收紧下方间距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    position: relative;
    padding: 0.6rem 0.4rem; /* 调整内边距适应网格布局 */
    cursor: pointer;
    color: #cccccc;
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column; /* 垂直布局 */
    align-items: center;
    gap: 0.25rem; /* 减小图标和文字间距 */
    text-align: center; /* 文字居中 */
    min-height: 60px; /* 设置最小高度 */
    justify-content: center; /* 垂直居中 */
    border-radius: 6px; /* 圆角 */
    font-size: 0.8rem; /* 减小字体适应更多内容 */
    font-weight: 500;
}

.tab i {
    font-size: 0.9rem; /* 减小图标大小适应网格布局 */
    transition: color 0.3s ease;
}

.tab.active {
    color: #FFD700;
}

.tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #FFD700;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab.active .tab-indicator {
    opacity: 1;
}


/* 开发中提示区域 */
.development-section {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
}

.development-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.development-icon {
    font-size: 3rem;
    color: #10B981;
    margin-bottom: 0.5rem;
    animation: pulse 2s infinite;
}

.development-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10B981;
    margin: 0;
}

.development-desc {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
}

.development-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 60%;
    background: linear-gradient(90deg, #10B981, #3B82F6);
    border-radius: 4px;
    animation: progress-animation 2s ease-in-out infinite;
}

.progress-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes progress-animation {
    0% { width: 0%; }
    100% { width: 60%; }
}

/* 上传区域 */
.upload-section {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    width: 100%; /* 确保不超出父容器 */
    max-width: 100%; /* 限制最大宽度 */
    overflow: hidden; /* 防止内容溢出 */
    box-sizing: border-box; /* 包含内边距在宽度计算中 */
}

.upload-section h3 { 
    margin-bottom: 1rem; 
    color: #10B981; 
    font-weight: 700; 
    position: relative; 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    white-space: nowrap; 
    font-size: 1.1rem; 
}

.upload-section .title-desc { 
    color: #8AA3A1; 
    font-size: 0.9rem; 
    margin: 0; 
    font-weight: 400;
    flex: 1;
}

.image-count { 
    color: #10B981; 
    margin-left: auto; 
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.upload-area {
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    padding: 1.5rem 1rem; /* 减小上传区域内边距 */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 215, 0, 0.05);
}

.upload-area:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 3rem;
    color: #10B981;
    margin-bottom: 1rem;
    display: block;
}

.upload-area p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: #999999;
    font-size: 0.9rem;
}

/* 网页端上传网格布局 */
.desktop-upload-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem; /* 减少间距，节省空间 */
    margin-top: 0.5rem;
    width: 100%; /* 确保不超出容器宽度 */
    max-width: 100%; /* 限制最大宽度 */
    overflow: hidden; /* 防止溢出 */
}

/* 网页端上传区域样式 */
.desktop-upload-area {
    border: 2px dashed rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 0.8rem 0.3rem; /* 调整内边距，为文字留出更多空间 */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(16, 185, 129, 0.03);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 120px;
    height: 120px; /* 增加高度确保文字正常显示 */
    min-width: 0; /* 允许收缩 */
    overflow: hidden; /* 防止内容溢出 */
}

.desktop-upload-area:hover {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.desktop-upload-area i {
    font-size: 1.8rem;
    color: #10B981;
    margin-bottom: 0.4rem;
    display: block;
}

.desktop-upload-area p {
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: #e5e7eb;
    font-weight: 500;
}

.desktop-upload-hint {
    color: #9ca3af;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 网页端虚拟上传槽位 */
.desktop-upload-slot {
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    min-height: 120px;
    height: 120px; /* 增加高度与上传区域保持一致 */
    min-width: 0; /* 允许收缩 */
    overflow: hidden; /* 防止内容溢出 */
}

.desktop-upload-slot.occupied {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
    border-style: solid;
}

.upload-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* 桌面端槽位图片样式 */
.desktop-upload-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.upload-slot .remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.upload-slot:hover .remove-image {
    opacity: 1;
    transform: scale(1.05);
}

/* 桌面端删除按钮样式 */
.desktop-upload-slot .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.desktop-upload-slot:hover .remove-image {
    opacity: 1;
    transform: scale(1.05);
}

/* 默认隐藏移动端上传区域 */
.mobile-upload-section {
    display: none;
}

/* 移动端上传区域样式已移至 mobile-layout.css */

@media (max-width: 480px) {
    .upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

.uploaded-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #FFD700;
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uploaded-image .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

.upload-notice {
    margin-top: 1rem;
    padding: 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #FFD700;
}

.upload-notice i {
    color: #FFD700;
    flex-shrink: 0;
}

/* 提示词输入框 */
.prompt-input {
    margin-bottom: 1.25rem; /* 减小提示词下方间距 */
}

.prompt-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #FFD700;
}
/* 行内提示词标题+hint */
.prompt-label-row { display:flex; align-items: baseline; gap:.75rem; margin-bottom:.5rem; }
.prompt-label-row label { margin:0; font-weight:700; color:#10B981; }
.prompt-hint-inline { color:#8aa3a1; font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.prompt-wrapper { display:flex; gap:1rem; align-items: stretch; position: relative; }
.prompt-textarea-wrap { position: relative; flex: 1; overflow: hidden; }
.prompt-controls { position:absolute; top:8px; right:8px; display:flex; align-items:center; justify-content:center; z-index: 2; }
.prompt-controls .field-clear-btn { margin: 0; }
/* 清空按钮默认隐藏，仅在有内容时显示 */
.prompt-controls { opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.prompt-controls.visible { opacity: 1; visibility: visible; }

/* 当显示清空按钮时，给文本留出空间避免遮挡 */
.prompt-textarea-wrap.has-clear .prompt-textarea { padding-right: 40px; }
.prompt-side { width: 260px; display:flex; flex-direction: column; gap:.5rem; }
.prompt-side .suggest-btn { width: 100%; justify-content: center; }
.prompt-side .suggest-hint { margin: 0; }

/* 桌面端提示词文本区域样式已移至媒体查询中 */

/* 提示词文本区域滚动条样式 */
.prompt-textarea::-webkit-scrollbar {
    width: 6px;
}

.prompt-textarea::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.prompt-textarea::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.4);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.prompt-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.6);
}

.prompt-textarea:focus {
    outline: none;
    border-color: #10B981; /* 统一使用主绿色 */
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
    background: rgba(17, 24, 39, 0.85);
}

.prompt-textarea::placeholder { color: #9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.prompt-textarea::-webkit-input-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.prompt-textarea::-moz-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.prompt-textarea:-ms-input-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }

/* 统一 I2V 文本域的占位符与其他 Tab */
.i2v-textarea::-webkit-input-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.i2v-textarea::-moz-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }
.i2v-textarea:-ms-input-placeholder{ color:#9CA3AF; font-family: inherit; font-size: .9rem; line-height: inherit; font-weight: 400; letter-spacing: .15px; }

/* 选中文本的可读配色 */
.prompt-textarea::selection { background: rgba(52,211,153,0.25); color: #fff; }

/* 提示词标签与行内提示的排版与色阶 */
.prompt-label-row { display:flex; align-items: baseline; gap:.75rem; margin-bottom:.5rem; }
.prompt-label-row label { margin:0; font-weight:700; color:#10B981; }
.prompt-hint-inline { color:#8AA3A1; font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 立即生成按钮 */
.generate-btn {
    width: 100%;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem; /* 减小按钮内边距 */
    color: #000000;
    font-size: 1.1rem; /* 稍微减小字体 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 新的视觉禁用与忙碌状态（不使用原生disabled避免点击无响应体验） */
.generate-btn.btn-disabled:not(.busy) {
    opacity: 0.6;
    cursor: not-allowed;
}
.generate-btn.busy {
    opacity: 0.9;
    cursor: progress;
}


/* 状态卡片 */
.status-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

.status-item {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.status-label {
    color: #FFD700;
    font-weight: bold;
}

.status-value {
    color: #ffffff;
    margin-left: 0.5rem;
}

/* 生成提示按钮 */
/* 移除独立的提示词建议区（已并入侧边） */
.prompt-suggestion { display:none; }

.suggest-btn {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1rem 2rem;
    color: #FFD700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.suggest-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.suggest-hint {
    margin-top: 0.5rem;
    color: #999999;
    font-size: 0.9rem;
}

/* 顶部导航（合并自底部导航） */
.top-nav {
    display: flex;
    align-items: center;
    gap: 1rem; /* 减少导航项间距 */
    margin: 0 0.5rem; /* 减少左右边距 */
}

/* 移动端顶部导航样式已移至 mobile-layout.css */

/* 顶部导航项横向排布与触感优化 */
.top-nav .nav-item {
    flex-direction: row;
    align-items: center;
    gap: 0.3rem; /* 减少图标和文字间距 */
    padding: 0.3rem 0.5rem; /* 减少内边距 */
    border-radius: 6px; /* 减小圆角 */
    text-decoration: none;
    color: inherit;
}
.top-nav .nav-item:link,
.top-nav .nav-item:visited,
.top-nav .nav-item:hover,
.top-nav .nav-item:active { text-decoration: none; color: inherit; }
.top-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.top-nav .nav-item i { font-size: 1rem; } /* 恢复图标大小 */
.top-nav .nav-item span { 
    font-size: 1rem !important; /* 增大文字大小，使用!important确保优先级 */
    font-weight: 600; 
    letter-spacing: .2px; /* 增加字间距 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; /* 优化中文字体 */
}

/* 顶部导航激活态更明显 */
.top-nav .nav-item.active { 
    color: #10B981; 
}

.top-nav .nav-item.active span { 
    color: #10B981; 
    font-size: inherit; /* 继承父元素字体大小 */
    font-weight: inherit; /* 继承父元素字重 */
    letter-spacing: inherit; /* 继承父元素字间距 */
}

/* 移动端底部导航样式已移至 mobile-layout.css */

.nav-indicator { display: none; }

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.88); /* 与整体深色主题一致 */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
    color: #10B981; /* 主题绿 */
}

/* 视频模式下的加载配色（区分于图片） */
/* 移除视频模式的独立配色，统一与图片生成一致的主题绿 */

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.loading-spinner p {
    font-size: 1.2rem;
    color: #E5E7EB; /* 文字浅灰，提高可读性 */
}

/* 移动端响应式样式已移至 mobile-layout.css */

/* 文件拖拽效果 */
.upload-area.dragover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.02);
}

/* 成功/错误消息 */
.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 10001;
    max-width: 400px;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #cccccc;
    transition: all 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.message.info {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #cccccc;
}

.message.success {
    background: rgba(76, 175, 80, 0.95);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: white;
}

.message.error {
    background: rgba(244, 67, 54, 0.95);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: white;
}

/* 状态样式 */
.status-processing {
    color: #FFD700 !important;
    animation: pulse 1.5s infinite;
}

.status-completed {
    color: #00ff00 !important;
}

.status-failed {
    color: #ff0000 !important;
}

.status-item.error {
    background: rgba(255, 0, 0, 0.1);
    border-left: 3px solid #ff0000;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 图片操作按钮（历史卡片与输出预览通用） */
.image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 1; /* 默认可见，避免容器类不匹配导致不可见 */
    transition: opacity 0.3s ease;
}

/* 悬停时保持可见；为兼容旧结构，容器悬停也保持显示 */
.output-image:hover .image-actions,
.image-container:hover .image-actions { opacity: 1; }

.download-btn {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #E5E7EB;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.download-btn:hover {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

/* 图片模态框 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

/* 认证弹窗 */
.auth-modal .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 16px;
}
.auth-dialog {
    width: 100%;
    max-width: 520px;
    background: #0B141E;
    color: #E5E7EB;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 16px;
    padding: 1rem 1rem 1.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.auth-dialog .modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    padding: 8px;
    line-height: 1;
}
.auth-tabs { 
    display: flex; 
    gap: 1rem; 
    padding: .5rem 1rem 1rem; 
    border-bottom: 1px solid rgba(255,255,255,.1); 
    overflow-x: auto;
}
.auth-tab { 
    cursor: pointer; 
    color: #ccc; 
    padding: .5rem 0; 
    white-space: nowrap;
    font-size: 16px;
    min-width: 0;
    flex: 1 1 0; /* 登录/注册均分宽度 */
    text-align: center;
}
.auth-tab.active { color:#E5E7EB; border-bottom: 2px solid #E5E7EB; }
.auth-content { 
    padding: 1rem; 
}
.auth-form { 
    display: block; 
}
.auth-field { display:flex; align-items:center; gap:.6rem; border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:1rem; margin-bottom:1rem; background: rgba(255,255,255,.04); min-height:48px; position:relative; }
.auth-field i { color:#9CA3AF; font-size:18px; min-width:20px; }
.auth-field input { 
    flex: 1; 
    border: none; 
    background: transparent; 
    outline: none; 
    color: #fff; 
    font-size: 16px;
    padding: 4px 0;
}
.auth-field input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* 字段操作按钮样式 */
.field-clear-btn, .field-toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: .5rem;
}

.field-clear-btn:hover, .field-toggle-btn:hover { color:#E5E7EB; background: rgba(255, 255, 255, 0.08); }

/* .field-toggle-btn 样式在 .field-clear-btn, .field-toggle-btn 中已定义 */

/* 当输入框有内容时显示清空按钮 */
.auth-field:not(:focus-within) .field-clear-btn {
    opacity: 0;
    visibility: hidden;
}

.auth-field:focus-within .field-clear-btn {
    opacity: 1;
    visibility: visible;
}

/* 密码字段的切换按钮始终显示 */
.field-toggle-btn {
    opacity: 1;
    visibility: visible;
}

/* 当密码可见时改变图标 */
.field-toggle-btn.password-visible i::before {
    content: "\f070"; /* fa-eye-slash */
}

/* 输入框占满剩余空间，按钮在右侧行内显示 */
.auth-field input {
    padding-right: 0;
}

/* 兼容：移除:has 依赖，行内按钮无需额外右内边距 */

.auth-field .action-btn { background: transparent; color:#E5E7EB; border: 1px solid rgba(255,255,255,0.18); padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.auth-actions { 
    margin-top: 1rem; 
}

/* 认证链接样式 */
.auth-links {
    margin-top: 0.75rem;
    text-align: center;
}

.auth-link {
    color: #00ff88;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #00cc6a;
    text-decoration: underline;
}

/* 历史记录类型标签样式 */
.history-item .item-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.type-label {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.history-item.text2image .type-label {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.history-item.nano-banana .type-label {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.time-label {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 400;
}
.auth-actions button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    min-height: 48px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 用户协议复选框样式 */
.auth-agreement {
    margin: 1rem 0;
    padding: 0 0.5rem;
}

.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #cccccc;
}

.agreement-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #FFD700;
    border-color: #FFD700;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.agreement-text {
    flex: 1;
    user-select: none;
}

.agreement-link {
    color: #10B981;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.agreement-link:hover {
    color: #10B981;
    border-bottom-color: #10B981;
}

.agreement-checkbox:hover .checkmark {
    border-color: #FFD700;
}

/* 协议模态框样式 */
.agreement-content {
    max-width: 600px;
    max-height: 80vh;
    background: #0B141E;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2rem;
    overflow: hidden;
}

.agreement-body h3 {
    color: #10B981;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(16, 185, 129, 0.25);
    padding-bottom: 0.5rem;
}

.agreement-body h4 {
    color: #10B981;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem 0;
}

.agreement-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.agreement-body ul {
    margin: 0.5rem 0 1rem 1.5rem;
}

.agreement-body li {
    margin-bottom: 0.5rem;
}

.agreement-body strong { color: #10B981; }

/* 移动端协议模态框适配 */
@media (max-width: 768px) {
    .agreement-content {
        max-width: 90vw;
        max-height: 85vh;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .agreement-body {
        font-size: 14px;
    }
    
    .agreement-body h3 {
        font-size: 1.3rem;
    }
    
    .agreement-body h4 {
        font-size: 1.1rem;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .auth-modal .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 16px;
        /* 移动端确保全屏覆盖 */
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
    }
    
    .auth-dialog {
        width: 100%;
        max-width: 400px;
        margin: 0;
        border-radius: 12px;
        padding: 1rem;
        max-height: calc(100vh - 32px);
        /* 移动端确保内容可见 */
        position: relative;
        overflow: visible;
        background: rgba(26, 26, 46, 0.98);
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .auth-dialog .modal-close {
        position: absolute;
        top: 8px;
        right: 12px;
        font-size: 20px;
        padding: 4px;
        z-index: 10;
        /* 移动端确保关闭按钮可点击 */
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .auth-tabs {
        display: flex;
        gap: 0.5rem;
        padding: 0.5rem 0 1rem;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        overflow-x: auto;
    }
    
    .auth-tab {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        cursor: pointer;
        color: #ccc;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .auth-tab.active {
        color: #FFD700;
        border-bottom-color: #FFD700;
    }
    
    .auth-content {
        padding: 0.5rem 0;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .auth-field {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        min-height: 44px;
        /* 移动端确保输入框样式正确 */
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .auth-field input {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        width: 100%;
    }
    
    .auth-field input:focus {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    .auth-field .action-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .auth-actions button {
        padding: 14px;
        font-size: 16px;
        min-height: 50px;
        width: 100%;
        border-radius: 8px;
        /* 移动端确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    /* 移动端字段按钮适配（行内布局，无覆盖） */
    .field-clear-btn, .field-toggle-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-left: .4rem;
        /* 移动端确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
}

@media (max-width: 480px) {
    .auth-modal .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 12px;
        /* 小屏移动端确保全屏覆盖 */
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
    }
    
    .auth-dialog {
        width: 100%;
        max-width: 360px;
        margin: 0;
        border-radius: 8px;
        padding: 0.75rem;
        max-height: calc(100vh - 24px);
        /* 小屏移动端确保内容可见 */
        position: relative;
        overflow: visible;
        background: rgba(26, 26, 46, 0.98);
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .auth-dialog .modal-close {
        position: absolute;
        top: 6px;
        right: 10px;
        font-size: 18px;
        padding: 3px;
        z-index: 10;
        /* 小屏移动端确保关闭按钮可点击 */
        min-width: 30px;
        min-height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .auth-tabs {
        display: flex;
        gap: 0.4rem;
        padding: 0.4rem 0 0.8rem;
        margin: 0 -0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        overflow-x: auto;
    }
    
    .auth-tab {
        font-size: 13px;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
        cursor: pointer;
        color: #ccc;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .auth-tab.active {
        color: #FFD700;
        border-bottom-color: #FFD700;
    }
    
    .auth-content {
        padding: 0.4rem 0;
        max-height: 65vh;
        overflow-y: auto;
    }
    
    .auth-field {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
        min-height: 42px;
        /* 小屏移动端确保输入框样式正确 */
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .auth-field input {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        width: 100%;
    }
    
    .auth-field input:focus {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    .auth-actions button {
        padding: 12px;
        font-size: 15px;
        min-height: 48px;
        width: 100%;
        border-radius: 8px;
        /* 小屏移动端确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    /* 小屏移动端字段按钮适配 */
    .field-clear-btn, .field-toggle-btn {
        width: 18px;
        height: 18px;
        font-size: 11px;
        margin-left: .3rem;
        /* 小屏移动端确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    /* 更小屏幕：进一步缩小清空按钮，避免遮挡 */
    .prompt-controls { 
        top: 4px; 
        right: 4px; 
    }
    
    .prompt-controls .field-clear-btn { 
        width: 20px; 
        height: 20px; 
        font-size: 11px; 
        padding: 2px;
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .prompt-textarea-wrap.has-clear .prompt-textarea { 
        padding-right: 32px; 
    }
}

/* 微信小程序适配 */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    /* 微信小程序内嵌浏览器优化 */
    .prompt-controls { top: 5px; right: 5px; }
    .prompt-controls .field-clear-btn { 
        width: 24px; 
        height: 24px; 
        font-size: 13px; 
        padding: 3px;
        /* 微信小程序中确保可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    .prompt-textarea-wrap.has-clear .prompt-textarea { padding-right: 38px; }
    
    /* 微信小程序中避免输入框被键盘遮挡 */
    .prompt-textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
        -webkit-touch-callout: none;
    }
    
    /* 微信小程序中确保按钮可见性 */
    .prompt-controls.visible {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* 自适配：PC / 平板 / 手机 断点优化 */
/* PC ≥ 1200px */
@media (min-width: 1200px) {
    .header-content { max-width: 1280px; }
    .main-content { max-width: 1280px; padding: 1.5rem; }
    .image-section { height: 320px; }
    .history-card { padding: 2.25rem; }
    .actions-section .action-btn { padding: 10px 16px; font-size: 0.95rem; }
    .prompt-textarea { min-height: 120px; }
}

/* 平板 768px–1199px */
@media (min-width: 768px) and (max-width: 1199px) {
    .header-content { padding: 0 1.25rem; }
    .main-content { padding: 1rem; }
    .image-section { height: 260px; }
    .history-card { padding: 1.5rem; }
    .actions-section { gap: 10px; }
    .actions-section .action-btn { padding: 8px 14px; font-size: 0.9rem; }
    .prompt-textarea { min-height: 110px; }
}

/* 手机 ≤ 767px （补充细化）*/
@media (max-width: 767px) {
    .header-content { padding: 0 .75rem; }
    .main-content { padding: 0.75rem; }
    .image-section { height: 200px; }
    .history-card { padding: 1rem; }
    .actions-section { flex-direction: column; }
    .actions-section .action-btn { width: 100%; justify-content: center; }
    .prompt-textarea { min-height: 90px; }
}

/* 个人中心（对齐小程序样式） */
#profilePage .user-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(34, 211, 238, 0.20);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

#profilePage .user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00ff88, #10B981);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

#profilePage .avatar-text {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
}

#profilePage .user-info { flex: 1; }
#profilePage .username { font-size: 1.1rem; font-weight: 600; color: #e0e0e0; margin-bottom: .25rem; }
#profilePage .user-desc { font-size: .9rem; color: #e0e0e0; }

#profilePage .coins-info { text-align: center; }
#profilePage .coins-label { font-size: .9rem; color: #666; display:block; margin-bottom: .25rem; }
#profilePage .coins-value { font-size: 1.25rem; font-weight: 700; color: #00ff88; display:block; }

#profilePage .login-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.20);
    border-radius: 16px;
    padding: 1.75rem 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
#profilePage .login-icon { font-size: 2.5rem; margin-bottom: .75rem; display:block; color:#10B981; }
#profilePage .login-title { font-size: 1.2rem; font-weight: 600; color:#e0e0e0; margin-bottom: .5rem; display:block; }
#profilePage .login-desc { font-size: .95rem; color:#e0e0e0; margin-bottom: 1rem; display:block; }
#profilePage .login-btn { margin: 0 auto; max-width: 240px; }

#profilePage .menu-section {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.20);
    border-radius: 16px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#profilePage .menu-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.25s ease;
}
#profilePage .menu-item:last-child { border-bottom: none; }
#profilePage .menu-item:active { background: rgba(255,255,255,0.08); }
#profilePage .menu-icon { font-size: 1.25rem; margin-right: .75rem; width: 1.8rem; text-align:center; color:#10B981; }
#profilePage .menu-content { flex: 1; }
#profilePage .menu-title { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: .25rem; display:block; }
#profilePage .menu-desc { font-size: .9rem; color: #ccc; display:block; }
#profilePage .menu-arrow { font-size: .9rem; color: #999; margin-left: .5rem; }

#profilePage .logout-section { margin-top: 1rem; }
#profilePage .logout-btn { width: 100%; background: rgba(255, 0, 0, 0.1); border-color: rgba(255, 0, 0, 0.3); color: #ff6666; }
#profilePage .logout-btn:hover { background: rgba(255, 0, 0, 0.18); }

@media (max-width: 768px) {
    #profilePage .user-card { padding: 1rem; }
    #profilePage .user-avatar { width: 56px; height: 56px; margin-right: .75rem; }
    #profilePage .avatar-text { font-size: 24px; }
    #profilePage .menu-item { padding: .9rem; }
}
/* 移动端设备通用适配 */
.mobile-device .auth-modal .modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

.mobile-device .auth-dialog {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    background: rgba(26, 26, 46, 0.98) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

.mobile-device .auth-dialog .modal-close {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    z-index: 10 !important;
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3) !important;
    touch-action: manipulation !important;
}

.mobile-device .field-clear-btn, 
.mobile-device .field-toggle-btn {
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3) !important;
    touch-action: manipulation !important;
}

.mobile-device .auth-actions button {
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3) !important;
    touch-action: manipulation !important;
}

.mobile-device .auth-tab {
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3) !important;
    touch-action: manipulation !important;
}

/* 微信小程序 web-view 弹窗适配 */
@media screen and (max-width: 480px) {
    /* 检测微信环境 */
    .wechat-webview .auth-modal .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 10px;
        /* 微信小程序中确保全屏覆盖 */
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
    }
    
    .wechat-webview .auth-dialog {
        width: 100%;
        max-width: 360px;
        max-height: 90vh;
        margin: 0;
        border-radius: 12px;
        padding: 1rem;
        /* 微信小程序中确保内容可见 */
        position: relative;
        overflow: visible;
        background: rgba(26, 26, 46, 0.98);
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .wechat-webview .auth-dialog .modal-close {
        position: absolute;
        top: 8px;
        right: 12px;
        font-size: 20px;
        padding: 4px;
        z-index: 10;
        /* 微信小程序中确保关闭按钮可点击 */
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .wechat-webview .auth-tabs {
        display: flex;
        gap: 0.5rem;
        padding: 0.5rem 0 1rem;
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        overflow-x: auto;
    }
    
    .wechat-webview .auth-tab {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        cursor: pointer;
        color: #ccc;
        border-bottom: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .wechat-webview .auth-tab.active {
        color: #FFD700;
        border-bottom-color: #FFD700;
    }
    
    .wechat-webview .auth-content {
        padding: 0.5rem 0;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .wechat-webview .auth-field {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        min-height: 44px;
        /* 微信小程序中确保输入框样式正确 */
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .wechat-webview .auth-field input {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0;
        background: transparent;
        border: none;
        outline: none;
        color: #fff;
        width: 100%;
    }
    
    .wechat-webview .auth-field input:focus {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    .wechat-webview .auth-actions button {
        padding: 14px;
        font-size: 16px;
        min-height: 50px;
        width: 100%;
        border-radius: 8px;
        /* 微信小程序中确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    /* 微信小程序中字段按钮适配 */
    .wechat-webview .field-clear-btn, 
    .wechat-webview .field-toggle-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
        right: 6px;
        /* 微信小程序中确保按钮可点击 */
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }
    
    .wechat-webview .field-toggle-btn {
        right: 30px;
    }
    
    .wechat-webview .auth-field input {
        padding-right: 50px;
    }
    
    .wechat-webview .auth-field:has(.field-toggle-btn) input {
        padding-right: 80px;
    }
}

/* 个人中心卡片 */
.profile-card { 
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.profile-card:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(34, 211, 238, 0.24); }
.profile-row { display:flex; align-items:center; justify-content: space-between; gap:1rem; }
.avatar { width:48px; height:48px; border-radius:50%; background: linear-gradient(45deg, #FFD700, #FFA500); color:#000; display:flex; align-items:center; justify-content:center; font-weight:700; }
.logout-btn { background: rgba(255, 0, 0, 0.15); border: 1px solid rgba(255, 0, 0, 0.3); color: #ff6666; border-radius: 10px; padding: .6rem 1rem; cursor:pointer; }

/* 用户中心标签与区域 */
.uc-tabs { display:flex; gap:2rem; margin-bottom:1rem; border-bottom:1px solid rgba(255,255,255,.1); }
.uc-tab { cursor:pointer; color:#ccc; padding: .8rem 0; position:relative; }
.uc-tab.active { color:#FFD700; }
.uc-tab.active::after { content:''; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:#FFD700; border-radius:2px; }
.uc-section { display:none; }
.uc-section.active { display:block; }
.uc-form-row { display:grid; grid-template-columns: 1fr 2fr; gap:1rem; margin-bottom:1rem; }
.uc-form-row .config-group { margin:0; }
.uc-actions { margin-top: .5rem; }

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 22, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #0B141E; /* 实色，不透明 */
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #FFD700;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.modal-actions {
    text-align: center;
    margin-top: 1rem;
}

.modal-btn {
    background: linear-gradient(45deg, #10B981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    color: #0B141E;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
    background: linear-gradient(45deg, #059669, #10B981);
}

/* 历史记录样式 */
.history-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.history-card:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(34, 211, 238, 0.24); }

/* 紧凑历史卡片（对齐首页"最新"卡）*/
.history-item.compact { background: rgba(255,255,255,0.06); border: 1px solid rgba(34,211,238,0.18); border-radius: 14px; padding: 1rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.history-item.compact:hover { background: rgba(255,255,255,0.08); border-color: rgba(34,211,238,0.24); }

.history-card .card-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap !important;
    gap: .5rem;
}

/* 历史页面头部布局 */
.history-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

/* 历史类型筛选 Tabs */
.history-tabs { 
    display: flex; 
    gap: .5rem; 
    margin: 0;
}
.history-tab { 
    background: rgba(255,255,255,.06); 
    border: 1px solid rgba(255,255,255,.15); 
    color: #ccc; 
    padding: .4rem .8rem; 
    border-radius: 999px; 
    cursor: pointer; 
    font-size: .9rem;
    white-space: nowrap;
}
.history-tab.active { 
    background: rgba(16,185,129,.12); 
    border-color: rgba(16,185,129,.35); 
    color: #10B981; 
    font-weight: 700; 
}

/* 兼容不同标题标签：将第一个子元素视为标题 */
.history-card .card-header h2 { flex: 1 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-card .card-header i { flex: 0 0 auto; }
.history-card .card-header .back-btn { flex: 0 0 auto; white-space: nowrap; }

.history-card .card-header i,
.history-card .card-header .back-btn {
    flex-shrink: 0;
}

/* 同步小程序风格的历史项结构 */
.item-title { font-weight: 600; color: #10B981; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.05rem; }
.status-badge { padding: 6px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.status-badge.status-completed { background: rgba(16,185,129,0.18); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.status-badge.status-processing { background: rgba(245,158,11,0.18); color: #F59E0B; border: 1px solid rgba(245,158,11,0.35); animation: pulse 2s infinite; }
.status-badge.status-failed { background: rgba(244,67,54,0.18); color: #F44336; border: 1px solid rgba(244,67,54,0.35); }
.status-badge.status-initialized, .status-badge.status-pending, .status-badge.status-sent { background: rgba(156,163,175,0.18); color: #9CA3AF; border: 1px solid rgba(156,163,175,0.35); }

.image-section { margin-bottom: 12px; height: 240px; border-radius: 12px; overflow: hidden; position: relative; }
.image-container { width: 100%; height: 100%; position: relative; background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; }
.main-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-container .image-count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); color:#fff; font-size: 12px; padding: 4px 8px; border-radius: 999px; backdrop-filter: blur(8px); }
.image-actions { position: absolute; bottom: 8px; right: 8px; display:flex; gap:6px; }
.image-action-btn { display:flex; align-items:center; justify-content:center; width:36px; height:36px; background: rgba(0,0,0,0.7); border:none; border-radius:50%; color:#fff; font-size:14px; line-height:1; }
.image-action-btn:hover { background: rgba(0,0,0,0.9); }

.no-image { width:100%; height:100%; display:flex; align-items:center; justify-content:center; flex-direction:column; background: rgba(255,255,255,0.05); border: 1px dashed rgba(255,255,255,0.2); border-radius: 12px; }
.no-image-icon { font-size: 28px; opacity: .6; margin-bottom: 6px; }
.no-image-text { color:#999; font-size: .9rem; }

.prompt-section { margin-bottom: 12px; padding: 12px; background: rgba(255,255,255,0.05); border-radius: 10px; border:1px solid rgba(255,255,255,0.1); }
.prompt-header { display:flex; align-items:center; justify-content: space-between; margin-bottom: 6px; }
.prompt-actions { display:flex; align-items:center; gap:8px; }
.section-label { color:#10B981; font-weight:700; }
.copy-btn { background: rgba(16,185,129,0.1); border:1px solid rgba(16,185,129,0.3); color:#10B981; padding: 4px 10px; border-radius: 999px; cursor:pointer; }
.toggle-btn { width:30px; height:30px; background: rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2); border-radius: 50%; color:#999; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.toggle-icon { font-size: 12px; }
.prompt-content, .prompt-preview { color:#e0e0e0; line-height: 1.6; }
.history-item.compact .prompt-content,
.history-item.compact .prompt-preview {
    /* 保持视觉高度一致：两行展示，超出省略 */
    max-height: 3.2em;
    min-height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.prompt-preview { opacity:.85; }

.meta-section { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 12px; padding: 10px; background: rgba(255,255,255,0.03); border-radius: 10px; align-items: center; }
.meta-section.meta-center { justify-content: center; text-align: center; }
.meta-section.meta-center .meta-item { justify-content: center; }
.meta-section.meta-between { justify-content: space-between; }
.meta-item { display:flex; align-items:center; gap:6px; color:#ccc; font-size:.9rem; }

.actions-section { display:flex; gap:8px; margin-top: 10px; }
.actions-section .action-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; border-radius: 10px; padding: 8px 10px; height: 36px; font-weight:600; }
.actions-section .action-btn .btn-ico { font-size: 16px; line-height: 1; }
.actions-section .action-btn .btn-text { display: none; }
.regenerate-btn { background: linear-gradient(90deg, #F59E0B, #FBBF24); border: none; color:#000; }
.detail-btn { background: #3a3b3e; border: 1px solid rgba(255,255,255,0.15); color:#E5E7EB; }
.delete-btn { background: rgba(127, 29, 29, 0.25); border:1px solid rgba(239, 68, 68, 0.45); color:#F87171; }

/* 历史列表作为网格以适配不同终端 */
.history-content { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* 平板：两列布局，卡片内间距适中 */
@media (min-width: 768px) and (max-width: 1199px) {
  .history-content { grid-template-columns: 1fr 1fr; }
  .history-item { padding: 1rem; }
  .item-title { font-size: 1rem; }
  .status-badge { font-size: .8rem; }
  .image-section { height: 220px; }
}

/* PC：两到三列，视窗较大时三列，卡片更紧凑 */
@media (min-width: 1200px) {
  .history-content { grid-template-columns: repeat(2, 1fr); }
  @media (min-width: 1400px) {
    .history-content { grid-template-columns: repeat(3, 1fr); }
  }
  .history-item { padding: 1.1rem; }
  .item-title { font-size: 1.1rem; }
  .status-badge { font-size: .85rem; }
  .image-section { height: 260px; }
}

/* 手机：单列，触控友好尺寸 */
@media (max-width: 767px) {
  .history-card .card-header { display:flex !important; flex-direction: row !important; flex-wrap: nowrap !important; }
  .history-card .card-header i { margin-right: .5rem; }
  .history-card .card-header h2 { flex:1 1 auto; min-width:0; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .history-card .card-header .back-btn { flex-shrink:0; white-space:nowrap; }
  .history-content { grid-template-columns: 1fr; gap: .75rem; }
  .history-item { padding: .9rem; }
  .item-title { font-size: .98rem; }
  .status-badge { font-size: .78rem; padding: 5px 9px; }
  .image-section { height: 180px; }
  .image-container .image-count { font-size: 10px; padding: 3px 7px; }
  .image-action-btn { width: 32px; height: 32px; font-size: 13px; }
  .prompt-section { padding: 10px; }
  .prompt-header { margin-bottom: 6px; }
  .section-label { font-size: .88rem; }
  .copy-btn { padding: 4px 8px; font-size: .85rem; border-radius: 999px; }
  .toggle-btn { width: 26px; height: 26px; font-size: 12px; }
  .prompt-content { font-size: .95rem; line-height: 1.55; }
  .prompt-preview { font-size: .92rem; line-height: 1.5; }
  /* 手机端一行展示三个按钮，保证等宽 */
  .actions-section { flex-direction: row; gap: 8px; }
  .actions-section .action-btn { flex: 1 1 0; min-width: 0; padding: 6px 8px; height: 36px; }
  .meta-section { gap: 6px; padding: 8px; }
  .meta-item { font-size: .85rem; }
  /* 保证"创作记录"标题与返回按钮同一行显示且可截断 */
  .history-card .card-header { flex-wrap: nowrap; gap: .5rem; }
  .history-card .card-header h2 { flex: 1; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .history-card .card-header .back-btn { flex-shrink: 0; white-space: nowrap; }
}

/* 平板及以上显示按钮文字 */
@media (min-width: 768px) {
  .actions-section .action-btn { height: 38px; padding: 8px 12px; }
  .actions-section .action-btn .btn-text { display: inline; font-size: .92rem; }
}

/* 历史骨架屏 */
.history-skeleton { background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1rem; overflow: hidden; position: relative; }
.history-skeleton .sk-row { height: 14px; background: rgba(255,255,255,0.08); border-radius: 8px; margin-bottom: 10px; }
.history-skeleton .sk-img { height: 180px; background: rgba(255,255,255,0.06); border-radius: 10px; margin: 10px 0; }
.history-skeleton .sk-btns { display:flex; gap:8px; }
.history-skeleton .sk-btn { flex:1; height: 36px; background: rgba(255,255,255,0.06); border-radius: 10px; }
.history-skeleton::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent); transform: translateX(-100%); animation: sk-shimmer 1.2s infinite; }
@keyframes sk-shimmer { 100% { transform: translateX(100%); } }

.back-btn {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #FFD700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
}

.history-content {
    max-height: 70vh;
    overflow-y: auto;
}

/* 历史列表滚动条（深色主题） */
.history-content {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(16,185,129,.35) rgba(255,255,255,.10);
    padding-right: 8px; /* 为滚动条留出空间 */
    margin-right: -8px; /* 抵消内边距影响 */
}
.history-content::-webkit-scrollbar {
    width: 8px;
}
.history-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,.10);
    border-radius: 3px;
}
.history-content::-webkit-scrollbar-thumb {
    background: rgba(16,185,129,.45);
    border-radius: 3px;
    transition: background .2s ease;
}
.history-content::-webkit-scrollbar-thumb:hover {
    background: rgba(16,185,129,.65);
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    color: #FFD700;
    font-size: 1.2rem;
    margin: 0;
}

.history-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.history-prompt {
    margin-bottom: 1rem;
    color: #cccccc;
    line-height: 1.5;
    /* 允许文本选择和复制 */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    /* 添加复制提示 */
    cursor: text;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.history-prompt:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.history-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #999999;
    flex-wrap: wrap;
}

.history-meta span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.history-images {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.history-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.history-images img:hover {
    transform: scale(1.1);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.action-btn:first-child:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.3);
    color: #ff6666;
}

.empty-history {
    text-align: center;
    padding: 3rem;
    color: #999999;
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: #666666;
}

/* 响应式设计 - 历史记录 */
@media (max-width: 768px) {
    .history-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-actions {
        flex-direction: column;
    }
    
    .history-images {
        justify-content: center;
    }
    
    .history-card .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* 客服浮窗样式 */
.customer-service-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.customer-service-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

.customer-service-float i {
    font-size: 24px;
    color: #000;
    transition: transform 0.3s ease;
}

.customer-service-float:hover i {
    transform: rotate(10deg);
}

.float-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.float-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.customer-service-float:hover .float-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .customer-service-float {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .customer-service-float i {
        font-size: 20px;
    }
    
    .float-tooltip {
        right: 60px;
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* 主题统一为小程序配色（绿色/蓝色霓虹风）覆盖 */
/* 全局主色替换：#FFD700/#FFA500 → #00ff88 / #00aaff */

/* 顶部按钮与强调色 */
.auth-btn {
    background: linear-gradient(45deg, #00ff88, #10B981);
    color: #000;
}

/* 卡片与边框强调色 */
.config-card, .input-card, .output-card, .status-card,
.history-card, .profile-card {
    border-color: rgba(0, 255, 136, 0.2);
}

/* Tab 强调色 */
.tab.active { color: #10B981; }
.tab-indicator { background: #10B981; }

/* 上传区域强调色 */
.upload-area { 
    border-color: rgba(16, 185, 129, 0.5); 
    background: rgba(16, 185, 129, 0.05);
}
.upload-area:hover {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}
.uploaded-image { border-color: #10B981; }
.upload-notice {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}

/* 表单与标题强调 */
.page-title { 
    background: linear-gradient(45deg, #10B981, #059669);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.prompt-input label { color: #10B981; }

/* 生成按钮 */
.generate-btn {
    background: linear-gradient(45deg, #10B981, #059669);
    color: #000;
}
.generate-btn:hover:not(:disabled) { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4); }

/* 建议按钮与提示色 */
.suggest-btn { 
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}
.suggest-btn:hover { background: rgba(16, 185, 129, 0.2); }
.image-count { color: #10B981; }

/* 顶部导航主题 */
.nav-item.active { color: #10B981; }
.nav-indicator { background: #10B981; }

/* 状态与高亮 */
.status-label { color: #10B981; }
.status-processing { color: #10B981 !important; }

/* 历史页按钮与边框 */
.back-btn {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}
.history-images img { border-color: rgba(16, 185, 129, 0.3); }
.history-prompt:hover { border-color: rgba(16, 185, 129, 0.3); }
.action-btn:hover { border-color: rgba(255, 255, 255, 0.2); }

/* 认证弹窗边框主色 */
.auth-dialog { border-color: rgba(16, 185, 129, 0.35); }
.auth-tab.active { color: #10B981; border-bottom-color: #10B981; }
.field-clear-btn:hover, .field-toggle-btn:hover { color: #10B981; background: rgba(16, 185, 129, 0.1); }
.auth-field .action-btn { background: rgba(16,185,129,0.15); color:#10B981; border-color: rgba(16,185,129,0.3); }
.field-clear-btn:hover, .field-toggle-btn:hover { color: #10B981; background: rgba(16, 185, 129, 0.1); }
.auth-field .action-btn { background: rgba(16,185,129,0.15); color:#10B981; border-color: rgba(16,185,129,0.3); }

/* 客服浮窗 */
.customer-service-float { background: linear-gradient(135deg, #10B981, #059669); }

/* 统一客服弹窗样式 */
.customer-service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.customer-service-modal .modal-content {
    background: rgba(10, 14, 22, 0.95);
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
}

.customer-service-modal .modal-header {
    margin-bottom: 24px;
}

.customer-service-modal .modal-title {
    color: #10B981;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.customer-service-modal .modal-subtitle {
    color: #E5E7EB;
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.customer-service-modal .qr-code-container {
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
}

.customer-service-modal .qr-code {
    width: 260px;
    height: 260px;
    border-radius: 12px;
    border: 2px solid rgba(16, 185, 129, 0.3);
    object-fit: cover;
    background: #fff;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.customer-service-modal .qr-code:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
}

.customer-service-modal .qr-description {
    color: #B0B3B8;
    font-size: 14px;
    margin-top: 16px;
    line-height: 1.5;
}

.customer-service-modal .modal-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.customer-service-modal .btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.customer-service-modal .btn-primary:hover {
    background: linear-gradient(135deg, #059669, #10B981);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.customer-service-modal .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #E5E7EB;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.customer-service-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.customer-service-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #B0B3B8;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.customer-service-modal .modal-close:hover {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .customer-service-modal .modal-content {
        padding: 24px;
        max-width: 90%;
    }
    
    .customer-service-modal .modal-title {
        font-size: 20px;
    }
    
    .customer-service-modal .modal-subtitle {
        font-size: 14px;
    }
    
    .customer-service-modal .qr-code {
        width: 220px;
        height: 220px;
    }
    
    .customer-service-modal .modal-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .customer-service-modal .btn-primary,
    .customer-service-modal .btn-secondary {
        width: 100%;
        max-width: 200px;
    }
}

/* 基础弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #cccccc;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal .close:hover {
    color: #10B981;
}

/* 设置和联系客服弹窗样式 */
.settings-list, .contact-list {
    display: flex;
    flex-direction: column;
}

.settings-item, .contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: #ffffff;
}

.settings-item:last-child, .contact-item:last-child {
    border-bottom: none;
}

.settings-item:hover, .contact-item:hover {
    background: rgba(16, 185, 129, 0.1);
}

.settings-item i, .contact-item i {
    color: #10B981;
    font-size: 14px;
}

/* 弹窗样式增强 */
.modal-content {
    background: rgba(10, 14, 22, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 20px;
}

.modal-header h3 {
    color: #10B981;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

/* 二维码弹窗特殊样式 */
.modal-body img {
    border: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .settings-item, .contact-item {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
}

.i2v-textarea-wrap { 
    position: relative; 
    display: flex;
    flex-direction: column;
}
.i2v-controls { position:absolute; top:8px; right:8px; }
.i2v-textarea-wrap.has-clear .i2v-textarea { padding-right: 40px; }

