* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f1a;
    --bg-sidebar: #141428;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-solid: #1a1a30;
    --bg-hover: rgba(255,255,255,0.06);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #5c5c7a;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --accent2: #fd79a8;
    --accent3: #00cec9;
    --border-color: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

@keyframes bg-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.2), 0 0 60px rgba(108, 92, 231, 0.05); }
    50% { box-shadow: 0 0 35px rgba(108, 92, 231, 0.4), 0 0 80px rgba(108, 92, 231, 0.12); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(253, 121, 168, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 206, 201, 0.04) 0%, transparent 60%);
    animation: bg-drift 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-top: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.sidebar-logout:hover {
    border-color: #e17055;
    color: #e17055;
    background: rgba(225, 112, 85, 0.08);
}

/* 管理员面板按钮 */
.sidebar-admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: var(--radius-md);
    color: var(--accent-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    margin-bottom: 8px;
}
.sidebar-admin-btn:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(108, 92, 231, 0.2);
}
.sidebar-admin-btn .icon-svg {
    width: 16px;
    height: 16px;
}

/* 侧边栏邮箱绑定 */
.sidebar-bind-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 16px);
    margin: 0 8px 6px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(108, 92, 231, 0.3);
    background: rgba(108, 92, 231, 0.08);
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-bind-email-btn:hover {
    background: rgba(108, 92, 231, 0.18);
    border-color: var(--accent);
}
.sidebar-bind-email-btn .icon-svg {
    width: 14px;
    height: 14px;
}

.sidebar-email {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 16px 6px;
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* 找回密码样式 */
#forgotPwdLine {
    text-align: center;
}
#forgotPwdLine a {
    color: #7c3aed;
    font-size: 13px;
}

#forgotResendBtn {
    margin-top: 6px;
    padding: 8px;
    width: 100%;
    font-size: 13px;
    border-radius: 8px;
}

/* ========== 管理员面板 ========== */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.admin-panel {
    width: 90vw;
    max-width: 1000px;
    max-height: 85vh;
    background: var(--bg-sidebar);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(108, 92, 231, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s ease-out;
}
.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.admin-panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-panel-header h2 .icon-svg {
    width: 20px;
    height: 20px;
    color: var(--accent-light);
}
.admin-panel-close {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}
.admin-panel-close:hover {
    color: #e17055;
    border-color: rgba(225, 112, 85, 0.3);
    background: rgba(225, 112, 85, 0.1);
}
.admin-panel-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.admin-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.08);
}
.admin-btn .icon-svg {
    width: 14px;
    height: 14px;
}
/* 搜索框 */
.admin-search-wrap {
    position: relative;
    flex: 1;
    max-width: 260px;
}
.admin-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    pointer-events: none;
}
.admin-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
}
.admin-search-input::placeholder {
    color: var(--text-muted);
}
.admin-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.12);
}
.admin-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}
.admin-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 32px;
    font-size: 14px;
}

/* 用户卡片列表 */
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: all 0.2s ease;
}
.admin-user-card:hover {
    border-color: var(--border-strong);
}
.admin-user-card.banned {
    opacity: 0.6;
    border-color: rgba(225, 112, 85, 0.3);
}

.admin-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.admin-user-role {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.admin-user-role.admin { background: linear-gradient(135deg, #e17055, #d63031); color: #fff; }
.admin-user-role.user { background: rgba(108, 92, 231, 0.15); color: var(--accent-light); }

.admin-user-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
    font-weight: 600;
}
.admin-user-status.active { background: rgba(0, 206, 201, 0.12); color: var(--accent3); }
.admin-user-status.banned { background: rgba(225, 112, 85, 0.12); color: #e17055; }

.admin-user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.admin-action-btn {
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}
.admin-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}
.admin-action-btn.danger {
    border-color: rgba(225, 112, 85, 0.3);
    color: #e17055;
}
.admin-action-btn.danger:hover {
    background: rgba(225, 112, 85, 0.1);
}
.admin-action-btn.success {
    border-color: rgba(0, 206, 201, 0.3);
    color: var(--accent3);
}
.admin-action-btn.success:hover {
    background: rgba(0, 206, 201, 0.1);
}
.admin-action-btn.warning {
    border-color: rgba(253, 203, 110, 0.3);
    color: #fdce6e;
}
.admin-action-btn.warning:hover {
    background: rgba(253, 203, 110, 0.12);
}

/* 用户使用详情行 */
.admin-user-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.admin-user-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-user-detail-label {
    color: var(--text-muted);
    min-width: 50px;
}
.admin-model-usage {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    padding: 4px 10px;
    border-radius: 8px;
}
.admin-model-name {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 11px;
}
.admin-model-count {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* 配额编辑 */
.admin-quota-input {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}
.admin-quota-input input {
    width: 50px;
    padding: 3px 6px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 11px;
    text-align: center;
    font-family: inherit;
}
.admin-quota-input input:focus {
    outline: none;
    border-color: var(--accent);
}
.admin-quota-set-btn {
    padding: 3px 8px;
    border-radius: 6px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.admin-quota-set-btn:hover {
    background: #5a4bd1;
}

/* 打开配额弹窗的小按钮 */
.admin-user-cog-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
}
.admin-user-cog-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}
.admin-user-cog-btn .icon-svg {
    width: 14px;
    height: 14px;
}

/* 侧边栏用户信息 */
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}
.sidebar-user-info .icon-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 管理员徽章 */
.admin-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e17055, #d63031);
    margin-left: 6px;
    vertical-align: middle;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--accent-light) 20%, 
        transparent 50%,
        var(--accent2) 80%,
        transparent 100%);
    opacity: 0.3;
}

.sidebar-header {
    padding: 4px 0;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-light), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

/* 模型区域 */
.model-section {
    flex-shrink: 0;
}

.model-section h3 {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.model-section h3 .icon-svg {
    width: 13px;
    height: 13px;
    color: var(--accent-light);
}

.model-section-video h3 .icon-svg {
    color: var(--accent3);
}

/* ========== 历史任务区域 ========== */
.history-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

/* 移动端历史切换按钮（PC端隐藏） */
.history-toggle-btn {
    display: none;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-header h3 {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-left: 4px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.history-header h3 .icon-svg {
    width: 13px;
    height: 13px;
    color: var(--accent-light);
}

.history-clear {
    font-size: 10px;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.history-clear:hover {
    color: #e17055;
    border-color: rgba(225, 112, 85, 0.3);
    background: rgba(225, 112, 85, 0.08);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 2px;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
}

.history-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 16px 0;
    opacity: 0.6;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.history-item:hover {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.08);
}

.history-item.active {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.12);
}

.history-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-prompt {
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.history-info {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-model-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.15);
    white-space: nowrap;
}

.history-time {
    white-space: nowrap;
}

.history-delete {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.history-item:hover .history-delete {
    opacity: 1;
}

.history-delete:hover {
    color: #e17055;
    background: rgba(225, 112, 85, 0.12);
}

.history-delete .icon-svg {
    width: 12px;
    height: 12px;
}

/* 历史记录状态标签（带图标+文字，显眼） */
.history-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 生成中 - 黄色旋转圆点 + "生成中"文字 */
.status-generating {
    color: #f9ca24;
    background: rgba(249, 202, 36, 0.18);
    border: 1px solid rgba(249, 202, 36, 0.35);
}

.status-dot-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 4px currentColor;
    animation: statusSpin 1s linear infinite;
}

/* 成功 - 绿色勾 + "完成"文字 */
.status-success {
    color: #00b894;
    background: rgba(0, 184, 148, 0.15);
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-check {
    width: 11px;
    height: 11px;
}

/* 失败 - 红色叉 + "失败"文字 */
.status-failed {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-x {
    width: 10px;
    height: 10px;
}

@keyframes statusSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.model-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-card {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent, rgba(253, 121, 168, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.model-card:hover::before {
    opacity: 1;
}

.model-card.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s ease-in-out infinite;
}

.model-card.active::before {
    opacity: 1;
}

/* ========== 全局 SVG 图标 ========== */
.icon-svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-input {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.icon-chevron {
    width: 10px;
    height: 10px;
    margin-left: 4px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.model-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.model-icon .icon-svg { width: 15px; height: 15px; }

.model-info {
    position: relative;
    z-index: 1;
}

.model-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.model-info p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 32px 32px;
    overflow: hidden;
    gap: 20px;
}

/* 工作区：左右分栏 */
.workspace {
    display: flex;
    gap: 24px;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* 左侧控制面板（占 2/3） */
.control-panel {
    flex: 2;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

/* 右侧预览面板（占 1/3） */
.preview-panel {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.preview-panel::-webkit-scrollbar { width: 5px; }
.preview-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
.preview-panel::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* 预览占位图 */
.preview-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-strong);
    min-height: 300px;
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-content .icon-svg {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.placeholder-content p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.6;
}

/* ========== 仪表盘（左侧面板内） ========== */
.dashboard {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex-shrink: 0;
}

.dash-card {
    background: var(--bg-card-solid);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    padding: 20px;
    transition: all 0.3s ease;
}

.dash-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dash-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-card-title .icon-svg {
    width: 16px;
    height: 16px;
    color: var(--accent-light);
}

.dash-refresh-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.dash-refresh-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.1);
}

.dash-refresh-btn:active {
    transform: scale(0.9);
}

.dash-refresh-btn.spinning .icon-svg {
    animation: spin 0.6s ease;
}

.dash-refresh-btn .icon-svg {
    width: 13px;
    height: 13px;
}

/* ========== 灵感卡片 ========== */
.inspiration-card {
    background: linear-gradient(135deg, 
        rgba(108, 92, 231, 0.08) 0%, 
        rgba(253, 121, 168, 0.04) 50%,
        rgba(0, 206, 201, 0.03) 100%
    );
    border-color: rgba(108, 92, 231, 0.15);
}

.inspiration-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 24px rgba(108, 92, 231, 0.08);
}

.inspiration-card .dash-card-title .icon-svg {
    color: var(--accent2);
}

.inspiration-body {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.inspiration-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.12);
    letter-spacing: 0.5px;
}

.inspiration-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    word-break: break-word;
}

.inspiration-use-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.inspiration-use-btn:hover {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
}

.inspiration-use-btn:active {
    transform: scale(0.98);
}

.inspiration-use-btn .icon-svg {
    width: 15px;
    height: 15px;
}

/* ========== 配额面板 ========== */
.quota-panel .dash-card-title .icon-svg {
    color: var(--accent3);
}

.quota-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quota-loading {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

.quota-model-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quota-model-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.quota-model-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.quota-model-usage {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.quota-model-usage strong {
    color: var(--text-primary);
    font-weight: 600;
}

.quota-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.quota-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease, background 0.3s ease;
}

.quota-progress-fill.unlimited {
    background: linear-gradient(90deg, #00cec9, #00b894);
}

.quota-progress-fill.healthy {
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
}

.quota-progress-fill.warning {
    background: linear-gradient(90deg, #fdcb6e, #e17055);
}

.quota-progress-fill.exhausted {
    background: #e17055;
    opacity: 0.7;
}

.quota-progress-fill.disabled {
    background: rgba(255,255,255,0.06);
}

/* 配额底部分隔 */
.quota-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2px 0;
}

.quota-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.quota-summary-label {
    font-size: 11px;
    color: var(--text-muted);
}

.quota-summary-value {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.quota-summary-value strong {
    color: var(--accent-light);
}

.quota-empty-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 16px 0;
    line-height: 1.6;
}

.quota-empty-hint .icon-svg {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    opacity: 0.3;
}

/* 模型展示卡片 */
.model-showcase {
    display: flex;
    animation: fadeInUp 0.6s ease-out;
}

.showcase-card {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    text-align: center;
    border: 1px solid var(--border-strong);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

/* 展示卡注销按钮 */
.showcase-logout-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
    font-family: inherit;
    backdrop-filter: blur(4px);
}
.showcase-logout-btn:hover {
    border-color: #e17055;
    color: #e17055;
    background: rgba(225, 112, 85, 0.18);
    box-shadow: 0 0 12px rgba(225, 112, 85, 0.25);
    transform: scale(1.08);
}
.showcase-logout-btn:active {
    transform: scale(0.95);
}
.showcase-logout-btn .icon-svg {
    width: 17px;
    height: 17px;
}

.showcase-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-light), 
        var(--accent2), 
        var(--accent-light), 
        transparent);
}

.showcase-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(253, 121, 168, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.showcase-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: white;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
    position: relative;
    z-index: 1;
}
.showcase-icon .icon-svg { width: 26px; height: 26px; }

.current-model-label {
    display: inline-block;
    font-size: 11px;
    color: var(--accent-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    padding: 4px 14px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    position: relative;
    z-index: 1;
}

.current-model-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #e8e8f0 0%, var(--accent-light) 50%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.current-model-desc {
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* 生成区域 */
.generation-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 输入容器 */
.input-container {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    padding: 18px 22px;
    border: 1px solid var(--border-strong);
    position: relative;
    box-shadow: var(--shadow-md);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-container:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.input-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 12px;
    flex-shrink: 0;
    min-width: 80px;
}

.upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
}

.upload-btn .icon-svg {
    width: 22px;
    height: 22px;
}

.upload-btn span {
    font-size: 11px;
    white-space: nowrap;
}

textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: transparent;
    min-height: 64px;
    max-height: 200px;
    font-family: inherit;
}

textarea::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 6px;
    position: relative;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.6);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn .icon-svg {
    width: 17px;
    height: 17px;
}

/* 输入元信息 */
.input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.upload-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.warning-text {
    color: #e17055;
    margin-left: 6px;
    font-weight: 500;
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* 生成中防刷新提示 */
.generating-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.12), rgba(225, 112, 85, 0.12));
    border: 1px solid rgba(225, 112, 85, 0.35);
    border-radius: 10px;
    color: #fab1a0;
    font-size: 13px;
    font-weight: 600;
    animation: warning-pulse 2s ease-in-out infinite;
}
.generating-warning .icon-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
@keyframes warning-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* 工具栏 */
.input-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.current-size-tag {
    font-size: 12px;
    color: var(--accent-light);
    padding: 6px 12px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.size-scene-hint {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    padding: 0 4px;
    line-height: 1.4;
    max-width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.dropdown-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
}

.dropdown-btn .icon-svg {
    width: 14px;
    height: 14px;
    color: var(--accent-light);
}

.dropdown-btn .icon-chevron {
    transition: transform 0.25s ease;
}

.dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #1e1e3a;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    min-width: 310px;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.dropdown-menu.show {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}

.dropdown-group-label {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: default;
    pointer-events: none;
}

.dropdown-group-label:first-child {
    padding-top: 12px;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.dropdown-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.dropdown-item.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-light);
    font-weight: 600;
}

.dropdown-ratio {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 42px;
}

.dropdown-scene {
    font-size: 11px;
    color: #e17055;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item:hover .dropdown-scene,
.dropdown-item.active .dropdown-scene {
    color: #ff8a65;
}

/* 数量按钮 */
.count-btn span:first-child {
    font-weight: 600;
    color: var(--accent-light);
}

.dropdown-menu-center {
    left: 50%;
    transform: translateX(-50%);
}

.toolbar-right {
    font-size: 12px;
}

/* 多图结果网格 */
.result-images.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.result-images.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.result-images.grid-2 .result-image-card,
.result-images.grid-3 .result-image-card {
    cursor: zoom-in;
}

.result-images.grid-2 .result-image-card img,
.result-images.grid-3 .result-image-card img {
    width: 100%;
    height: auto;
}

.enter-hint {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* 图片预览区 */
.image-preview-area {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    padding: 14px 18px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.3s ease-out;
    width: 100%;
}

.preview-list {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 106px;
    height: 106px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-strong);
    transition: all 0.3s ease;
}

.preview-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.25);
    transform: scale(1.03);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.preview-remove .icon-svg { width: 10px; height: 10px; }

.preview-remove:hover {
    background: #e17055;
    transform: scale(1.1);
}

/* 结果区域 */
.result-area {
    background: var(--bg-card-solid);
    border-radius: var(--radius-xl);
    padding: 20px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.4s ease-out;
    width: 100%;
}

.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 36px;
}

.spinner {
    width: 52px;
    height: 52px;
    border: 3px solid var(--border-strong);
    border-radius: 50%;
    position: relative;
    animation: spin 1.2s linear infinite;
}

.spinner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent2);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-loading p {
    color: var(--text-secondary);
    font-size: 14px;
    animation: float 2s ease-in-out infinite;
}

.result-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 生成中占位卡片 */
.generating-slot,
.error-slot {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-strong);
    width: 100%;
}

.generating-placeholder,
.error-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.generating-placeholder p {
    font-size: 13px;
    color: var(--text-secondary);
}

.spinner-small {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    position: relative;
    animation: spin 1.2s linear infinite;
}

.spinner-small::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent2);
    animation: spin 0.8s linear infinite;
}

.error-placeholder .icon-svg {
    width: 32px;
    height: 32px;
    color: #e17055;
}

.error-placeholder p {
    font-size: 14px;
    color: #e17055;
    font-weight: 500;
}

.error-slot-detail {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.result-image-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    max-width: 100%;
    cursor: zoom-in;
}

.result-image-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

.result-image-card img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 图片预览弹窗 */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-image-actions {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border-color);
}

.result-image-actions button {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.03);
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.result-image-actions button:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.1);
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.15);
}

/* ========== 视频结果 ========== */
.video-result-card {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.video-result-card video {
    width: 100%;
    display: block;
    background: #000;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.video-result-card .result-image-actions {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* 视频任务轮询状态 */
.video-task-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    width: 100%;
}

.video-task-status .spinner-small {
    flex-shrink: 0;
}

.video-task-info {
    flex: 1;
    min-width: 0;
}

.video-task-info .task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.video-task-info .task-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.video-task-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.video-task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* 视频缩略图 */
.video-thumbnail-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.video-thumbnail-wrap img {
    width: 100%;
    display: block;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-play-overlay:hover {
    background: rgba(0,0,0,0.5);
}

.video-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(108, 92, 231, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease, background 0.3s ease;
}

.video-play-btn .icon-svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}

.video-play-overlay:hover .video-play-btn {
    transform: scale(1.1);
    background: var(--accent);
}

/* 视频模型 section 间距 */
.model-section-video {
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    margin-top: 2px;
}

/* 视频历史记录 - 扁平三部分卡片 */
.video-flat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* 第一部分：文字信息 */
.video-flat-card .vf-info {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
}
.video-flat-card .vf-prompt {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
}
.video-flat-card .vf-prompt::-webkit-scrollbar { width: 4px; }
.video-flat-card .vf-prompt::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.video-flat-card .vf-prompt:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
.video-flat-card .vf-prompt:empty { display: none; }
.video-flat-card .vf-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.video-flat-card .vf-tag {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
}

/* 第二部分：视频播放器 */
.video-flat-card .vf-player {
    background: #000;
}
.video-flat-card .vf-player video {
    width: 100%;
    display: block;
    max-height: 400px;
}

/* 第三部分：按钮 */
.video-flat-card .vf-btns {
    display: flex;
    gap: 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
}
.video-flat-card .vf-btns button {
    flex: 1;
    padding: 12px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease;
}
.video-flat-card .vf-btn-primary {
    background: var(--accent);
    color: #fff;
    border-radius: 0 0 0 var(--radius-lg);
}
.video-flat-card .vf-btn-primary:hover {
    background: #5a4bd1;
}
.video-flat-card .vf-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-left: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-lg) 0;
}
.video-flat-card .vf-btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.video-flat-card .vf-btns button .icon-svg {
    width: 14px;
    height: 14px;
}

/* 历史详情条 */
.history-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(108, 92, 231, 0.08);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
}

.history-detail-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.2);
}

.history-detail-meta {
    color: var(--text-muted);
    font-size: 11px;
}

.history-detail-prompt {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border-color);
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
}
.history-detail-prompt::-webkit-scrollbar { width: 4px; }
.history-detail-prompt::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.history-detail-prompt:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
.history-detail-prompt:empty { display: none; }

/* 错误提示 */
.error-display {
    text-align: center;
    padding: 36px 28px;
    color: #e17055;
}

.error-display .icon-svg {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.error-display .error-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.error-display .error-detail {
    font-size: 13px;
    color: #e17055;
    opacity: 0.85;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 560px;
    margin: 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.error-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 14px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* ========== 登录覆盖层 ========== */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-container {
    width: 400px;
    background: var(--bg-sidebar);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(108, 92, 231, 0.08);
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.auth-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    color: white;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
}
.auth-icon .icon-svg { width: 28px; height: 28px; }

.auth-container h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.auth-input-group {
    width: 100%;
    position: relative;
    margin-bottom: 16px;
    text-align: left;
}


.auth-input-group input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.15);
}

.auth-input-group input::placeholder {
    color: var(--text-muted);
}

.auth-error {
    min-height: 20px;
    color: #e17055;
    font-size: 13px;
    text-align: center;
    margin-bottom: 8px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    letter-spacing: 2px;
    font-family: inherit;
}

.auth-btn:hover {
    box-shadow: 0 6px 28px rgba(108, 92, 231, 0.45);
    transform: translateY(-1px);
}

.auth-btn:active {
    transform: scale(0.98);
}

/* 登录/注册切换 */
.auth-toggle {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-toggle a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.auth-toggle a:hover {
    text-decoration: underline;
}

/* 注册验证码行 */
.auth-code-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}
.auth-code-row .auth-input-group {
    margin-bottom: 0;
}
.auth-sendcode-btn {
    white-space: nowrap;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 100px;
}
.auth-sendcode-btn:hover {
    background: var(--accent);
    color: #fff;
}
.auth-sendcode-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.auth-countdown {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}

/* 管理员重置凭证弹窗 */
.reset-cred-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.reset-cred-dialog {
    width: 400px;
    max-width: 90vw;
    background: var(--bg-sidebar);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
}
.reset-cred-dialog h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}
.reset-cred-user {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.reset-cred-user strong {
    color: var(--accent-light);
}
.reset-cred-hint {
    font-size: 12px;
    color: #e17055;
    margin-bottom: 12px;
}
.reset-cred-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.reset-cred-actions .confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.reset-cred-actions .confirm-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}
.reset-cred-actions .confirm-btn:hover {
    transform: translateY(-1px);
}
.admin-action-btn.cred {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(124, 58, 237, 0.3);
}
.admin-action-btn.cred:hover {
    background: rgba(124, 58, 237, 0.25);
}

/* ========== 内部布局 ========== */
.app-inner {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.app-inner .sidebar {
    overflow: hidden;
}

.app-inner .main-content {
    flex: 1;
    overflow: hidden;
}

/* 移动端顶部导航栏（PC端隐藏） */
.mobile-topbar {
    display: none;
}

/* 移动端侧边栏遮罩（PC端隐藏） */
.mobile-sidebar-overlay {
    display: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-container {
        width: 90%;
        padding: 32px 24px;
    }

    /* 移动端顶部导航栏 */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        background: var(--bg-sidebar);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 90;
        flex-shrink: 0;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        cursor: pointer;
        font-family: inherit;
    }

    .mobile-menu-btn .icon-svg {
        width: 18px;
        height: 18px;
    }

    .mobile-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--text-primary);
    }

    /* 移动端侧边栏遮罩 */
    .mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 95;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    /* 移动端整体布局 */
    .app-inner {
        flex-direction: column;
        overflow: visible;
    }

    .app-container {
        display: block;
        height: auto;
        min-height: 100vh;
    }

    /* 侧边栏改为抽屉式 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        padding: 20px 14px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar::after {
        display: none;
    }

    .sidebar-top {
        flex-direction: column;
        gap: 16px;
    }

    .sidebar-header {
        display: block;
        padding: 4px 0;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .sidebar-logout {
        margin-top: 16px;
        padding: 10px;
        font-size: 13px;
    }

    /* 模型列表恢复纵向 */
    .model-section h3 {
        display: block;
        font-size: 10px;
        margin-bottom: 10px;
    }

    .model-list {
        flex-direction: column;
        gap: 8px;
    }

    .model-card {
        padding: 12px 14px;
        gap: 10px;
        border-radius: var(--radius-md);
    }

    .model-card .model-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .model-card .model-icon .icon-svg {
        width: 16px;
        height: 16px;
    }

    .model-info h4 {
        font-size: 13px;
    }

    .model-info p {
        display: block;
        font-size: 11px;
    }

    /* 历史区域恢复纵向显示 */
    .history-section {
        display: flex;
        position: static;
        background: transparent;
        border: none;
        padding: 0;
        max-height: none;
        box-shadow: none;
    }

    .history-item .history-prompt {
        max-width: none;
    }

    /* 主内容区 */
    .main-content {
        padding: 16px 12px 24px;
        gap: 12px;
        overflow-y: visible;
        width: 100%;
        max-width: 100%;
    }

    /* 移动端工作区改为纵向 */
    .workspace {
        flex-direction: column;
        gap: 16px;
    }

    /* 移动端控制面板全宽 */
    .control-panel {
        flex: none;
        width: 100%;
        min-width: 0;
        overflow: visible;
    }

    /* 移动端预览占位图 */
    .preview-placeholder {
        min-height: 180px;
    }

    .placeholder-content .icon-svg {
        width: 40px;
        height: 40px;
    }

    .placeholder-content p {
        font-size: 12px;
    }

    /* 移动端仪表盘 */
    .dashboard {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dash-card {
        padding: 14px;
    }

    .inspiration-text {
        font-size: 13px;
    }

    .inspiration-use-btn {
        font-size: 13px;
        padding: 10px;
    }

    /* 模型展示卡片 */
    .showcase-card {
        min-width: 0;
        width: 100%;
        padding: 20px 16px;
    }

    .showcase-icon {
        width: 44px;
        height: 44px;
    }
    .showcase-icon .icon-svg { width: 20px; height: 20px; }

    .current-model-name {
        font-size: 20px;
    }

    .current-model-desc {
        font-size: 11px;
    }

    .current-model-label {
        font-size: 10px;
        padding: 3px 10px;
        margin-bottom: 8px;
    }

    /* 输入区域 */
    .input-container {
        padding: 14px 14px;
        width: 100%;
        max-width: 100%;
    }

    .input-wrapper {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .upload-btn {
        flex-direction: column;
        padding: 10px 10px;
        gap: 4px;
        border-radius: var(--radius-sm);
        min-width: 52px;
    }
    .upload-btn .icon-svg {
        width: 20px;
        height: 20px;
    }
    .upload-btn span {
        display: block;
        font-size: 10px;
    }

    textarea {
        flex: 1;
        width: auto;
        order: 0;
        min-height: 70px;
        font-size: 14px;
    }

    .send-btn {
        width: 42px;
        height: 42px;
        margin-top: 0;
        align-self: flex-end;
    }
    .send-btn .icon-svg {
        width: 16px;
        height: 16px;
    }

    /* 工具栏 */
    .input-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .toolbar-left {
        flex-wrap: wrap;
        gap: 6px;
    }

    .toolbar-right {
        display: none;
    }

    .dropdown-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .current-size-tag {
        font-size: 10px;
        padding: 5px 8px;
    }

    .size-scene-hint {
        font-size: 10px;
        margin-top: 3px;
    }

    .upload-hint {
        font-size: 10px;
    }

    /* 结果区域 */
    .result-area,
    .image-preview-area {
        max-width: 100%;
        width: 100%;
    }
    
    .result-image-card img {
        max-width: 100%;
    }

    .generation-area {
        max-width: 100%;
        width: 100%;
    }

    .result-image-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .result-image-actions button {
        font-size: 11px;
        padding: 8px 10px;
    }

    /* 移动端多图网格改为2列 */
    .result-images.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 管理员面板移动端 */
    .admin-panel {
        width: 95vw;
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }
    .admin-panel-header {
        padding: 14px 16px;
    }
    .admin-panel-header h2 {
        font-size: 16px;
    }
    .admin-panel-body {
        padding: 12px 14px;
    }
    .admin-user-card {
        padding: 12px 14px;
    }
    .admin-user-header {
        gap: 6px;
    }
    .admin-user-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .admin-hint {
        font-size: 10px;
        width: 100%;
        margin-left: 0;
    }

}

/* ========== 错误提示 Toast ========== */
.error-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: linear-gradient(135deg, #d63031, #e17055);
    color: #fff;
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 40px rgba(214, 48, 49, 0.5);
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
    white-space: nowrap;
}
.error-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 错误提示 Toast ========== */
.error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #d63031, #e17055);
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(214, 48, 49, 0.4);
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}
.error-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 确认弹窗（注销等） ========== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.confirm-dialog {
    width: 380px;
    max-width: 90vw;
    background: var(--bg-sidebar);
    border-radius: var(--radius-xl);
    padding: 36px 32px 24px;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}
.confirm-icon {
    width: 56px;
    height: 56px;
    background: rgba(225, 112, 85, 0.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.confirm-icon .icon-svg {
    width: 26px;
    height: 26px;
    color: #e17055;
}
.confirm-dialog h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}
.confirm-dialog p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.confirm-actions {
    display: flex;
    gap: 12px;
}
.confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
}
.confirm-btn:hover {
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.08);
}
.confirm-btn.danger {
    background: rgba(225, 112, 85, 0.15);
    border-color: rgba(225, 112, 85, 0.4);
    color: #e17055;
}
.confirm-btn.danger:hover {
    background: #e17055;
    border-color: #e17055;
    color: #fff;
    box-shadow: 0 4px 20px rgba(225, 112, 85, 0.35);
}

/* ========== 配额设置弹窗（可视化） ========== */
.quota-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.quota-modal {
    width: 780px;
    max-width: 94vw;
    max-height: 82vh;
    background: var(--bg-sidebar);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(108, 92, 231, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s ease-out;
}
@media (max-width: 840px) {
    .quota-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    .quota-modal-body {
        padding: 16px;
        grid-template-columns: 1fr;
    }
}
.quota-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.qmm-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--text-primary);
}
.qmm-title .icon-svg {
    width: 20px;
    height: 20px;
    color: var(--accent-light);
}
.qmm-title strong {
    color: var(--text-primary);
}
.qmm-close {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}
.qmm-close:hover {
    color: #e17055;
    border-color: rgba(225, 112, 85, 0.3);
    background: rgba(225, 112, 85, 0.1);
}
.quota-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-content: start;
}
.qmm-hint {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
    line-height: 1.5;
}
.quota-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}
.qmm-cancel-btn {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.qmm-cancel-btn:hover {
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.08);
}
.qmm-save-btn {
    padding: 10px 28px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}
.qmm-save-btn:hover {
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    transform: translateY(-1px);
}
.qmm-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 配额模型卡片 */
.quota-model-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
}
.quota-model-card:hover {
    border-color: var(--border-strong);
}
.quota-model-card.disabled {
    opacity: 0.55;
    border-color: var(--border-color);
}
.quota-model-card.unlimited {
    border-color: rgba(0, 206, 201, 0.35);
    box-shadow: 0 0 16px rgba(0, 206, 201, 0.08);
}
.quota-model-card.limited {
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 16px rgba(108, 92, 231, 0.06);
}

.qmc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}
.qmc-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.qmc-icon .icon-svg {
    width: 16px;
    height: 16px;
}
.qmc-info {
    flex: 1;
    min-width: 0;
}
.qmc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.3px;
}
.qmc-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.qmc-status-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.qmc-status-badge.on {
    background: rgba(0, 206, 201, 0.12);
    color: var(--accent3);
}
.qmc-status-badge.off {
    background: rgba(225, 112, 85, 0.1);
    color: #e17055;
}

.qmc-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

/* 开关行 */
.qmc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qmc-toggle-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.qmc-switch {
    position: relative;
    width: 44px;
    height: 26px;
    display: inline-block;
    cursor: pointer;
}
.qmc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.qmc-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
    border-radius: 26px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-strong);
}
.qmc-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.qmc-switch input:checked + .qmc-slider {
    background: var(--accent);
    border-color: var(--accent);
}
.qmc-switch input:checked + .qmc-slider::before {
    background: #fff;
    transform: translateX(18px);
}

/* 额度计数器行 */
.qmc-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qmc-value-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.qmc-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
}
.qmc-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
}
.qmc-btn:hover:not(:disabled) {
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-light);
}
.qmc-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.qmc-count-input {
    width: 56px;
    height: 26px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    font-family: inherit;
    padding: 0 4px;
    transition: all 0.2s ease;
    /* 隐藏数字输入框的上下箭头 */
    -moz-appearance: textfield;
    appearance: textfield;
}
.qmc-count-input::-webkit-outer-spin-button,
.qmc-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qmc-count-input:focus {
    border-color: var(--accent-light);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.15);
}
.qmc-count-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255,255,255,0.02);
}
.qmc-count-input::placeholder {
    color: var(--text-muted);
}

/* 快捷预设按钮 */
.qmc-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.qmc-preset {
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}
.qmc-preset:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.08);
}
.qmc-preset.active {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(108, 92, 231, 0.15);
    font-weight: 600;
}

/* ========== 提示词反推功能 ========== */
.reverse-prompt-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 反推工作区：左右两栏 */
.reverse-workspace {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    align-items: start;
}

.reverse-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.reverse-right {
    position: sticky;
    top: 16px;
}

.reverse-right .dash-card {
    margin: 0;
}

@media (max-width: 900px) {
    .reverse-workspace {
        grid-template-columns: 1fr;
    }
    .reverse-right {
        position: static;
    }
}

/* 上排：上传区 + 预览卡片并排 */
.reverse-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}
@media (max-width: 768px) {
    .reverse-row {
        flex-direction: column;
    }
}

/* 上传区域 */
.reverse-upload-zone {
    flex: 1;
    min-height: 220px;
    border: 2px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.35s ease;
    background: rgba(255,255,255,0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.reverse-upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(243,156,18,0.04) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.reverse-upload-zone:hover {
    border-color: rgba(243,156,18,0.5);
    background: rgba(243,156,18,0.05);
    box-shadow: 0 0 30px rgba(243,156,18,0.08);
}
.reverse-upload-zone:hover::before {
    opacity: 1;
}
.reverse-upload-inner {
    text-align: center;
    position: relative;
    z-index: 1;
}
.reverse-upload-icon {
    width: 52px;
    height: 52px;
    color: rgba(243,156,18,0.35);
    margin: 0 auto 14px;
    display: block;
    transition: all 0.3s ease;
}
.reverse-upload-zone:hover .reverse-upload-icon {
    color: rgba(243,156,18,0.7);
    transform: scale(1.08);
}
.reverse-upload-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}
.reverse-upload-zone:hover .reverse-upload-title {
    color: var(--text-primary);
}
.reverse-upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* 预览卡片 */
.reverse-preview-card {
    flex: 1;
    min-height: 220px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.3s ease-out;
}
.reverse-preview-img-wrap {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}
.reverse-preview-img-wrap img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    display: block;
}
.reverse-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    backdrop-filter: blur(4px);
}
.reverse-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}
.reverse-preview-info {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
}
.reverse-preview-label {
    font-size: 12px;
    color: rgba(243,156,18,0.8);
    font-weight: 600;
}

/* ===== 等级选择器：分段控制器风格 ===== */
.reverse-level-selector {
    margin: 14px 0 0;
}

/* 分段控件容器 */
.reverse-level-segmented {
    display: flex;
    position: relative;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 3px;
    gap: 2px;
}

/* 隐藏 radio */
.reverse-level-segmented input[type="radio"] {
    display: none;
}

/* 每个 tab 标签 */
.level-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 4px;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: calc(var(--radius-lg) - 3px);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-faint);
    user-select: none;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.level-tab svg {
    opacity: 0.5;
    transition: opacity 0.25s ease;
    flex-shrink: 0;
}

/* 选中状态：浮起 + 渐变背景 */
.level-tab.active {
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
}
.level-tab[data-level="normal"].active {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
}
.level-tab[data-level="normal"].active svg { opacity: 1; }

.level-tab[data-level="expert"].active {
    background: linear-gradient(135deg, #8b6fd9, #7055c8);
    color: #fff;
}
.level-tab[data-level="expert"].active svg { opacity: 1; }

.level-tab[data-level="master"].active {
    background: linear-gradient(135deg, #d97a35, #c86a20);
    color: #fff;
}
.level-tab[data-level="master"].active svg { opacity: 1; }

/* hover 未选中 */
.level-tab:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
}
.level-tab:hover:not(.active) svg { opacity: 0.8; }

/* 提示文字 */
.reverse-level-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-faint);
    line-height: 1.45;
    padding-left: 4px;
    transition: color 0.25s ease;
}

/* 反推按钮 */
.reverse-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(231,76,60,0.2);
}
.reverse-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(243,156,18,0.4);
}
.reverse-send-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.reverse-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.reverse-send-btn .icon-svg {
    width: 20px;
    height: 20px;
}

/* 加载动画 */
.reverse-loading-block {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}
.reverse-loading-block .spinner {
    margin: 0 auto 18px;
}
.reverse-loading-block p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 结果卡片 */
.reverse-result-card {
    background: var(--bg-card-solid);
    border: 1px solid rgba(243,156,18,0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 0 20px rgba(243,156,18,0.06);
}
.reverse-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.reverse-result-header .icon-svg {
    width: 18px;
    height: 18px;
    color: #f39c12;
}
.reverse-result-header > span {
    flex: 1;
}
.reverse-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.reverse-copy-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.2);
}
.reverse-copy-btn .icon-svg {
    width: 15px;
    height: 15px;
}
.reverse-result-text {
    padding: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 320px;
    overflow-y: auto;
}
.reverse-result-text::-webkit-scrollbar { width: 5px; }
.reverse-result-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.reverse-use-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-top: 1px solid var(--border-color);
    background: rgba(108,92,231,0.08);
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.reverse-use-btn:hover {
    background: rgba(108,92,231,0.18);
}
.reverse-use-btn .icon-svg {
    width: 16px;
    height: 16px;
}

/* 错误卡片 */
.reverse-error-card {
    background: rgba(225,112,85,0.06);
    border: 1px solid rgba(225,112,85,0.2);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}
.reverse-error-card .icon-svg {
    width: 36px;
    height: 36px;
    color: #e17055;
    margin: 0 auto 12px;
    display: block;
}
.reverse-error-card p {
    font-size: 14px;
    color: #e17055;
    margin-bottom: 16px;
    line-height: 1.5;
}
.reverse-retry-btn {
    padding: 8px 24px;
    border: 1px solid rgba(225,112,85,0.3);
    border-radius: var(--radius-md);
    background: rgba(225,112,85,0.08);
    color: #e17055;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
}
.reverse-retry-btn:hover {
    background: rgba(225,112,85,0.18);
    border-color: rgba(225,112,85,0.5);
}

@media (max-width: 768px) {
    .reverse-upload-zone { min-height: 160px; padding: 24px 16px; }
    .reverse-upload-icon { width: 36px; height: 36px; }
    .reverse-upload-title { font-size: 14px; }
    .reverse-preview-card { min-height: 180px; }
    .reverse-result-text { max-height: 200px; font-size: 13px; }
}

/* ---------- 右侧反推结果预览区 ---------- */

.reverse-preview-waiting,
.reverse-preview-loading,
.reverse-preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    border-radius: 12px;
    background: var(--card-bg, #1a1d2e);
    border: 2px dashed var(--border-color, #2a2d3e);
}

.reverse-preview-waiting .icon-svg,
.reverse-preview-loading .icon-svg,
.reverse-preview-error .icon-svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.reverse-preview-waiting p,
.reverse-preview-loading p,
.reverse-preview-error p {
    color: var(--text-muted, #6b7280);
    font-size: 14px;
    line-height: 1.6;
}

.reverse-preview-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(243,156,18,0.2);
    border-top-color: #f39c12;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.reverse-preview-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #1a1d2e);
    border: 1px solid var(--border-color, #2a2d3e);
    border-radius: 16px;
    overflow: hidden;
}

.reverse-preview-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(243,156,18,0.08);
    border-bottom: 1px solid rgba(243,156,18,0.15);
    font-size: 14px;
    font-weight: 600;
    color: #f39c12;
}

.reverse-preview-card-header .icon-svg {
    width: 18px;
    height: 18px;
}

.reverse-preview-card-text {
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary, #e5e7eb);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-primary, #13141f);
}

.reverse-preview-card-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color, #2a2d3e);
}

.reverse-preview-card-actions.reverse-preview-use-actions {
    border-top: none;
    padding-top: 0;
}

.reverse-preview-copy-btn,
.reverse-preview-use-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.reverse-preview-copy-btn {
    background: transparent;
    color: var(--text-secondary, #9ca3af);
    border-color: var(--border-color, #2a2d3e);
    flex: 1;
}

.reverse-preview-copy-btn:hover {
    background: var(--hover-bg, rgba(255,255,255,0.05));
    color: var(--text-primary, #e5e7eb);
}

.reverse-preview-copy-btn .icon-svg {
    width: 14px;
    height: 14px;
}

.reverse-preview-use-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    flex: 1;
}

.reverse-preview-use-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.reverse-preview-use-btn .icon-svg {
    width: 14px;
    height: 14px;
}

/* ---------- 中英文双栏显示 ---------- */

.reverse-result-zh {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary, #b0b7c3);
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 10px;
}

.reverse-result-en-label {
    font-size: 11px;
    color: #f39c12;
    margin-bottom: 6px;
    padding: 0 2px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.reverse-result-en {
    padding: 0 2px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary, #e5e7eb);
    white-space: pre-wrap;
    word-break: break-word;
}

.reverse-preview-zh {
    padding: 16px 20px 12px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary, #b0b7c3);
    background: rgba(255,255,255,0.02);
}

.reverse-preview-divider {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #f39c12;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: rgba(243,156,18,0.05);
}

.reverse-preview-divider::before,
.reverse-preview-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(243,156,18,0.2);
    margin: 0 10px;
}

/* ---------- 历史记录缩略图 ---------- */

.reverse-history-thumb {
    padding: 12px 16px 0;
    text-align: center;
}

.reverse-history-thumb img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color, #2a2d3e);
}

.reverse-history-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.reverse-history-actions.reverse-history-use-actions {
    padding-top: 8px;
}

.reverse-history-actions .reverse-use-btn {
    flex: 1;
    margin: 0;
}
