/* ========== 全局滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    transition: all 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* 文本域滚动条特别处理 */
textarea::-webkit-scrollbar {
    width: 6px;
}

textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== 基础样式 ========== */
:root {
    --primary-color: #FFD60A;
    /* iOS System Yellow - 更明亮、纯净的黄 */
    --primary-dark: #D4B000;
    --bg-color: #000000;
    /* 极致纯黑背景，提升对比度 */
    --bg-secondary: #1C1C1E;
    /* iOS 深色模式卡片色 */
    --bg-card: #2C2C2E;
    /* 稍微亮一点的层级 */
    --text-color: #F2F2F7;
    /* Apple 系统的主要文本色 */
    --text-secondary: #8E8E93;
    /* Apple 系统的次要文本色 */
    --border-color: #38383A;
    --success-color: #30D158;
    /* iOS Green */
    --error-color: #FF453A;
    /* iOS Red */
    --radius: 16px;
    /* 更圆润的角 */
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --input-bg: #1C1C1E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    /* 字体抗锯齿 */
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    animation: fadeIn 0.8s ease-out;
    /* 全局淡入 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* ========== 导航栏 ========== */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(28, 28, 30, 0.7);
    /* 降低不透明度 */
    backdrop-filter: blur(20px);
    /* 磨砂效果 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

/* 滚动时导航栏阴影加深（需要JS配合，或者就这样也不错） */
.main-nav:hover {
    background: rgba(28, 28, 30, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-brand a {
    font-family: 'Outfit', -apple-system, sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 品牌名部分 */
.brand-name {
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* 品牌Logo动态光点 */
.brand-name::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -4px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
    animation: pulseLogo 3s infinite;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* 分隔符 */
.brand-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    transform: rotate(15deg);
}

/* 产品/板块名部分 */
.product-name {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    /* 垂直居中对齐 */
    gap: 0.8rem;
    /* 稍微减小间距，更紧凑 */
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #000;
    /* 选中态黑色文字 */
    background: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 214, 10, 0.3);
}

/* 导航链接的流光效果（仅选中态） */
.nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: navShine 3s infinite;
}

@keyframes navShine {

    0%,
    80% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.nav-admin {
    font-size: inherit;
}

/* ========== 主内容区 ========== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 140px);
}

/* ========== 页脚 ========== */
.main-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* ========== 生成工作台 ========== */
.generate-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

/* 背景光晕装饰 - 动态呼吸版 */
.generate-container::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 214, 10, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
    animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
}

.generate-container h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FFD60A 0%, #FF9F0A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(255, 214, 10, 0.15);
    /* 增加文字辉光 */
    font-weight: 700;
    letter-spacing: -0.02em;
}

.generate-form {
    background: rgba(44, 44, 46, 0.6);
    /* 稍微增加不透明度，提升质感 */
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
    /* 增加内发光层次 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    /* 增强磨砂效果 */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.generate-form:hover {
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 30px rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

/* 表单顶部的装饰线 - 增强流光感 */
.generate-form::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 214, 10, 0.5), transparent);
    opacity: 0.5;
    box-shadow: 0 0 10px rgba(255, 214, 10, 0.3);
}


/* 参考图上传卡片 */
.ref-upload-card {
    display: inline-block;
}

.ref-input-hidden {
    display: none;
}

.ref-placeholder {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border);
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ref-placeholder:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.ref-plus {
    font-size: 2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.ref-placeholder:hover .ref-plus {
    color: var(--primary);
}

.ref-preview-card {
    position: relative;
    display: inline-block;
}

.ref-preview-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

.ref-clear-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-clear-btn:hover {
    background: #c0392b;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    /* 增加一点间距，让 Label 与输入框关系更舒展 */
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
    padding-left: 4px;
    /* 增加一点左对齐的微调，视觉上更整齐 */
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    /* 增加内边距 */
    background: rgba(0, 0, 0, 0.3);
    /* 更深的背景 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    /* 统一使用 16px 圆角 */
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    /* 增加行高 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    /* 更深的内阴影 */
}

.form-group select:hover,
.form-group input:hover,
.form-group textarea:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 214, 10, 0.5);
    /* 扩散的光晕，像呼吸灯一样 */
    box-shadow:
        0 0 0 4px rgba(255, 214, 10, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 214, 10, 0.1);
    transform: translateY(-1px);
    /* 聚焦时微动 */
}

/* 下拉框不显示焦点光晕 */
.form-group select:focus {
    outline: none;
    background: #2C2C2E;
    border-color: transparent;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group select:focus-visible {
    outline: none;
    border-color: transparent;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ========== 按钮 ========== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.2rem 2rem;
    /* 金色渐变，更有层次 */
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.15) 0%, rgba(255, 214, 10, 0.05) 100%);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    border: 1px solid rgba(255, 214, 10, 0.3);
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* 按钮内部的高光流光效果 */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 214, 10, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(255, 214, 10, 0.25) 0%, rgba(255, 214, 10, 0.15) 100%);
    border-color: rgba(255, 214, 10, 0.8);
    box-shadow:
        0 10px 30px rgba(255, 214, 10, 0.2),
        inset 0 0 20px rgba(255, 214, 10, 0.1);
    /* 外发光 + 内发光 */
    transform: translateY(-3px);
    color: #FFF;
    /* hover 时文字变白，更清晰 */
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.5);
}

.btn-primary:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: rgba(255, 214, 10, 0.1);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

/* 加载动画修正 */
.btn-primary .loading-spinner {
    border-color: rgba(255, 214, 10, 0.3);
    border-top-color: var(--primary-color);
}

.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
}

.btn-small:hover {
    background: var(--border-color);
}

.btn-danger {
    color: var(--error-color);
    border-color: var(--error-color);
}

.btn-danger:hover {
    background: var(--error-color);
    color: #fff;
}

.btn-download {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: #000;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ========== 错误提示 ========== */
.error-msg {
    background: rgba(239, 68, 68, 0.15);
    /* 稍微加深 */
    border: 1px solid var(--error-color);
    color: #ff8580;
    /* 亮一点的红色 */
    padding: 1.2rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInUp 0.4s ease-out;
}

/* 错误图标 */
.error-msg::before {
    content: '⚠️';
    font-size: 1.2rem;
}

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

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

.error-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* ========== 任务结果页 ========== */
.job-container {
    max-width: 900px;
    margin: 0 auto;
}

.job-status {
    font-size: 1.25rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.status-done {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-processing {
    background: rgba(245, 197, 24, 0.1);
    color: var(--primary-color);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* 图片对比展示 */
.images-comparison {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.image-box {
    flex: 1;
    min-width: 280px;
    max-width: 500px;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.image-box .image-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.image-box img {
    max-width: 100%;
    max-height: 450px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.ref-image-box {
    border: 2px dashed var(--border);
}

.result-image-box {
    border: 2px solid var(--primary);
}

.result-image-box .image-label {
    color: var(--primary);
}

.image-box .btn-download {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.image-box .btn-download:hover {
    opacity: 0.85;
}

/* ========== 结果页面图片展示 ========== */
.result-images-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.result-ref-box {
    flex-shrink: 0;
    width: 180px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.result-ref-box img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

.result-main-box {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.result-main-box img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    /* 保持图片原始比例 */
    object-fit: contain;
}

.result-main-box .image-label {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.result-ref-box .image-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-actions {
    margin-top: 1rem;
}

/* 响应式：小屏幕优化 */
@media (max-width: 768px) {

    /* ===== 主内容区域优化 ===== */
    .main-content {
        padding: 1.5rem 1rem;
        /* 提供适当的左右边距 */
    }

    /* ===== 页脚优化 ===== */
    .main-footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    /* ===== 导航栏优化 ===== */
    .main-nav {
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
        /* 不换行 */
        gap: 1rem;
        background: rgba(28, 28, 30, 0.95);
        /* 稍微增加不透明度 */
    }

    .nav-brand a {
        font-size: 1.15rem;
    }

    .brand-name {
        font-size: 1.15rem;
        font-weight: 700;
    }

    .product-name {
        display: none;
        /* 小屏隐藏副标题，保持简洁 */
    }

    .brand-divider {
        display: none;
    }

    /* 导航链接容器 */
    .nav-links {
        background: transparent;
        /* 移除背景 */
        padding: 0;
        border: none;
        gap: 0.6rem;
        margin-left: auto;
        /* 推到右侧 */
    }

    /* 导航链接样式 */
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        /* 防止文字换行 */
        border-radius: 8px;
        font-weight: 500;
    }

    .nav-link.active {
        padding: 0.5rem 1rem;
        box-shadow: 0 2px 8px rgba(255, 214, 10, 0.4);
    }

    /* 隐藏管理后台链接 */
    .nav-admin-link {
        display: none;
    }

    .generate-form {
        padding: 1.5rem;
        /* 减小内边距 */
        border-radius: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .ref-upload-container {
        padding: 16px;
    }
}

.job-details {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.detail-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-item label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

.ai-prompt {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    word-break: break-all;
}

/* ========== 评分区域 ========== */
.rating-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 2rem;
}

.rating-section h3 {
    margin-bottom: 0.5rem;
}

.rating-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.rating-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rating-btn {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-btn:hover {
    transform: scale(1.1);
}

.rating-btn.positive:hover {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
}

.rating-btn.negative:hover {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.rating-btn.selected {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.5);
}

.rating-btn.selected.positive {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.3);
}

.rating-btn.selected.negative {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.3);
}

/* 评价输入区域 */
.rating-comment {
    margin-top: 1.5rem;
}

.rating-comment .selected-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.rating-comment .selected-rating span {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
}

.btn-change-rating {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-change-rating:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.rating-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.rating-comment textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.rating-comment-saved {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.rating-done {
    color: var(--success-color);
    font-size: 1.1rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================================================
   优秀案例页面 (Cases Page) - 高级感样式
   ========================================================================== */

/* 筛选栏样式优化 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
    /* 居中筛选更高级 */
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    /* 更轻的背景 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 214, 10, 0.15);
    color: var(--primary-color);
    border-color: rgba(255, 214, 10, 0.5);
    box-shadow: 0 0 15px rgba(255, 214, 10, 0.15);
    font-weight: 500;
}

/* 案例卡片网格优化 */
.cases-grid {
    display: grid;
    /* 响应式调整，让卡片更大气 - 缩小卡片尺寸 */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.case-card {
    background: rgba(44, 44, 46, 0.3);
    /* 半透明背景 */
    border-radius: 12px;
    /* 稍微减小圆角 */
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    backdrop-filter: blur(10px);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(44, 44, 46, 0.5);
}

.case-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.case-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

/* 图片遮罩效果 */
.case-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.case-card:hover .case-image::after {
    opacity: 1;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

.case-info {
    padding: 1rem;
}

.case-prompt {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    /* 稍微降低亮度，减少视觉干扰 */
    height: 2.4rem;
    /* 固定两行高度 0.85 * 1.4 * 2 ≈ 2.4 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.case-meta {
    display: flex;
    justify-content: space-between;
    /* 两端对齐更整齐 */
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
}

.case-type {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.case-stats {
    display: flex;
    gap: 12px;
}

.case-rating,
.case-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== 分页控件优化 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
    margin-top: 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.page-btn:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.05);
}

.page-info {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 0 10px;
}

.page-current {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255, 214, 10, 0.3);
}

.page-total {
    font-weight: 500;
}

.page-sep {
    font-weight: 300;
    opacity: 0.5;
}

.page-count {
    margin-left: 8px;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ===== 页码序号样式 ===== */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.page-num:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.page-num.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 0 15px rgba(255, 214, 10, 0.4);
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0 4px;
    opacity: 0.5;
}

.page-total-info {
    margin-left: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ========== 案例详情 ========== */
.case-detail-container {
    max-width: 1000px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    color: var(--text-color);
}

.case-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .case-detail {
        grid-template-columns: 1fr;
    }
}

.case-image-large {
    text-align: center;
}

.case-image-large img {
    max-width: 100%;
    border-radius: var(--radius);
}

.case-info-detail {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.case-meta-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.case-type-badge,
.case-rating-badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.case-rating-badge {
    background: rgba(245, 197, 24, 0.2);
    color: var(--primary-color);
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.prompt-text {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.25rem 0;
}

.action-buttons {
    margin-top: 1.5rem;
}

.action-buttons .btn-primary {
    width: auto;
}

/* ========== 管理后台二级导航 ========== */
.admin-nav {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    margin: -2rem -2rem 2rem -2rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.admin-nav-item {
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.admin-nav-item:hover {
    color: var(--text-color);
    background: var(--bg-card);
}

.admin-nav-item.active {
    color: var(--primary-color);
    background: rgba(245, 197, 24, 0.1);
    font-weight: 600;
}

.admin-nav-logout {
    margin-left: auto;
    color: var(--error-color);
}

.admin-nav-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========== 管理导航下拉列表框 ========== */
.admin-nav-dropdown {
    position: relative;
    margin-left: auto;
}

.admin-nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.admin-nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.admin-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
    overflow: hidden;
}

.admin-nav-dropdown:hover .admin-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.dropdown-item:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.4rem 0;
}

.dropdown-logout {
    color: var(--error-color);
}

.dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
}

/* ========== 管理后台 ========== */
.admin-container {
    max-width: 1100px;
    margin: 0 auto;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.admin-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.menu-item {
    display: block;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.menu-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.menu-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.menu-text {
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.menu-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========== 管理表格 ========== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.case-thumbnail {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}

.case-thumbnail-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.case-thumbnail-sm:hover {
    transform: scale(1.1);
}

.ref-cell {
    text-align: center;
}

.no-ref {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ref-images-stack {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-images-stack img {
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.ref-more {
    margin-left: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 10px;
}

.prompt-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-cell {
    white-space: nowrap;
    font-size: 0.85rem;
}

.toggle-featured-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
}

.toggle-featured-btn.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
}

/* ========== 经验管理 ========== */
.add-experience-form {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.add-experience-form h3 {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
}

.form-row input:first-child {
    flex: 2;
}

.keyword-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.1rem;
}

.sentiment-badge {
    display: inline-block;
    font-size: 1.2rem;
}

.confidence-bar {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    position: relative;
}

.confidence-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--confidence);
    background: rgba(245, 197, 24, 0.3);
    border-radius: 4px;
}

.content-cell {
    max-width: 250px;
}

/* ========== 经验卡片列表 ========== */
/* 经验管理表格 */
.exp-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.exp-table th {
    background: var(--bg-secondary);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.exp-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: middle;
}

.exp-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.exp-id {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.exp-type-badge {
    padding: 0.15rem 0.4rem;
    background: var(--bg-secondary);
    border-radius: 3px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.exp-sentiment {
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.exp-sentiment.positive {
    color: var(--success-color);
}

.exp-sentiment.negative {
    color: var(--error-color);
}

.exp-content-cell {
    max-width: 350px;
}

.exp-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.exp-keywords {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.keyword-tag-sm {
    padding: 0.1rem 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.confidence-bar {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: linear-gradient(90deg, var(--primary) var(--conf), transparent var(--conf));
    border-radius: 3px;
    font-size: 0.8rem;
    min-width: 45px;
    text-align: center;
}

.exp-use {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.exp-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 120px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    border: none;
}

.btn-sm.btn-danger {
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.btn-sm.btn-danger:hover {
    background: var(--error-color);
    color: white;
}

.confidence-value {
    font-weight: 600;
}

.confidence-value.high {
    color: var(--success-color);
}

.confidence-value.medium {
    color: var(--primary-color);
}

.confidence-value.low {
    color: var(--error-color);
}

/* ========== 登录页 ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 1.5rem;
}

.login-form {
    text-align: left;
}

.login-form .btn-primary {
    margin-top: 1rem;
}

.login-box .back-link {
    display: block;
    margin-top: 1.5rem;
}

/* ========== 系统状态 ========== */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.status-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.status-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.status-card ul {
    list-style: none;
}

.status-card li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.status-card.warning {
    border-left: 4px solid var(--primary-color);
}

.orphan-count {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.orphan-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.orphan-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.orphan-list code {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========== 案例详情展开行 ========== */
.case-detail-row td {
    padding: 0 !important;
    background: var(--bg-secondary);
}

.case-detail-panel {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-section label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-section p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-prompt-text {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

.expand-btn {
    background: var(--bg-secondary);
}

.case-thumbnail.clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.case-thumbnail.clickable:hover {
    transform: scale(1.1);
}

/* ========== 图片放大模态框 ========== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.image-modal .modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
}

.image-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.image-modal .modal-close:hover {
    color: var(--primary-color);
}

/* ========== 任务管理页面 ========== */
.job-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stat-dot.done {
    background: var(--success-color);
}

.stat-dot.pending {
    background: var(--primary-color);
}

.stat-dot.processing {
    background: #3b82f6;
}

.stat-dot.error {
    background: var(--error-color);
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.status-badge.done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.status-badge.pending {
    background: rgba(245, 197, 24, 0.15);
    color: var(--primary-color);
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
}

.error-cell {
    max-width: 180px;
}

.error-text {
    color: var(--error-color);
    font-size: 0.85rem;
}

.error-detail {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.job-detail-row td {
    padding: 0 !important;
    background: var(--bg-secondary);
}

.job-detail-panel {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ========== 调试模式开关 ========== */
.debug-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.debug-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.debug-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.debug-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.debug-toggle input:checked+.toggle-slider {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: var(--error-color);
}

.debug-toggle input:checked+.toggle-slider:before {
    transform: translateX(26px);
    background-color: var(--error-color);
}

.debug-status {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.debug-status.active {
    color: var(--error-color);
    font-weight: 600;
}

.status-card.debug-active {
    border: 2px solid var(--error-color);
    background: rgba(239, 68, 68, 0.05);
}

.status-card.debug-active h3 {
    color: var(--error-color);
}

/* ========== 调试模式横幅 ========== */
.debug-banner {
    background: linear-gradient(90deg, #dc2626, #b91c1c);
    color: white;
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.debug-banner .icon {
    font-size: 1.1rem;
}

.debug-banner a {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
}

.debug-banner a:hover {
    opacity: 0.9;
}

/* ========== 维护模式页面 ========== */
.maintenance-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.maintenance-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.maintenance-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.maintenance-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.maintenance-container .hint {
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   新增/迁移的高级感样式 (Generate Page)
   ========================================================================== */

/* ========== 进度条样式 ========== */
.progress-bar {
    margin-top: 24px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    backdrop-filter: none;
    transition: all 0.5s ease;
    max-width: 400px;
    /* 限制宽度，更精致 */
    margin-left: auto;
    margin-right: auto;
}

/* 去掉背景流光 */
.progress-bar::before {
    display: none;
}

.progress-status {
    text-align: center;
    font-size: 13px;
    /* 更小的字号 */
    color: rgba(255, 255, 255, 0.5);
    /* 弱化文字颜色 */
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    font-weight: 400;
    /* 减轻字重 */
    text-shadow: none;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

/* 进度条轨道 */
.progress-track {
    position: relative;
    height: 3px;
    /* 极细轨道 */
    background: rgba(255, 255, 255, 0.08);
    /* 非常淡的轨道背景 */
    border-radius: 1.5px;
    overflow: hidden;
    box-shadow: none;
}

/* 进度条填充 - 能量光束效果 */
.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 1.5px;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 8px rgba(255, 214, 10, 0.3);
    /* 柔和的光晕 */
}

/* 进度条前端的高亮头 */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    /* 较短的高亮拖尾 */
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
    opacity: 0.8;
    border-radius: 0 1.5px 1.5px 0;
}

/* 进度条完成状态 */
.progress-bar.success {
    background: transparent;
    border: none;
    box-shadow: none;
}

.progress-bar.success .progress-fill {
    background: var(--success-color);
    box-shadow: 0 0 8px rgba(48, 209, 88, 0.3);
}

.progress-bar.success .progress-status {
    color: var(--success-color);
    text-shadow: none;
    font-weight: 500;
}

/* 进度条完成状态 - 成功后的特效 */
.progress-bar.success {
    background: rgba(48, 209, 88, 0.15);
    /* 绿色背景 */
    border-color: var(--success-color);
    box-shadow: 0 0 30px rgba(48, 209, 88, 0.2);
}

.progress-bar.success .progress-fill {
    background: linear-gradient(90deg, #30D158, #34C759);
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.6);
}

.progress-bar.success .progress-status {
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(48, 209, 88, 0.4);
    animation: pulseText 1s infinite alternate;
}

@keyframes pulseText {
    from {
        opacity: 0.8;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 214, 10, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

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

.loading-text {
    vertical-align: middle;
}

/* ===== 多图上传样式 ===== */
.ref-upload-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.25);
    /* 加深背景，突出内容 */
    /* 修改：平时状态极细实线 */
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    min-height: 140px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-items: center;
    position: relative;
    /* 更细腻的点阵背景 */
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 16px 16px;
}

.ref-upload-container:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.ref-upload-container.drag-over {
    /* 拖拽进入时显示明显的高亮虚线 */
    border: 1px dashed var(--primary-color);
    background-color: rgba(255, 214, 10, 0.05);
    box-shadow: 0 0 30px rgba(255, 214, 10, 0.1) inset;
    transform: scale(1.01);
    /* 轻微放大反馈 */
}


.ref-images-list {
    display: contents;
}

.ref-image-card {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ref-image-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 2;
    /* 悬浮时层级提高 */
}

/* 悬浮时的遮罩效果 */
.ref-image-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    /* 确保不阻挡内部按钮点击 */
}

.ref-image-card:hover::after {
    opacity: 1;
}

.ref-image-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: scale(0.95);
    border-color: var(--primary-color);
}

.ref-image-card.drag-over {
    border-color: var(--success-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(48, 209, 88, 0.3);
}

.ref-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* 悬浮时图片微动 */
.ref-image-card:hover img {
    transform: scale(1.1);
}

.ref-image-number {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 214, 10, 0.3);
    z-index: 3;
    transition: opacity 0.2s;
}

/* 悬浮时隐藏序号，减少视觉杂乱，或者保留看喜好。这里选择保留但变暗 */
.ref-image-card:hover .ref-image-number {
    opacity: 0.5;
}

.ref-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 10;
    transition: all 0.2s ease;
}

.ref-image-card:hover .ref-image-remove {
    opacity: 1;
}

.ref-image-remove:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.ref-add-btn {
    width: 100px;
    height: 100px;
    /* 更细致的边框 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ref-add-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    /* 悬浮上移 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 214, 10, 0.1);
    /* 增加光晕 */
}

.ref-add-btn.hidden {
    display: none;
}

.ref-add-btn .ref-plus {
    font-size: 32px;
    font-weight: 200;
    line-height: 1;
    transition: transform 0.3s;
}

.ref-add-btn:hover .ref-plus {
    transform: scale(1.2) rotate(90deg);
}

.ref-add-text {
    font-size: 12px;
    opacity: 0.7;
    font-weight: 500;
}

.ref-input-hidden {
    display: none;
}

/* ===== 自定义下拉框 ===== */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.select-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.custom-select.open .select-trigger {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.select-value {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.select-arrow {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.open .select-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1C1C1E;
    /* 稍微亮一点的背景 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    backdrop-filter: blur(20px);
    /* 磨砂效果 */
}

.custom-select.open .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.select-option {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 4px;
    margin-bottom: 2px;
}

.select-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.select-option.selected {
    background: rgba(255, 214, 10, 0.15);
}

.select-option.selected .option-text {
    color: var(--primary-color);
    font-weight: 600;
}

.option-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.option-desc {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* 下拉框滚动条 */
.select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   移动端优化 (Mobile Optimization for Generate Page)
   ========================================================================== */

@media (max-width: 768px) {

    /* ===== 生成页面容器优化 ===== */
    .generate-container {
        padding: 0 1rem;
        /* 添加左右padding，提供呼吸空间 */
    }

    .generate-container::before {
        width: 500px;
        height: 500px;
        top: -80px;
        opacity: 0.6;
        /* 降低背景光晕强度 */
    }

    .generate-container h1 {
        font-size: 1.8rem;
        margin-bottom: 1.2rem;
        text-align: center;
        /* 标题居中 */
        padding: 0;
    }

    /* ===== 表单整体优化 ===== */
    .generate-form {
        padding: 1.5rem;
        border-radius: 18px;
        margin: 0 auto;
        /* 居中显示 */
        max-width: 100%;
        /* 确保不超出容器 */
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    /* ===== 参考图上传区域优化 ===== */
    .ref-upload-container {
        padding: 16px;
        min-height: 120px;
        gap: 12px;
        background-size: 12px 12px;
        /* 更小的点阵 */
    }

    /* 参考图卡片 - 移动端适配 */
    .ref-image-card {
        width: 80px;
        height: 80px;
        border-radius: 10px;
    }

    /* 移动端增大触摸区域 */
    .ref-image-remove {
        width: 24px;
        height: 24px;
        font-size: 14px;
        opacity: 1;
        /* 移动端始终显示删除按钮 */
        background: rgba(0, 0, 0, 0.7);
    }

    .ref-image-number {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* 添加按钮 */
    .ref-add-btn {
        width: 80px;
        height: 80px;
        border-radius: 10px;
    }

    .ref-add-btn .ref-plus {
        font-size: 28px;
    }

    /* ===== 表单元素优化 ===== */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.95);
    }

    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group textarea {
        padding: 1.1rem;
        font-size: 16px;
        /* 防止iOS自动缩放 */
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .form-group textarea {
        min-height: 110px;
    }

    /* ===== 提交按钮优化 ===== */
    .btn-primary {
        padding: 1.1rem 1.5rem;
        font-size: 1.05rem;
        border-radius: 12px;
        font-weight: 700;
        /* 增加触摸反馈 */
        -webkit-tap-highlight-color: rgba(255, 214, 10, 0.2);
    }

    /* 移动端按钮文字调整 */
    .btn-text {
        font-size: 1rem;
    }

    .loading-text {
        font-size: 0.9rem;
    }

    /* ===== 进度条优化 ===== */
    .progress-bar {
        padding: 1rem;
        border-radius: 14px;
        margin-top: 1rem;
    }

    .progress-status {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }

    .progress-track {
        height: 4px;
        /* 移动端稍微加粗一点 */
    }

    .progress-fill {
        height: 4px;
    }

    /* ===== 错误提示优化 ===== */
    .error-msg {
        padding: 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

    .error-msg::before {
        font-size: 1rem;
    }

    /* ===== 自定义下拉框移动端优化 ===== */
    .select-trigger {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .select-value {
        font-size: 16px;
        /* 防止iOS缩放 */
    }

    .select-dropdown {
        border-radius: 14px;
        max-height: 250px;
    }

    .select-option {
        padding: 10px 14px;
    }
}

/* 超小屏幕优化（手机竖屏） */
@media (max-width: 480px) {

    /* ===== 主内容区进一步优化 ===== */
    .main-content {
        padding: 1.2rem 0.8rem;
    }

    /* ===== 生成容器优化 ===== */
    .generate-container {
        padding: 0 0.8rem;
    }

    .generate-container h1 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .generate-form {
        padding: 1.2rem;
        margin: 0;
        border-radius: 16px;
    }

    /* 参考图区域进一步优化 */
    .ref-upload-container {
        padding: 12px;
        min-height: 110px;
        gap: 10px;
    }

    .ref-image-card {
        width: 70px;
        height: 70px;
        border-radius: 8px;
    }

    .ref-add-btn {
        width: 70px;
        height: 70px;
        border-radius: 8px;
    }

    .ref-add-btn .ref-plus {
        font-size: 24px;
    }

    /* 表单元素紧凑化 */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group select,
    .form-group input,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 16px;
    }

    .btn-primary {
        padding: 0.9rem 1.2rem;
    }

    /* 导航栏超小屏优化 - 保持单行 */
    .main-nav {
        padding: 0.6rem 0.8rem;
    }

    .nav-brand a {
        font-size: 1rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    /* 进一步缩小导航链接 */
    .nav-link {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    /* 确保隐藏管理后台 */
    .nav-admin-link {
        display: none;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .generate-container::before {
        display: none;
        /* 横屏时隐藏背景光晕，节省空间 */
    }

    .generate-form {
        padding: 1rem;
    }

    .ref-upload-container {
        min-height: 100px;
    }

    .form-group textarea {
        min-height: 80px;
    }

    .progress-bar {
        padding: 0.8rem;
    }
}

/* 平板设备优化 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .generate-container {
        max-width: 650px;
    }

    .ref-upload-container {
        padding: 20px;
        gap: 14px;
    }

    .ref-image-card,
    .ref-add-btn {
        width: 90px;
        height: 90px;
    }
}

/* 触摸设备通用优化 */
@media (hover: none) and (pointer: coarse) {

    /* 增强所有可点击元素的触摸区域 */
    .ref-image-card,
    .ref-add-btn,
    .btn-primary,
    .nav-link {
        -webkit-tap-highlight-color: rgba(255, 214, 10, 0.1);
    }

    /* 移除悬停效果，直接显示操作按钮 */
    .ref-image-remove {
        opacity: 0.8;
    }

    .ref-image-card:active {
        transform: scale(0.95);
    }

    .btn-primary:active {
        transform: scale(0.98);
    }

    /* 优化拖拽体验 */
    .ref-image-card {
        cursor: pointer;
        /* 触摸设备不显示grab */
    }

    .ref-image-card.dragging {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ==========================================================================
   案例页面移动端优化 (Cases Page Mobile Optimization)
   ========================================================================== */

@media (max-width: 768px) {

    /* ===== 筛选栏优化 ===== */
    .filter-bar {
        gap: 8px;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: 16px;
        flex-shrink: 0;
        /* 防止按钮被压缩 */
    }

    /* ===== 案例网格优化 ===== */
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 双列布局 */
        gap: 1rem;
    }

    .case-card {
        border-radius: 10px;
    }

    .case-info {
        padding: 0.8rem;
    }

    .case-prompt {
        font-size: 0.8rem;
        line-height: 1.3;
        height: auto;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .case-meta {
        font-size: 0.75rem;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }

    /* ===== 分页控件移动端优化 ===== */
    .pagination {
        flex-wrap: wrap;
        gap: 12px;
        padding: 30px 0.5rem;
        margin-top: 15px;
    }

    .page-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
        gap: 6px;
    }

    .page-btn svg {
        width: 14px;
        height: 14px;
    }

    /* 页码信息优化 */
    .page-info {
        padding: 0 8px;
        gap: 4px;
        font-size: 0.9rem;
        order: -1;
        /* 移到最前面，独占一行 */
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .page-current {
        font-size: 1.2rem;
    }

    .page-count {
        font-size: 0.75rem;
        margin-left: 4px;
    }

    /* 单页信息居中 */
    .page-info.single {
        margin-bottom: 0;
    }

    /* ===== 空状态优化 ===== */
    .empty-state {
        padding: 2rem 1rem;
        text-align: center;
    }

    .empty-state p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

/* 超小屏幕优化 (480px以下) */
@media (max-width: 480px) {

    /* ===== 筛选栏进一步优化 ===== */
    .filter-bar {
        gap: 6px;
        margin-bottom: 1.2rem;
    }

    .filter-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
        border-radius: 14px;
    }

    /* ===== 案例网格改为单列 ===== */
    .cases-grid {
        grid-template-columns: 1fr;
        /* 单列布局 */
        gap: 1rem;
    }

    .case-card {
        max-width: 400px;
        /* 限制最大宽度，避免太宽 */
        margin: 0 auto;
        /* 居中 */
    }

    /* ===== 分页控件紧凑化 ===== */
    .pagination {
        gap: 10px;
        padding: 25px 0.5rem;
    }

    .page-btn {
        padding: 7px 14px;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .page-info {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .page-current {
        font-size: 1.1rem;
    }

    .page-count {
        display: block;
        /* 换行显示 */
        width: 100%;
        text-align: center;
        margin-top: 4px;
        margin-left: 0;
        font-size: 0.7rem;
        opacity: 0.7;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 横屏时三列 */
        gap: 0.8rem;
    }

    .pagination {
        padding: 20px 0.5rem;
    }

    .page-info {
        order: 0;
        /* 恢复原始顺序 */
        width: auto;
        margin-bottom: 0;
    }
}

/* 平板设备优化 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 平板三列 */
        gap: 1.2rem;
    }

    .filter-bar {
        margin-bottom: 2rem;
    }
}

/* 触摸设备通用优化 */
@media (hover: none) and (pointer: coarse) {

    .filter-btn,
    .page-btn {
        -webkit-tap-highlight-color: rgba(255, 214, 10, 0.1);
    }

    .filter-btn:active {
        transform: scale(0.95);
    }

    .page-btn:active:not(.disabled) {
        transform: scale(0.95);
    }

    .case-card:active {
        transform: scale(0.98);
    }
}

/* ========== 模型性能统计表格 ========== */
.model-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.model-stats-table thead th {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.85rem;
}

.model-stats-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.model-stats-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.model-stats-table tbody td {
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
}

.model-stats-table tbody td:first-child {
    color: var(--text-secondary);
}

.model-stats-table tbody td:nth-child(2) {
    text-align: center;
    font-weight: 500;
}

.model-stats-table tbody td:nth-child(3) {
    text-align: right;
    font-weight: 600;
    color: var(--success-color);
}

.model-stats-table code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}