/* ============================================================
 * 天乐AI v2.2 - 主样式表 (main.css) - 完整版
 *
 * 说明：从原 index.html 完整提取的所有CSS样式
 * 包含：导航栏、布局、卡片、表单、模态框、弹窗、动画等
 *
 * 原始位置: index.html (95-1704行)
 * 提取时间: 2026-04-13
 * 代码行数: ~1600行 (完整版)
 * ============================================================ */

/* ========== 基础重置和全局样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== 加载失败提示 ========== */
.load-error {
    display: flex;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.load-error h2 { font-size: 32px; color: #fff; margin-bottom: 16px; }
.load-error p { color: rgba(255,255,255,0.9); font-size: 14px; margin-bottom: 24px; text-align: center; padding: 0 20px; max-width: 500px; line-height: 1.6; }
.load-error button {
    padding: 12px 30px;
    background: #fff;
    border: none;
    border-radius: 8px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
}
.load-error button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.navbar-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.navbar-subtitle {
    font-size: 11px;
    color: #999;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-left: 8px;
    padding-top: 8px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: transparent;
    position: relative;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.25);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.45);
}

/* ========== 主内容区 ========== */
.main-wrapper {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 40px;
}

/* Hero 区域 */
.hero-section {
    text-align: center;
    padding: 60px 20px 50px;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #667eea;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* 功能卡片网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card.active {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-tag {
    padding: 6px 14px;
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.feature-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.feature-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.feature-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== 左右分栏工作区布局 ========== */
.workspace-layout {
    display: flex;
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: calc(100vh - 200px);
}

/* 左侧工作区 */
.workspace-left {
    flex: 0 0 420px;
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 28px;
    height: fit-content;
    position: sticky;
    top: 94px;
}

.workspace-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

/* 右侧图片预览区 */
.workspace-right {
    flex: 1;
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 32px;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.preview-header {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
    position: relative;
    overflow: hidden;
}

.preview-empty {
    text-align: center;
    color: #adb5bd;
}

.preview-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-empty-text {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
}

.preview-empty-hint {
    font-size: 13px;
    color: #999;
}

.preview-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 20px;
}

.preview-image-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    background: white;
}

.preview-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

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

/* ========== 表单控件 ========== */
.form-group { 
    margin-bottom: 20px; 
}

.form-group label {
    display: block; 
    font-size: 14px; 
    font-weight: 600;
    color: #444; 
    margin-bottom: 8px;
    letter-spacing: .5px;
}

.form-group label span { 
    color: #f56c6c; 
    margin-left: 4px; 
}

input, textarea {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    outline: none;
    transition: all .3s;
    font-family: inherit;
}

input:focus, textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    background: #fafbff;
}

textarea { 
    min-height: 120px; 
    resize: vertical; 
    line-height: 1.6; 
}

select {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

select:focus {
    border-color: #667eea;
}

select option {
    background: #fff;
    color: #333;
}

/* ========== 按钮 ========== */
.btn-primary { 
    width: 100%; 
    padding: 16px; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    border: none; 
    border-radius: 12px; 
    color: #fff; 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all .3s; 
    position: relative; 
    overflow: hidden; 
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 12px 35px rgba(102,126,234,0.4); 
}

.btn-primary:active { 
    transform: translateY(0); 
}

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

.btn-primary.btn-confirm {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.btn-primary.btn-confirm:hover { 
    box-shadow: 0 12px 35px rgba(17,153,142,0.4); 
}

.btn-secondary {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
}

.btn-secondary:hover {
    border-color: #999;
    color: #333;
}

/* ========== 提示词预览框 ========== */
.prompt-preview-box {
    background: #f8f9ff;
    border: 2px solid #e0e3ff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.prompt-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.prompt-regen-btn {
    padding: 5px 14px;
    background: #fff;
    border: 1px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}

.prompt-regen-btn:hover { 
    background: #667eea; 
    color: #fff; 
}

.prompt-regen-btn:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.prompt-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #333;
    background: #fff;
    resize: vertical;
    font-family: -apple-system, "Microsoft YaHei", sans-serif;
    transition: border-color .2s;
}

.prompt-textarea:focus { 
    outline: none; 
    border-color: #667eea; 
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1); 
}

/* ========== 登录/注册弹窗 ========== */
.login-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn .3s ease;
}

.login-overlay.show { 
    display: flex; 
}

.login-dialog {
    background: #fff;
    border-radius: 24px; 
    padding: 40px;
    width: 420px; 
    max-width: 90vw;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
    animation: slideUp .3s ease;
    position: relative;
}

@keyframes fadeIn { 
    from{opacity:0} 
    to{opacity:1} 
}

@keyframes slideUp { 
    from{opacity:0;transform:translateY(30px)} 
    to{opacity:1;transform:translateY(0)} 
}

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

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

.login-dialog h3 { 
    font-size: 22px; 
    margin-bottom: 8px; 
    color: #222; 
}

.login-dialog > p { 
    color: #777; 
    font-size: 14px; 
    margin-bottom: 28px; 
}

.login-dialog-close { 
    position: absolute; 
    top: 16px; 
    right: 16px; 
    cursor: pointer; 
    color: #999; 
    font-size: 20px; 
    transition: color .2s; 
}

.login-dialog-close:hover { 
    color: #333; 
}

.login-tabs { 
    display:flex;
    margin-bottom:18px;
    border-bottom:1px solid #eee;
    padding-bottom:0
}

.login-tab{
    flex:1;
    padding:10px 0;
    border:none;
    background:none;
    font-size:15px;
    font-weight:500;
    color:#999;
    cursor:pointer;
    border-bottom:2px solid transparent;
    transition:all .2s
}

.login-tab.active{
    color:#667eea;
    border-bottom-color:#667eea;
    font-weight:600
}

.agreement-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 20px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.agreement-check input { 
    margin-top: 3px; 
}

.agreement-check a { 
    color: #667eea; 
    text-decoration: none; 
}

/* ========== 参考图上传区域 ========== */
.upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    margin-bottom: 20px;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 16px;
}

.upload-text {
    color: #666;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.upload-preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ========== 参考图网格（详细版）========== */
.ref-images-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    margin-top: 12px; 
}

.ref-image-item {
    aspect-ratio: 1;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}

.ref-image-item:hover { 
    border-color: #667eea; 
    background: #f3f4f6; 
}

.ref-image-item.has-image {
    border-style: solid;
    border-color: #667eea;
    padding: 0;
}

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

.ref-image-text { 
    font-size: 12px; 
    color: #9ca3af; 
    margin-top: 4px; 
}

.ref-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(239,68,68,0.95);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

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

.ref-image-count {
    font-size: 13px;
    color: #6b7280;
    margin-top: 10px;
    text-align: right;
    font-weight: 500;
}

/* ========== 多选标签 ========== */
.tag-list {
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px;
    margin-top: 8px;
}

.tag-item {
    padding: 10px 18px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    user-select: none;
    color: #555;
}

.tag-item:hover { 
    border-color: #667eea; 
    color: #667eea; 
    background: #f3f4f6; 
}

.tag-item.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-color: #667eea;
    color: #667eea;
}

/* ========== 比例选择器网格 ========== */
.ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.ratio-item {
    padding: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
}

.ratio-item:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f3f4f6;
}

.ratio-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========== 结果展示区 ========== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1a2e;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform .3s, box-shadow .3s;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

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

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.image-item {
    border-radius: 16px; 
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

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

/* ========== 生成进度内嵌卡片 ========== */
.workspace-right-dark {
    background: #f5f6fa;
    border-radius: 20px;
    padding: 24px;
}

.gen-record-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.gen-record-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.gen-record-count {
    color: #999;
    font-size: 13px;
}

.gen-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gen-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform .2s, box-shadow .2s;
}

.gen-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
}

.gen-card-loading { 
    opacity: 0.85; 
}

.gen-card-img-wrap {
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f5;
    overflow: hidden;
}

.gen-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gen-card-status {
    position: absolute;
    top: 10px; 
    left: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.gen-card-status-generating {
    background: rgba(245,158,11,0.9);
    color: #fff;
}

.gen-card-status-done {
    background: rgba(16,185,129,0.9);
    color: #fff;
}

.gen-card-delete-btn {
    position: absolute;
    top: 8px; 
    right: 8px;
    width: 28px; 
    height: 28px;
    border: none;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gen-card-img-wrap:hover .gen-card-delete-btn { 
    opacity: 1; 
}

.gen-card-placeholder-gen {
    width: 100%; 
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8ebff, #f0ecfb);
}

.gen-card-spinner-icon {
    width: 48px; 
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.gen-card-body {
    padding: 12px 14px 0;
}

.gen-card-desc {
    margin: 0 0 10px;
    font-size: 13.5px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.gen-card-expand {
    display: inline-block;
    padding: 5px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    font-size: 12.5px;
    color: #666;
    cursor: pointer;
    transition: all .2s;
}

.gen-card-expand:hover:not(:disabled) { 
    background: #667eea; 
    color: #fff; 
}

.gen-card-expand:disabled { 
    opacity: 0.4; 
    cursor: not-allowed; 
}

.gen-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 12px;
    border-top: 1px solid #f0f0f0;
}

.gen-card-id {
    font-size: 11.5px;
    color: #999;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gen-card-time {
    font-size: 11.5px;
    color: #aaa;
}

.gen-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #e0e0e0;
}

.gen-empty-icon { 
    font-size: 48px; 
    margin-bottom: 12px; 
}

.gen-empty-text { 
    font-size: 17px; 
    color: #444; 
    font-weight: 600; 
    margin-bottom: 6px; 
}

.gen-empty-hint { 
    color: #999; 
    font-size: 13px; 
}

.btn-continue {
    margin-top: 12px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.btn-continue:hover { 
    box-shadow: 0 10px 30px rgba(14,165,233,0.35); 
}

/* ========== 卡片操作按钮组 ========== */
.gen-card-actions {
    display: flex; 
    gap: 6px; 
    padding: 8px 12px;
    background: linear-gradient(to bottom, #fafbff, #f5f7ff);
    border-top: 1px solid #eef2ff;
}

.gca-btn {
    flex: 1; 
    padding: 6px 0; 
    border: none; 
    border-radius: 6px;
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer;
    transition: all .2s; 
    text-align: center;
}

.gca-btn-view { 
    background: #eef2ff; 
    color: #667eea; 
}

.gca-btn-view:hover { 
    background: #667eea; 
    color: #fff; 
}

.gca-btn-dl { 
    background: #ecfdf5; 
    color: #059669; 
}

.gca-btn-dl:hover { 
    background: #059669; 
    color: #fff; 
}

.gca-btn-edit { 
    background: #fffbeb; 
    color: #d97706; 
}

.gca-btn-edit:hover { 
    background: #d97706; 
    color: #fff; 
}

.gca-btn-del { 
    background: #fef2f2; 
    color: #dc2626; 
}

.gca-btn-del:hover { 
    background: #dc2626; 
    color: #fff; 
}

/* ========== 长图下载按钮 ========== */
.download-bar {
    display: flex; 
    gap: 10px; 
    margin-bottom: 16px; 
    align-items: center;
}

.dl-bar-btn {
    padding: 10px 22px; 
    border: none; 
    border-radius: 10px;
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer;
    transition: all .2s; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px;
}

.dl-all-single { 
    background: linear-gradient(135deg,#667eea,#764ba2); 
    color: #fff; 
}

.dl-all-single:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(102,126,234,.35); 
}

.dl-long-image { 
    background: linear-gradient(135deg,#f59e0b,#ef4444); 
    color: #fff; 
}

.dl-long-image:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(245,158,11,.35); 
}

/* ========== 小浮动生成窗口 ========== */
.gen-mini-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10001;
    display: none;
    animation: genFloatIn .3s ease;
}

.gen-mini-float.show { 
    display: block; 
}

@keyframes genFloatIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.gen-mini-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    width: 280px;
    overflow: hidden;
    border: 1.5px solid #e8eaff;
}

.gen-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.gen-mini-title {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gen-mini-actions {
    display: flex;
    gap: 4px;
}

.gen-mini-act-btn {
    width: 26px; 
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.gen-mini-act-btn:hover { 
    background: rgba(255,255,255,0.45); 
}

.gen-mini-body {
    padding: 16px;
    text-align: center;
}

.gen-mini-progress-info {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.gen-mini-progress-info strong { 
    color: #667eea; 
}

.gen-mini-bar-wrap {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.gen-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width .5s ease;
}

.gen-mini-hint {
    font-size: 11.5px;
    color: #aaa;
}

.generating-spinner {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 80px; 
    height: 80px;
    border-radius: 50%;
    border: 4px solid #e8eaff;
    border-top-color: #667eea;
    animation: spin 0.9s linear infinite;
}

.generating-icon-text {
    position: absolute; 
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px; 
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.generating-title {
    font-size: 20px; 
    font-weight: 700;
    color: #222; 
    margin-bottom: 10px;
}

.generating-subtitle {
    font-size: 15px; 
    color: #555; 
    margin-bottom: 18px;
}

.generating-subtitle strong { 
    color: #667eea; 
    font-size: 18px; 
}

.generating-progress-bar {
    width: 100%; 
    height: 8px;
    background: #eee; 
    border-radius: 4px;
    overflow: hidden; 
    margin-bottom: 16px;
}

.generating-progress-fill {
    height: 100%; 
    border-radius: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
}

.generating-hint {
    font-size: 13px; 
    color: #888; 
    line-height: 1.7;
}

/* ========== 历史图库 ========== */
.history-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.history-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.history-count {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.history-clear-btn {
    margin-left: auto;
    padding: 8px 18px;
    background: transparent;
    border: 1px solid rgba(255,100,100,0.4);
    border-radius: 8px;
    color: #ff8888;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}

.history-clear-btn:hover { 
    background: rgba(255,80,80,0.15); 
    border-color: #ff6666; 
}

.history-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
}

.history-empty-icon { 
    font-size: 64px; 
    margin-bottom: 16px; 
}

.history-empty-text { 
    font-size: 20px; 
    color: #333; 
    font-weight: 600; 
    margin-bottom: 8px; 
}

.history-empty-hint { 
    color: #999; 
    font-size: 14px; 
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-record {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.record-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
    border-bottom: 1px solid #eef0ff;
    flex-wrap: wrap;
    gap: 10px;
}

.record-left { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.record-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.record-product { 
    color: #333; 
    font-size: 14px; 
    font-weight: 500; 
}

.record-right { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
}

.record-time { 
    color: #999; 
    font-size: 13px; 
}

.record-count { 
    color: #667eea; 
    font-size: 13px; 
    font-weight: 600; 
}

.record-delete-btn {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    transition: all .2s;
}

.record-delete-btn:hover { 
    background: #fee; 
    border-color: #fcc; 
    color: #e44; 
}

.record-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px 20px 20px;
}

.record-image-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fafafa;
}

.record-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.record-image-item:hover img { 
    transform: scale(1.05); 
}

.record-image-item { 
    position: relative; 
    cursor: pointer; 
}

.record-img-overlay {
    position: absolute; 
    top:0; 
    left:0; 
    right:0; 
    bottom:0;
    background: rgba(0,0,0,0.45); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    opacity: 0; 
    transition: opacity .2s;
}

.record-image-item:hover .record-img-overlay { 
    opacity: 1; 
}

.record-img-btn {
    width: 32px; 
    height: 32px; 
    border: none; 
    border-radius: 50%;
    background: rgba(255,255,255,0.9); 
    color: #333; 
    font-size: 16px;
    cursor: pointer; 
    transition: all .2s; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.record-img-btn:hover { 
    background: #10b981; 
    color: #fff; 
    transform: scale(1.1); 
}

.record-img-idx {
    padding: 3px 10px; 
    border-radius: 12px; 
    background: rgba(102,126,234,.9);
    color: #fff; 
    font-size: 12px; 
    font-weight: 700;
}

/* ========== Toast提示系统 ========== */
.toast-container {
    position: fixed; 
    top: 90px; 
    left: 50%;
    transform: translateX(-50%); 
    z-index: 99999;
    display: flex; 
    flex-direction: column; 
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    padding: 14px 28px; 
    border-radius: 12px;
    color: #fff; 
    font-size: 14px; 
    font-weight: 600;
    box-shadow: 0 4px 25px rgba(0,0,0,0.2); 
    animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards; 
    pointer-events: auto; 
    max-width: 400px; 
    text-align: center; 
}

.toast-success { 
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); 
}

.toast-error { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); 
}

.toast-warning { 
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); 
}

.toast-info { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
}

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

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

/* ========== Lightbox灯箱查看器 ========== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-overlay.show { 
    display: flex; 
}

.lightbox-container {
    max-width: 90vw;
    max-height: 90vh;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: lbIn .25s ease;
}

@keyframes lbIn { 
    from { opacity:0; transform:scale(.95); } 
    to { opacity:1; transform:scale(1); } 
}

.lightbox-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 20px; 
    background: rgba(255,255,255,0.08); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lightbox-title { 
    color: #fff; 
    font-size: 14px; 
    font-weight: 600; 
}

.lightbox-actions { 
    display: flex; 
    gap: 8px; 
}

.lb-btn {
    padding: 6px 14px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer;
    font-size: 13px; 
    font-weight: 600; 
    transition: all .2s;
}

.lb-btn-download { 
    background: #10b981; 
    color: #fff; 
}

.lb-btn-download:hover { 
    background: #059669; 
    transform: scale(1.05); 
}

.lb-btn-edit { 
    background: #f59e0b; 
    color: #fff; 
}

.lb-btn-edit:hover { 
    background: #d97706; 
    transform: scale(1.05); 
}

.lb-btn-close { 
    background: rgba(255,255,255,0.15); 
    color: #fff; 
}

.lb-btn-close:hover { 
    background: rgba(239,68,68,0.8); 
}

.lightbox-img { 
    max-width: 85vw; 
    max-height: 70vh; 
    object-fit: contain; 
    display: block; 
    margin: 0 auto; 
}

.lightbox-footer {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 20px; 
    background: rgba(255,255,255,0.05);
}

.lightbox-counter { 
    color: rgba(255,255,255,0.6); 
    font-size: 13px; 
}

.lightbox-nav { 
    display: flex; 
    gap: 8px; 
}

.lb-nav-btn {
    width: 36px; 
    height: 36px; 
    border: none; 
    border-radius: 50%;
    background: rgba(255,255,255,0.15); 
    color: #fff; 
    font-size: 16px;
    cursor: pointer; 
    transition: all .2s;
}

.lb-nav-btn:hover:not(:disabled) { 
    background: rgba(102,126,234,0.8); 
}

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

/* ========== 局部重构编辑面板 ========== */
.edit-panel-overlay {
    display: none; 
    position: fixed; 
    top:0; 
    left:0; 
    right:0; 
    bottom:0;
    z-index: 10001; 
    background: rgba(0,0,0,0.7); 
    align-items: center; 
    justify-content: center;
    backdrop-filter: blur(6px);
}

.edit-panel-overlay.show { 
    display: flex; 
}

.edit-panel-container {
    width: 560px; 
    max-width: 92vw; 
    max-height: 88vh; 
    overflow-y: auto;
    background: #fff; 
    border-radius: 18px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: epIn .3s ease;
}

@keyframes epIn { 
    from { opacity:0; transform:translateY(30px) scale(.95); } 
    to { opacity:1; transform:translateY(0) scale(1); } 
}

.edit-panel-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 18px 24px; 
    border-bottom: 1px solid #eee;
}

.edit-panel-title { 
    font-size: 17px; 
    font-weight: 700; 
    color: #333; 
}

.ep-close-btn {
    width: 32px; 
    height: 32px; 
    border: none; 
    border-radius: 50%;
    background: #f3f4f6; 
    color: #666; 
    font-size: 18px; 
    cursor: pointer;
    transition: all .2s;
}

.ep-close-btn:hover { 
    background: #ef4444; 
    color: #fff; 
}

.edit-panel-body { 
    padding: 20px 24px; 
}

.edit-preview-wrap { 
    text-align: center; 
    margin-bottom: 20px; 
}

.edit-preview-img {
    max-width: 100%; 
    max-height: 280px; 
    object-fit: contain;
    border-radius: 10px; 
    border: 2px solid #eef2ff;
}

.edit-hint { 
    color: #888; 
    font-size: 13px; 
    margin-top: 8px; 
}

.edit-form-area label { 
    display: block; 
    font-size: 14px; 
    font-weight: 600; 
    color: #444; 
    margin-bottom: 8px; 
}

.edit-form-area textarea {
    width: 100%; 
    padding: 12px; 
    border: 2px solid #e5e7eb; 
    border-radius: 10px;
    font-size: 14px; 
    resize: vertical; 
    outline: none; 
    transition: border-color .2s;
    font-family: inherit;
}

.edit-form-area textarea:focus { 
    border-color: #667eea; 
    box-shadow: 0 0 0 3px rgba(102,126,234,.15); 
}

.edit-actions-row { 
    display: flex; 
    gap: 10px; 
    margin-top: 16px; 
}

/* ========== 微信登录按钮 ========== */
.btn-wechat-login {
    width: 100%; 
    padding: 12px; 
    margin-top: 12px;
    background: #07C160; 
    color: #fff; 
    border: none; 
    border-radius: 10px;
    font-size: 15px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all .2s;
}

.btn-wechat-login:hover { 
    background: #06a554; 
    transform: translateY(-1px); 
}

.btn-wechat-login:disabled { 
    opacity: .6; 
    cursor: not-allowed; 
}

.wechat-login-divider { 
    text-align: center; 
    margin: 16px 0 10px; 
    position: relative; 
}

.wechat-login-divider::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 50%; 
    width: 45%; 
    height: 1px; 
    background: #ddd; 
}

.wechat-login-divider::after { 
    content: ''; 
    position: absolute; 
    right: 0; 
    top: 50%; 
    width: 45%; 
    height: 1px; 
    background: #ddd; 
}

.wechat-login-divider span { 
    background: #fff; 
    padding: 0 12px; 
    position: relative; 
    color: #999; 
    font-size: 13px; 
}

/* ========== 充值中心 ========== */
.recharge-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: 99997; 
    background: rgba(0,0,0,.6); 
    justify-content: center; 
    align-items: center;
}

.recharge-overlay.show { 
    display: flex; 
}

.recharge-dialog {
    background: #fff; 
    border-radius: 20px; 
    width: 520px; 
    max-width: 92vw; 
    max-height: 85vh;
    overflow-y: auto; 
    padding: 32px; 
    position: relative; 
    box-shadow: 0 25px 60px rgba(0,0,0,.3);
}

.recharge-dialog-close { 
    position: absolute; 
    top: 14px; 
    right: 18px; 
    font-size: 22px; 
    cursor: pointer; 
    color: #999; 
}

.recharge-dialog-close:hover { 
    color: #333; 
}

.recharge-dialog h3 { 
    font-size: 22px; 
    margin-bottom: 24px; 
    text-align: center; 
}

.recharge-packages { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
    margin-bottom: 24px; 
}

.pkg-card {
    border: 2px solid #eee; 
    border-radius: 14px; 
    padding: 18px 12px; 
    text-align: center;
    cursor: pointer; 
    transition: all .2s; 
    position: relative;
}

.pkg-card:hover { 
    border-color: #667eea; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 18px rgba(102,126,234,.2); 
}

.pkg-card.selected { 
    border-color: #667eea; 
    background: #f5f3ff; 
}

.pkg-name { 
    font-size: 15px; 
    font-weight: 700; 
    color: #333; 
    margin-bottom: 6px; 
}

.pkg-credits { 
    font-size: 13px; 
    color: #666; 
    margin-bottom: 4px; 
}

.pkg-price { 
    font-size: 22px; 
    font-weight: 800; 
    color: #ef4444; 
}

.pkg-badge { 
    position: absolute; 
    top: -8px; 
    right: -8px; 
    background: #ef4444; 
    color: #fff; 
    font-size: 11px; 
    padding: 2px 8px; 
    border-radius: 10px; 
}

.pkg-empty { 
    text-align: center; 
    color: #999; 
    padding: 40px; 
    font-size: 15px; 
}

.recharge-pay-area { 
    border-top: 1px solid #eee; 
    padding-top: 20px; 
}

.pay-methods { 
    display: flex; 
    gap: 16px; 
    margin-bottom: 16px; 
}

.pay-method-label { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    font-size: 14px; 
    color: #555; 
}

.pay-method-label.active { 
    color: #07C160; 
    font-weight: 600; 
}

.btn-recharge-pay {
    width: 100%; 
    padding: 14px; 
    background: linear-gradient(135deg,#07C160,#06a554);
    color: #fff; 
    border: none; 
    border-radius: 12px; 
    font-size: 17px; 
    font-weight: 700;
    cursor: pointer; 
    transition: all .2s;
}

.btn-recharge-pay:hover:not(:disabled) { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(7,193,96,.35); 
}

.btn-recharge-pay:disabled { 
    opacity: .6; 
    cursor: not-allowed; 
}

.pay-qrcode-area { 
    text-align: center; 
    margin-top: 24px; 
    padding-top: 20px; 
    border-top: 1px solid #eee; 
}

.pay-qr-img { 
    width: 220px; 
    height: 220px; 
    margin: 16px auto; 
    border: 1px solid #eee; 
    border-radius: 12px; 
}

.pay-price { 
    font-size: 26px; 
    font-weight: 800; 
    color: #ef4444; 
    margin: 12px 0; 
}

.pay-status { 
    display: inline-block; 
    padding: 6px 20px; 
    border-radius: 20px; 
    font-size: 14px; 
    font-weight: 600; 
    margin: 8px 0; 
}

.pay-status.success { 
    background: #ecfdf5; 
    color: #059669; 
}

.pay-status.pending { 
    background: #fef3c7; 
    color: #d97706; 
}

/* ========== 域名授权拦截 ========== */
.domain-auth-blocker {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: 99998; 
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    justify-content: center; 
    align-items: center;
}

.domain-auth-blocker.show { 
    display: flex; 
}

.domain-auth-content { 
    text-align: center; 
    color: #fff; 
    max-width: 480px; 
    padding: 40px; 
}

.domain-auth-icon { 
    font-size: 64px; 
    margin-bottom: 20px; 
}

.domain-auth-content h2 { 
    font-size: 28px; 
    margin-bottom: 16px; 
}

.domain-auth-content p { 
    color: rgba(255,255,255,.7); 
    line-height: 1.6; 
    margin-bottom: 8px; 
    font-size: 15px; 
}

/* ========== 用户信息栏 ========== */
.user-info-bar {
    background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
    border: 1px solid #e0e8ff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(102,126,234,.2);
}

.user-info-details { 
    flex: 1; 
}

.user-info-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.user-info-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    gap: 16px;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #667eea;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .result-grid { 
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar { 
        padding: 0 20px; 
    }
    
    .navbar-nav { 
        display: none; 
    }
    
    .main-wrapper { 
        padding: 20px; 
    }
    
    .features-grid { 
        grid-template-columns: 1fr; 
    }
    
    .hero-title { 
        font-size: 32px; 
    }
    
    .hero-section { 
        padding: 60px 15px 40px; 
    }
    
    .gen-card { 
        padding: 24px 20px; 
    }
    
    .service-tabs { 
        gap: 8px; 
    }
    
    .service-tab { 
        padding: 10px 20px; 
        font-size: 14px; 
    }
    
    .user-info-bar { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .login-dialog { 
        padding: 30px 24px; 
    }
    
    /* 左右分栏 - 移动端上下堆叠 */
    .workspace-layout {
        flex-direction: column;
    }
    
    .workspace-left {
        flex: none;
        width: 100%;
        position: static;
    }
    
    .workspace-right {
        min-height: 400px;
    }
    
    .ref-images-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .ratio-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .record-images-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .recharge-packages { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) {
    .hero-title { 
        font-size: 28px; 
    }
    
    .btn-primary { 
        padding: 14px 24px; 
        font-size: 16px; 
    }
    
    .result-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 12px; 
    }
    
    .image-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .workspace-left {
        padding: 20px;
    }
    
    .workspace-right {
        padding: 20px;
    }
}

/* ========== 工具类 ========== */
.text-center { 
    text-align: center; 
}

.mt-20 { 
    margin-top: 20px; 
}

.mb-20 { 
    margin-bottom: 20px; 
}

.flex { 
    display: flex; 
}

.flex-center { 
    align-items: center; 
    justify-content: center; 
}

.gap-10 { 
    gap: 10px; 
}

.gap-20 { 
    gap: 20px; 
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in { 
    animation: fadeIn .4s ease-out; 
}

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

.pulse { 
    animation: pulse 2s infinite; 
}

/* ========== 打印样式（隐藏）========== */
@media print {
    .navbar, .login-overlay, .toast-container, .skeleton-screen, 
    .gen-mini-float, .lightbox-overlay, .edit-panel-overlay,
    .domain-auth-blocker, .recharge-overlay { 
        display: none !important; 
    }
    
    body { 
        background: #fff; 
    }
    
    .main-wrapper {
        margin-top: 0;
        padding: 20px;
    }
}
