/* ============================================
   Generator User - 科技风沉浸式前端样式
   参考 main_web (暗色玻璃拟态 + 发光动效)
   ============================================ */

/* --- 变量 --- */
:root {
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    --bg-dark: #0a0a0f;
    --bg-overlay: rgba(10, 10, 15, 0.45);
    --glass-bg: rgba(15, 15, 25, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 25px;

    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    
    --trans-fast: 200ms ease;
    --trans-normal: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 重置 --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* 科技感网格背景 */
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; transition: color var(--trans-fast); }
a:hover { color: var(--accent-hover); }

/* ========== 布局 ========== */
.container { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 100px 24px 40px; /* 为固定的 navbar 留出上边距 */
}

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    transition: background 0.3s ease;
}
.navbar:hover { background: rgba(10, 10, 15, 0.65); }

.nav-brand { font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; }
.nav-brand a { color: var(--text-primary); }
.nav-brand a:hover { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.nav-right { display: flex; align-items: center; gap: 16px; }

/* 导航相关小组件 */
.user-name { color: var(--text-secondary); font-size: 0.9rem; }
.quota-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.4);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--trans-fast);
    text-decoration: none;
    outline: none;
}
.btn-primary { 
    background: var(--accent); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover { 
    background: var(--accent-hover); 
    color: white; 
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-outline { 
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text-primary); 
    border: 1px solid var(--glass-border); 
}
.btn-outline:hover { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255,255,255,0.2); 
    transform: translateY(-2px);
}
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ========== 页面头部 ========== */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px; gap: 16px;
}
.page-header h2 { 
    font-size: 1.8rem; 
    font-weight: 700; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); 
}

/* ========== 登录页 & 纯卡片容器 ========== */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}
.login-card { text-align: center; max-width: 420px; width: 100%; }
.login-card h1 { font-size: 1.8rem; margin-bottom: 8px; color: #fff; }
.login-card .subtitle { color: var(--text-secondary); margin-bottom: 32px; }

/* ========== 表单组件 ========== */
.form-group { margin-bottom: 24px; text-align: left; }
.form-group label {
    display: block; margin-bottom: 8px; font-size: 0.9rem;
    font-weight: 500; color: var(--text-secondary);
}
.form-control {
    width: 100%; padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; color: var(--text-primary);
    font-size: 0.95rem; font-family: inherit;
    transition: all var(--trans-fast);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
textarea.form-control { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-hint { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }
.error-msg { color: var(--danger); margin-top: 16px; font-size: 0.9rem; text-align: center; }

/* ========== 导航链接 ========== */
.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all var(--trans-fast);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); }

/* ========== 画廊元信息 ========== */
.gallery-meta { color: var(--text-muted); font-size: 0.95rem; }

/* ========== aspect_ratio 分组 ========== */
.aspect-ratio-group { margin-bottom: 32px; }
.aspect-ratio-group-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.aspect-ratio-label { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.aspect-ratio-count { font-size: 0.85rem; color: var(--text-muted); }

/* ========== 首页任务网格 ========== */
/* 默认使用 flex 布局（横图） */
.task-grid { display: flex; flex-wrap: wrap; gap: 20px; }
/* 竖图(9:16等)和1:1使用 grid 布局，确保每排至少2个 */
.task-grid[data-aspect-ratio="9:16"],
.task-grid[data-aspect-ratio="2:3"],
.task-grid[data-aspect-ratio="3:4"],
.task-grid[data-aspect-ratio="4:5"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.task-grid[data-aspect-ratio="1:1"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.task-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text-primary);
    flex: 0 1 auto; min-width: 0; max-width: 100%;
    transition: all var(--trans-normal);
    position: relative;
    backdrop-filter: blur(10px);
}
.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
}

/* 缩略图区域 */
.task-preview {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    width: 288px; height: 288px;
}
/* 横图：保持原有固定尺寸 */
.task-preview[data-aspect-ratio="16:9"] { width: 512px; height: 288px; }
.task-preview[data-aspect-ratio="21:9"] { width: 672px; height: 288px; }
.task-preview[data-aspect-ratio="3:2"] { width: 432px; height: 288px; }
.task-preview[data-aspect-ratio="4:3"] { width: 384px; height: 288px; }
.task-preview[data-aspect-ratio="5:4"] { width: 360px; height: 288px; }
/* 竖图和1:1：使用自适应宽度 + aspect-ratio */
.task-preview[data-aspect-ratio="9:16"] { width: 100%; height: auto; aspect-ratio: 9/16; }
.task-preview[data-aspect-ratio="2:3"]  { width: 100%; height: auto; aspect-ratio: 2/3; }
.task-preview[data-aspect-ratio="3:4"]  { width: 100%; height: auto; aspect-ratio: 3/4; }
.task-preview[data-aspect-ratio="4:5"]  { width: 100%; height: auto; aspect-ratio: 4/5; }
.task-preview[data-aspect-ratio="1:1"]  { width: 100%; height: auto; aspect-ratio: 1/1; }

.task-preview img { width: 100%; height: 100%; object-fit: cover; }
.task-placeholder { font-size: 3rem; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }

/* 横图卡片：保持固定宽度 */
.task-card[data-aspect-ratio="16:9"] { width: 512px; }
.task-card[data-aspect-ratio="21:9"] { width: 672px; }
.task-card[data-aspect-ratio="3:2"] { width: 432px; }
.task-card[data-aspect-ratio="4:3"] { width: 384px; }
.task-card[data-aspect-ratio="5:4"] { width: 360px; }
/* 竖图和1:1卡片：在 grid 中自适应宽度 */
.task-card[data-aspect-ratio="9:16"],
.task-card[data-aspect-ratio="2:3"],
.task-card[data-aspect-ratio="3:4"],
.task-card[data-aspect-ratio="4:5"],
.task-card[data-aspect-ratio="1:1"] { width: auto; }

.task-card.is-processing .task-preview::after {
    content: ''; position: absolute; inset: 0;
    box-shadow: inset 0 0 30px var(--accent-glow);
    animation: pulse 2s infinite alternate;
    pointer-events: none;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* 卡片信息区 */
.task-info { padding: 14px; display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.2); width: 100%; box-sizing: border-box; }
.task-time { font-size: 0.8rem; color: var(--text-muted); }
.gallery-likes { font-size: 0.8rem; color: #f87171; font-weight: 600; }

/* 画廊卡片底部点赞按钮 */
.gallery-like-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 12px;
    border: none; cursor: pointer;
    background: transparent; color: rgba(255,255,255,0.5);
    font-size: 13px; transition: color .2s, transform .2s;
}
.gallery-like-btn:hover { color: #f87171; }
.gallery-like-btn.liked { color: #f87171; }
.glb-heart { font-size: 15px; line-height: 1; }
.glb-count { font-weight: 600; font-size: 12px; min-width: 8px; text-align: center; }
@keyframes likePop { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
.gallery-like-btn.like-pop { animation: likePop .3s ease; }
.task-theme {
    padding: 8px 14px; font-size: 0.8rem; color: var(--text-secondary);
    border-top: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    width: 100%; box-sizing: border-box;
}

/* ========== 分页 ========== */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 32px; padding: 16px 0;
}
.pagination a, .pagination .current, .pagination .disabled, .pagination .ellipsis {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px;
    border-radius: 8px; font-size: 0.9rem; font-weight: 500;
}
.pagination a { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--glass-border); }
.pagination a:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.pagination .current { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.pagination .disabled { color: var(--text-muted); cursor: not-allowed; }
.pagination .ellipsis { color: var(--text-muted); }

/* ========== 任务状态标签 ========== */
.badge {
    font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; font-weight: 600;
    letter-spacing: 0.5px; border: 1px solid transparent; 
}
.badge-queued { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.badge-processing { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.badge-completed { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.badge-failed { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.badge-cancelled { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); border-color: rgba(255, 255, 255, 0.2); }

/* 空状态 */
.empty-state { text-align: center; padding: 80px 0; color: var(--text-muted); font-size: 1.1rem; }
.empty-state a { color: var(--accent); font-weight: 500; }

/* ========== 全局 Footer ========== */
.site-footer {
    margin-top: 60px; padding: 24px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}
.footer-inner {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; flex-wrap: wrap;
}
.footer-brand { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; }
.footer-sep { color: var(--text-muted); font-size: 0.8rem; }
.footer-text { color: var(--text-muted); font-size: 0.8rem; }
.footer-qq { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

/* ========== 任务详情 ========== */
.task-detail-grid { display: grid; gap: 24px; }
.task-detail-grid > .glass-card:first-child { position: relative; z-index: 2; }
.task-detail-grid > .glass-card + .glass-card { position: relative; z-index: 1; }
.detail-preview {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    min-height: 400px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}
.detail-preview img { max-width: 100%; max-height: 70vh; object-fit: contain; }

/* 详情屏状态动画 */
.status-display { text-align: center; padding: 60px; }
.status-display .icon { font-size: 4.5rem; filter: drop-shadow(0 0 20px rgba(255,255,255,0.2)); margin-bottom: 24px; }
.status-display .text { font-size: 1.25rem; font-weight: 500; color: var(--text-primary); letter-spacing: 1px; }
.status-display .queue { color: var(--accent); margin-top: 12px; font-weight: 600; font-size: 1.1rem; }

.detail-actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 8px; }
.download-menu { position: relative; display: inline-flex; }
.download-options {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    min-width: 150px;
    transform: translateX(-50%);
    padding: 8px;
    background: rgba(10, 10, 20, 0.96);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 10;
}
.download-menu.open .download-options { display: grid; gap: 4px; }
.download-options a {
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.download-options a:hover { background: rgba(255, 255, 255, 0.1); }

/* 信息列表卡片 */
.info-list { padding: 8px 16px; margin: 0; }
.info-item {
    display: flex; padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-item:last-child { border-bottom: none; }
.info-label { width: 120px; flex-shrink: 0; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.info-value { flex: 1; color: var(--text-primary); font-size: 0.95rem; }
.info-item.error .info-value { color: #f87171; }
.news-content-box { 
    background: rgba(0, 0, 0, 0.3); border-radius: 8px; 
    padding: 16px; font-size: 0.95rem; line-height: 1.7; 
    white-space: pre-wrap; color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.04);
}
.news-title-box {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 2px;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
}

/* ========== 设计概念展示 ========== */
.prompt-info {
    position: relative; z-index: 1;
    margin-top: 24px; padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.prompt-theme {
    font-size: 1.3rem; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}
.prompt-desc {
    font-size: 0.95rem; line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.prompt-elements-label {
    font-size: 0.85rem; font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.prompt-elements {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.prompt-tag {
    font-size: 0.8rem; padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.12);
    color: rgba(165, 168, 255, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ========== 响应式 ========== */
/* ========== 分步进度条 ========== */
.step-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 10px;
}
.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.4s ease;
}
.step-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.4s ease;
}
.step-connector {
    flex: 1;
    height: 2px;
    background: var(--glass-border);
    margin: 0 10px;
    margin-top: -24px; /* 对齐圆圈中心 */
    border-radius: 1px;
    transition: all 0.4s ease;
}

/* 状态样式 */
.step-item.done .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}
.step-item.done .step-label { color: var(--text-primary); }
.step-connector.done { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.step-item.active .step-circle {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    animation: pulse-border 2s infinite;
}
.step-item.active .step-label { color: var(--accent); font-weight: 600; }

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ========== 倒计时进度条 ========== */
.countdown-display {
    margin-top: 20px;
    text-align: center;
}
.countdown-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}
.countdown-text span { font-weight: 600; color: var(--text-primary); }
.countdown-bar-wrap {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.countdown-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #818cf8);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 1s linear, background-color 0.3s ease;
}
.countdown-bar.overtime {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* ========== 导航栏新建任务按钮 ========== */
.nav-create-btn {
    animation: glow-pulse 2s infinite alternate;
}
@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px var(--accent-glow); }
    100% { box-shadow: 0 0 15px var(--accent-glow), 0 0 30px rgba(99, 102, 241, 0.15); }
}

/* ========== 汉堡菜单按钮 ========== */
.hamburger {
    display: none; /* 桌面端隐藏 */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none; border: none; cursor: pointer;
    padding: 6px; z-index: 110;
}
.hamburger span {
    display: block; width: 100%; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== 响应式 - 平板 ========== */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-right {
        display: none;
        position: fixed; top: 0; right: 0;
        width: 260px; height: 100vh;
        background: rgba(10, 10, 20, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 80px 24px 32px;
        gap: 16px;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 40px rgba(0,0,0,0.5);
        z-index: 105;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        transform: translateX(100%);
    }
    .nav-right.open {
        display: flex;
        transform: translateX(0);
    }
    .nav-right .nav-link {
        font-size: 1rem; padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .nav-right .nav-create-btn {
        width: 100%; text-align: center;
        padding: 12px; font-size: 0.95rem;
    }
    .nav-right .quota-badge { align-self: flex-start; }
    .nav-right .user-name { align-self: flex-start; margin-top: auto; }
    .nav-right .btn-outline { width: 100%; text-align: center; }

    .container { max-width: 100%; padding: 80px 16px 24px; }
    .page-header { flex-direction: column; align-items: flex-start; margin-bottom: 24px; gap: 12px; }
    .page-header h2 { font-size: 1.4rem; }

    /* 卡片网格自适应 */
    .task-grid { gap: 12px; }
    /* 竖图和1:1在移动端仍然保持每排至少2个 */
    .task-grid[data-aspect-ratio="9:16"],
    .task-grid[data-aspect-ratio="2:3"],
    .task-grid[data-aspect-ratio="3:4"],
    .task-grid[data-aspect-ratio="4:5"] {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .task-grid[data-aspect-ratio="1:1"] {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    /* 横图在移动端自适应全宽 */
    .task-grid[data-aspect-ratio="16:9"] .task-preview,
    .task-grid[data-aspect-ratio="21:9"] .task-preview,
    .task-grid[data-aspect-ratio="3:2"] .task-preview,
    .task-grid[data-aspect-ratio="4:3"] .task-preview,
    .task-grid[data-aspect-ratio="5:4"] .task-preview {
        width: 100% !important; height: auto !important; min-height: 160px;
    }
    .task-grid[data-aspect-ratio="16:9"] .task-preview { aspect-ratio: 16/9; }
    .task-grid[data-aspect-ratio="21:9"] .task-preview { aspect-ratio: 21/9; }
    .task-grid[data-aspect-ratio="3:2"] .task-preview { aspect-ratio: 3/2; }
    .task-grid[data-aspect-ratio="4:3"] .task-preview { aspect-ratio: 4/3; }
    .task-grid[data-aspect-ratio="5:4"] .task-preview { aspect-ratio: 5/4; }
    .task-grid[data-aspect-ratio="16:9"] .task-card,
    .task-grid[data-aspect-ratio="21:9"] .task-card,
    .task-grid[data-aspect-ratio="3:2"] .task-card,
    .task-grid[data-aspect-ratio="4:3"] .task-card,
    .task-grid[data-aspect-ratio="5:4"] .task-card { width: 100% !important; min-width: 0; }
    /* 竖图和1:1卡片在移动端自适应 grid */
    .task-card[data-aspect-ratio="9:16"],
    .task-card[data-aspect-ratio="2:3"],
    .task-card[data-aspect-ratio="3:4"],
    .task-card[data-aspect-ratio="4:5"],
    .task-card[data-aspect-ratio="1:1"] { width: auto !important; min-width: 0; }

    /* 登录页 */
    .login-card { padding: 32px 20px; }

    /* 表单 */
    .form-row { grid-template-columns: 1fr; }
    .form-row-inline { flex-direction: column; gap: 0; }
    .glass-card { padding: 24px 16px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    /* NGA 两栏变单栏 */
    .nga-layout { flex-direction: column; }
    .nga-left { flex: none; width: 100%; }
    .nga-right { width: 100%; }
    .sector-pills { flex-wrap: wrap; }
    .thread-list { max-height: 220px; }

    /* 详情页 */
    .detail-preview { min-height: 250px; }
    .detail-preview img { max-height: 50vh; }
    .detail-actions { flex-direction: column; gap: 10px; }
    .detail-actions .btn { width: 100%; }
    .download-menu { width: 100%; }
    .download-options { left: 0; right: 0; min-width: 0; transform: none; }
    .info-item { flex-direction: column; gap: 4px; }
    .info-label { width: auto; }
    .prompt-theme { font-size: 1.1rem; }

    /* 步骤条 */
    .step-bar { margin-bottom: 20px; }
    .step-circle { width: 28px; height: 28px; font-size: 0.75rem; }
    .step-connector { margin-top: -20px; }

    /* 分页 */
    .pagination { gap: 4px; }
    .pagination a, .pagination .current, .pagination .disabled { min-width: 32px; height: 32px; font-size: 0.8rem; }
}

/* ========== 响应式 - 小手机 ========== */
@media (max-width: 380px) {
    .navbar { padding: 10px 12px; }
    .nav-brand { font-size: 1.05rem; }
    .container { padding: 72px 12px 20px; }
    .page-header h2 { font-size: 1.2rem; }
    .task-theme { font-size: 0.75rem; padding: 6px 10px; }
    .task-info { padding: 10px; }
    .badge { font-size: 0.7rem; padding: 3px 8px; }
}
