/* ============================================================
   天工绘影 — Frontend Design System v2.0 "Aurora Studio"
   设计语言：近黑画布 + 极光渐变 + 玻璃拟态 + 微交互
   参考基准：Midjourney（画廊黑）/ Leonardo.ai（紫色辉光）/ 2026 AI-First
   ============================================================ */

:root {
    /* 画布与表面 */
    --bg-body: #09090B;
    --bg-surface: #101013;
    --bg-surface-hover: #17171B;
    --bg-elevated: #0D0D10;
    --bg-element: rgba(255, 255, 255, 0.04);
    --bg-element-hover: rgba(255, 255, 255, 0.07);
    --bg-glass: rgba(255, 255, 255, 0.028);

    /* 边框 */
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.14);

    /* 文字 */
    --text-title: #F4F4F5;
    --text-body: #A1A1AA;
    --text-muted: #63636B;

    /* 品牌色 */
    --accent: #6366F1;
    --accent-hover: #818CF8;
    --accent-2: #8B5CF6;
    --accent-3: #D946EF;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-glow-strong: rgba(99, 102, 241, 0.45);
    --grad-brand: linear-gradient(135deg, #6366F1 0%, #8B5CF6 55%, #D946EF 100%);

    /* 语义色 */
    --success: #34D399;
    --success-soft: rgba(52, 211, 153, 0.12);
    --error: #F87171;
    --error-soft: rgba(248, 113, 113, 0.12);
    --warning: #FBBF24;
    --warning-soft: rgba(251, 191, 36, 0.12);

    /* 圆角 */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 22px;
    --radius-3xl: 28px;
    --radius-full: 999px;

    /* 阴影与辉光 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.65);
    --glow-accent: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 8px 40px rgba(99, 102, 241, 0.22);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --nav-height: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 极光画布：多层柔光直接挂在 body 上，永远位于内容之下 */
    background:
        radial-gradient(900px 480px at 12% -4%, rgba(99, 102, 241, 0.10), transparent 60%),
        radial-gradient(1000px 560px at 88% -8%, rgba(139, 92, 246, 0.08), transparent 60%),
        radial-gradient(1100px 620px at 50% 118%, rgba(217, 70, 239, 0.055), transparent 62%),
        var(--bg-body);
    background-attachment: fixed;
}

a { color: var(--accent-hover); text-decoration: none; transition: color 0.2s var(--ease-out); }
a:hover { color: #A5B4FC; }

::selection { background: rgba(99, 102, 241, 0.35); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; border: 2px solid var(--bg-body); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ============================================================
   通用工具类
   ============================================================ */
.gradient-text {
    background: linear-gradient(160deg, #FFFFFF 20%, #C7C7D1 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-accent {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
}
.accent-glow { box-shadow: var(--glow-accent); }
.accent-glow-sm { box-shadow: 0 0 32px rgba(99, 102, 241, 0.28); }

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.82); } }
@keyframes shimmerMove { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes gradientFlow { to { background-position: 200% center; } }
@keyframes progressFlow { to { background-position: 200% 0; } }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -18px) scale(1.06); }
    66% { transform: translate(-16px, 14px) scale(0.96); }
}
@keyframes imgReveal { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

.animate-fade-in { animation: fadeIn 0.35s var(--ease-out); }
.animate-slide-up { animation: slideUp 0.5s var(--ease-out) both; }
.animate-scale-in { animation: scaleIn 0.3s var(--ease-out) both; }
.animate-shimmer { background-size: 200% 100%; animation: gradientFlow 2.4s linear infinite; }

/* ============================================================
   容器
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   头部导航
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.68);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header::before {
    /* 顶部品牌发丝线 */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(99, 102, 241, 0.55) 30%, rgba(217, 70, 239, 0.45) 70%, transparent 95%);
    opacity: 0.7;
    pointer-events: none;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    gap: 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-title);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.3px;
}
.logo:hover { color: var(--text-title); }
.logo-icon {
    width: 30px;
    height: 30px;
    background: var(--grad-brand);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.logo-icon svg { width: 62%; height: 62%; display: block; }
.logo img { height: 32px; width: auto; }

.nav { display: flex; gap: 2px; padding: 4px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); }
.nav-link {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
    cursor: pointer;
}
.nav-link:hover { color: var(--text-body); background: var(--bg-element); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(139, 92, 246, 0.22));
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35), 0 2px 12px rgba(99, 102, 241, 0.18);
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
    font-family: inherit;
    position: relative;
}
.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 20px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 32px rgba(99, 102, 241, 0.5);
    filter: brightness(1.08);
    color: #fff;
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.97); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-body);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    color: var(--text-title);
    border-color: var(--border-strong);
    background: var(--bg-element-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-element);
    color: var(--text-title);
    border: 1px solid rgba(129, 140, 248, 0.35);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: rgba(129, 140, 248, 0.6); color: #fff; }
.btn-lg { padding: 15px 34px; font-size: 15.5px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* ============================================================
   用户区 / 下拉
   ============================================================ */
.user-menu { display: flex; align-items: center; gap: 12px; }
.balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #E8D5A3;
    padding: 7px 14px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.13), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: var(--radius-full);
    line-height: 1;
}
.balance::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
}
.balance strong { color: #FDE68A; font-weight: 700; font-variant-numeric: tabular-nums; }

.dropdown { position: relative; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    color: var(--text-title);
    padding: 8px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s var(--ease-out);
    font-family: inherit;
    line-height: 1.3;
}
.user-btn:hover { background: var(--bg-element-hover); border-color: var(--border-strong); }
.user-btn svg { width: 15px; height: 15px; stroke: var(--accent-hover); fill: none; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: rgba(20, 20, 24, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 6px;
    display: none;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.16s var(--ease-out);
}
.dropdown-menu::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.dropdown:hover .dropdown-menu,
.dropdown-menu.show { display: block; }
.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s var(--ease-out);
    font-family: inherit;
    text-align: left;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--bg-element-hover); color: var(--text-title); }
.dropdown-divider { height: 1px; background: var(--border-subtle); margin: 4px 6px; }

/* ============================================================
   主体 / 区块
   ============================================================ */
.main { flex: 1; position: relative; }
.section { padding: 72px 0; }

.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
.section-eyebrow::before,
.section-eyebrow::after {
    content: '';
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6));
}
.section-eyebrow::after { background: linear-gradient(90deg, rgba(139, 92, 246, 0.6), transparent); }
.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-title);
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.8px;
    line-height: 1.2;
}
.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    text-align: center;
    padding: 130px 0 70px;
    position: relative;
    overflow: hidden;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 14s ease-in-out infinite;
}
.hero-orb-1 { top: -160px; left: 8%; width: 440px; height: 440px; background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 65%); }
.hero-orb-2 { top: -100px; right: 4%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(217, 70, 239, 0.14), transparent 65%); animation-delay: -5s; }
.hero-orb-3 { bottom: -220px; left: 50%; width: 560px; height: 460px; transform: translateX(-50%); background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 65%); animation-delay: -9s; }
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero .title {
    font-size: clamp(40px, 6vw, 66px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    background: linear-gradient(115deg, #FAFAFA 25%, #C4B5FD 45%, #F0ABFC 60%, #FAFAFA 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 7s linear infinite;
}
.hero .subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.09);
    border: 1px solid rgba(129, 140, 248, 0.3);
    color: #C7D2FE;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.12);
}
.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #818CF8;
    box-shadow: 0 0 10px #818CF8;
    animation: pulse 2.2s infinite;
}
.hero-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 52px;
    position: relative;
    z-index: 1;
}
.stat-item { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.stat-value {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #E0E7FF, #F5D0FE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.5px; }

/* ============================================================
   首页能力卡（feature strip）
   ============================================================ */
.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: -34px;
    position: relative;
    z-index: 2;
}
.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 26px;
    text-decoration: none;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px 180px at 20% 0%, rgba(99, 102, 241, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
}
.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(165, 180, 252, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.35); box-shadow: var(--shadow-lg), 0 0 32px rgba(99, 102, 241, 0.1); }
.feature-card:hover::before,
.feature-card:hover::after { opacity: 1; }
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.12));
    border: 1px solid rgba(129, 140, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.feature-icon svg { width: 22px; height: 22px; stroke: #A5B4FC; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-name { font-weight: 600; color: var(--text-title); font-size: 15px; }
.feature-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   生成卡片 & 表单
   ============================================================ */
.generate-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: 40px;
    position: relative;
}
.generate-card::before {
    /* 顶部渐变高光边 */
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.55), transparent);
    pointer-events: none;
}
.generate-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group > label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-title);
    letter-spacing: 0.2px;
}
.form-group textarea {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
    font-family: inherit;
    resize: vertical;
    line-height: 1.65;
}
.form-group textarea:focus {
    border-color: rgba(129, 140, 248, 0.65);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.form-group textarea::placeholder { color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-input {
    width: 100%;
    padding: 12px 38px 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B8B96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}
.form-input:focus {
    border-color: rgba(129, 140, 248, 0.65);
    background-color: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.form-input option { background: #17171B; color: var(--text-title); }

/* ============================================================
   模型选择
   ============================================================ */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.model-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.model-card:hover { border-color: var(--border-strong); background: var(--bg-element-hover); transform: translateY(-2px); }
.model-card input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-strong);
    border-radius: 50%;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.2s var(--ease-out);
    flex-shrink: 0;
}
.model-card input[type="radio"]:checked { border-color: var(--accent-hover); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); }
.model-card input[type="radio"]:checked::after { content: ''; position: absolute; inset: 2.5px; border-radius: 50%; background: var(--grad-brand); }
.model-name { font-size: 14px; font-weight: 600; color: var(--text-title); }
.model-cost { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   场景模板 Tabs / 模板卡片 / Chips
   ============================================================ */
.tab-nav-frontend {
    display: inline-flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.035);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    /* 场景tab较多时横向滚动，不换行不撑爆容器 */
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tab-nav-frontend::-webkit-scrollbar { display: none; }
.tab-nav-frontend .tab-btn { flex-shrink: 0; white-space: nowrap; }
.tab-nav-frontend { margin-bottom: 14px; }

/* 场景tab可滑动提示：右缘渐隐 + 弹跳箭头，滑到最右自动隐藏 */
.tab-scroll-wrap { position: relative; }
.tab-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 14px; /* 底部留出tab的margin，避免盖住下缘 */
    width: 52px;
    background: linear-gradient(to left, rgba(11, 12, 20, 0.88) 15%, transparent);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.25s ease;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.tab-scroll-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-72%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #d5d9ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
    animation: tabNudge 1.6s ease-in-out infinite;
    transition: opacity 0.25s ease;
}
.tab-scroll-wrap.at-end::after,
.tab-scroll-wrap.at-end .tab-scroll-arrow { opacity: 0; }
@keyframes tabNudge {
    0%, 100% { transform: translate(0, -72%); }
    50% { transform: translate(4px, -72%); }
}
@media (prefers-reduced-motion: reduce) {
    .tab-scroll-arrow { animation: none; }
}
.tab-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.2s var(--ease-out);
}
.tab-btn:hover { color: var(--text-body); }
.tab-btn.active {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tpl-card {
    position: relative;
    padding: 15px;
    border-radius: var(--radius-lg);
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.tpl-card:hover { border-color: var(--border-strong); transform: translateY(-2px); background: var(--bg-element-hover); }
.tpl-card.selected {
    border-color: rgba(129, 140, 248, 0.7);
    background: linear-gradient(150deg, rgba(99, 102, 241, 0.13), rgba(139, 92, 246, 0.06));
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.3), 0 4px 20px rgba(99, 102, 241, 0.16);
}
.tpl-name { font-size: 13.5px; font-weight: 600; color: var(--text-title); margin-bottom: 4px; }
.tpl-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.tpl-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.chip-group { margin-bottom: 10px; }
.chip-group-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    color: var(--text-body);
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); color: var(--text-title); transform: translateY(-1px); }
.chip.active {
    background: var(--grad-brand);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 14px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ============================================================
   生成方式切换
   ============================================================ */
.mode-switch { display: flex; gap: 10px; }
.mode-item { flex: 1; }
.mode-item input { display: none; }
.mode-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-element);
    border: 1px solid var(--border-subtle);
    font-size: 13.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    font-weight: 500;
}
.mode-item:hover span { color: var(--text-body); border-color: var(--border-strong); }
.mode-item input:checked + span {
    border-color: rgba(129, 140, 248, 0.65);
    color: #fff;
    background: linear-gradient(150deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.08));
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.25), 0 4px 16px rgba(99, 102, 241, 0.14);
}

/* ============================================================
   参考图上传
   ============================================================ */
.ref-upload-box {
    border: 1.5px dashed rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    background: rgba(255, 255, 255, 0.015);
}
.ref-upload-box:hover, .ref-upload-box.dragover {
    border-color: rgba(129, 140, 248, 0.7);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}
.ref-upload-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.ref-preview-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ref-thumb {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-sm);
    animation: scaleIn 0.2s var(--ease-out);
}
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 13px;
    line-height: 19px;
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.ref-remove:hover { background: var(--error); }

/* ============================================================
   计费预估 & 任务进度
   ============================================================ */
.cost-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 13px 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.cost-estimate::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grad-brand);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
    flex-shrink: 0;
}
.cost-estimate strong {
    color: #C7D2FE;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 模型说明条 */
.model-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    min-height: 22px;
}
.model-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    flex-shrink: 0;
}
.model-tag.tag-recommend { background: linear-gradient(135deg, rgba(99,102,241,0.22), rgba(139,92,246,0.22)); color: #A5B4FC; border: 1px solid rgba(139,92,246,0.35); }
.model-tag.tag-fast { background: rgba(34,197,94,0.14); color: #6EE7A0; border: 1px solid rgba(34,197,94,0.3); }
.model-tag.tag-hd { background: rgba(56,189,248,0.14); color: #7DD3FC; border: 1px solid rgba(56,189,248,0.3); }
.model-tag.tag-free { background: rgba(245,158,11,0.14); color: #FCD34D; border: 1px solid rgba(245,158,11,0.3); }
.model-tag.tag-plain { background: var(--bg-element); color: var(--text-body); border: 1px solid var(--border-subtle); }
.model-desc { color: var(--text-body); }
.model-meta { color: var(--text-muted); font-variant-numeric: tabular-nums; }


.task-status-bar { margin-bottom: 18px; }
.task-status-text { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-body); margin-bottom: 10px; font-weight: 500; }
.progress-track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6, #D946EF, #6366F1);
    background-size: 200% 100%;
    animation: progressFlow 2.2s linear infinite;
    transition: width 0.5s var(--ease-out);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
    position: relative;
}

/* ============================================================
   结果区 / 图片卡
   ============================================================ */
.result-area { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--border-subtle); display: none; }
.result-area.visible { display: block; animation: slideUp 0.35s var(--ease-out); }
.result-area h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}
.result-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.img-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.img-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: var(--shadow-lg), 0 0 24px rgba(99, 102, 241, 0.12);
    z-index: 2;
}
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.45s ease; }
.img-card img.img-loaded { opacity: 1; animation: imgReveal 0.45s var(--ease-out); }
.img-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.hover-actions {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 9, 11, 0.25), rgba(9, 9, 11, 0.72));
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.22s var(--ease-out);
}
.img-card:hover .hover-actions { opacity: 1; }
.action-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-spring);
}
.action-icon-btn:hover {
    background: var(--grad-brand);
    transform: scale(1.12);
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.5);
}
.action-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   游戏UI素材：勾选框 / 导出面板
   ============================================================ */
.img-check {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-xs);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.img-check:hover { border-color: var(--accent-hover); box-shadow: 0 0 10px rgba(99, 102, 241, 0.4); }
.img-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}
.export-panel {
    margin-top: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeSlideIn 0.35s var(--ease-out);
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.export-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(139, 92, 246, 0.06));
    border-bottom: 1px solid var(--border-subtle);
}
.export-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-title);
}
.export-panel-title svg { width: 17px; height: 17px; stroke: var(--accent-hover); }
.export-panel-hint { font-size: 12px; color: var(--text-muted); }
.export-panel-body {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
}
.export-field { display: flex; flex-direction: column; gap: 6px; }
.export-field label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.export-field select {
    min-width: 210px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg-surface-hover);
    color: var(--text-title);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    outline: none;
}
.export-field select:focus { border-color: var(--accent); }
.export-actions { display: flex; gap: 10px; margin-left: auto; }
.export-result { padding: 0 18px 16px; }
.export-result:empty { display: none; }
.export-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--success-soft);
    border: 1px solid rgba(52, 211, 153, 0.25);
    border-radius: var(--radius-md);
    font-size: 13px;
}
.export-ok { color: var(--success); font-weight: 600; }
.export-result-row .btn { white-space: nowrap; text-decoration: none; }

/* ============================================================
   骨架屏 & 空状态
   ============================================================ */
.skeleton-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
}
.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.055) 50%, transparent 80%);
    animation: shimmerMove 1.6s infinite;
}
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 40px;
    border-radius: var(--radius-2xl);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(129, 140, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state-icon svg { width: 30px; height: 30px; stroke: #A5B4FC; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-title); margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.empty-state-desc a, .empty-state .link { color: var(--accent-hover); cursor: pointer; font-weight: 500; }
.empty-state-desc a:hover, .empty-state .link:hover { text-decoration: underline; }

/* ============================================================
   我的作品
   ============================================================ */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.work-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    background: var(--bg-elevated);
    transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.work-card:hover {
    transform: translateY(-3px);
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: var(--shadow-lg), 0 0 24px rgba(99, 102, 241, 0.1);
    z-index: 2;
}
.work-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.45s ease; }
.work-card img.img-loaded { opacity: 1; animation: imgReveal 0.45s var(--ease-out); }
.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(9, 9, 11, 0.88));
    opacity: 0;
    transition: opacity 0.22s var(--ease-out);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    backdrop-filter: blur(2px);
}
.work-card:hover .work-overlay { opacity: 1; }
.work-prompt {
    font-size: 11.5px;
    color: #D4D4D8;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.work-actions { display: flex; gap: 8px; }
.work-actions .action-icon-btn { width: 36px; height: 36px; }
.work-actions .action-icon-btn svg { width: 16px; height: 16px; }

/* ============================================================
   作品墙
   ============================================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}
.gallery-item:hover {
    border-color: rgba(129, 140, 248, 0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 28px rgba(99, 102, 241, 0.12);
    z-index: 2;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.45s ease; }
.gallery-item img.img-loaded { opacity: 1; animation: imgReveal 0.45s var(--ease-out); }
.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 34px 16px 14px;
    background: linear-gradient(transparent, rgba(9, 9, 11, 0.92));
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gallery-user { font-size: 12px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 6px; }
.gallery-user::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--grad-brand); box-shadow: 0 0 6px rgba(139, 92, 246, 0.8); }
.gallery-prompt {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery-like {
    margin-top: 8px;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s var(--ease-out);
}
.gallery-like:hover {
    color: #FDA4AF;
    border-color: rgba(251, 113, 133, 0.5);
    background: rgba(251, 113, 133, 0.12);
    transform: scale(1.05);
}

/* ============================================================
   充值套餐
   ============================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    max-width: 1060px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    padding: 38px 28px;
    text-align: center;
    transition: all 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
}
.pricing-card::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 120px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    pointer-events: none;
}
.pricing-card:hover { border-color: rgba(129, 140, 248, 0.35); transform: translateY(-6px); box-shadow: var(--shadow-lg), 0 0 36px rgba(99, 102, 241, 0.14); }
.pricing-card:hover::before,
.pricing-card:hover::after { opacity: 1; }
.pricing-name { font-size: 17px; font-weight: 700; color: var(--text-title); margin-bottom: 4px; letter-spacing: -0.2px; }
.pricing-credits {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}
.pricing-credits small { font-size: 15px; font-weight: 500; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }
.pricing-price {
    font-size: 21px;
    color: var(--text-title);
    font-weight: 700;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}
.pricing-card .btn { margin-top: 18px; }
.pricing-bonus {
    font-size: 13px;
    font-weight: 600;
    color: #FDE68A;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    align-self: center;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 34px 0;
    text-align: center;
    margin-top: auto;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}
.footer-brand { font-size: 14px; font-weight: 700; color: var(--text-title); margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.footer-brand .logo-icon { width: 22px; height: 22px; border-radius: 6px; }
.footer p { font-size: 12.5px; color: var(--text-muted); }

/* ============================================================
   弹窗
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active { display: flex; animation: fadeIn 0.2s var(--ease-out); }
.modal-content {
    background: linear-gradient(170deg, #15151A, #0E0E12);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-2xl);
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 410px;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.08);
    animation: scaleIn 0.22s var(--ease-out);
    position: relative;
    overflow: hidden;
}
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.6), transparent);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.modal-header h3 { font-size: 20px; font-weight: 700; color: var(--text-title); letter-spacing: -0.3px; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out);
}
.modal-close:hover { color: var(--text-title); background: var(--bg-element-hover); }
.modal .form-group { margin-bottom: 16px; }
.modal .form-group > label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-body);
    margin-bottom: 6px;
}
.modal .form-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-title);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    font-family: inherit;
    background-image: none;
    padding-right: 14px;
    cursor: text;
}
.modal .form-input:focus { border-color: rgba(129, 140, 248, 0.65); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12); }
.modal .btn { margin-top: 8px; }
.modal-footer-text { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.modal-footer-text a { color: var(--accent-hover); font-weight: 600; cursor: pointer; }
.modal-footer-text a:hover { text-decoration: underline; }

/* ============================================================
   Toast 通知
   ============================================================ */
.toast {
    position: fixed;
    top: 84px;
    right: 20px;
    padding: 14px 20px 14px 16px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s var(--ease-out);
    box-shadow: var(--shadow-lg);
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast::before { content: ''; width: 4px; height: 18px; border-radius: 2px; flex-shrink: 0; background: currentColor; }
.toast-success { background: rgba(16, 68, 51, 0.92); color: #6EE7B7; }
.toast-error { background: rgba(82, 22, 26, 0.92); color: #FCA5A5; }
.toast-info { background: rgba(46, 43, 90, 0.92); color: #C7D2FE; }

/* ============================================================
   加载指示
   ============================================================ */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    :root { --nav-height: 56px; }
    .header-content { gap: 10px; }
    .nav { display: none; }
    .hero { padding: 76px 0 48px; }
    .hero .title { font-size: clamp(30px, 8.5vw, 40px); letter-spacing: -1px; }
    .hero .subtitle { font-size: 14px; margin-bottom: 26px; }
    .hero-stats { gap: 22px; margin-top: 38px; }
    .feature-strip { grid-template-columns: 1fr; margin-top: 0; gap: 12px; }
    .section { padding: 44px 0; }
    .section-head { margin-bottom: 32px; }
    .section-title { font-size: 25px; }
    .generate-card { padding: 24px 16px; border-radius: var(--radius-xl); }
    .form-row { grid-template-columns: 1fr; }
    .model-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .works-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tpl-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .modal-content { padding: 28px 20px 24px; }
    .container { padding: 0 16px; }
    .result-images { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .mode-switch { flex-direction: column; }
    .balance { padding: 6px 10px; font-size: 12px; }
    .toast { top: 68px; left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 480px) {
    .hero-orb-1 { width: 300px; height: 300px; }
    .hero-orb-2 { width: 260px; height: 260px; }
    .model-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
