/* ========================================
   创意造梦 - 样式
   电影感暗色系 · 专业氛围
   ======================================== */

:root {
    /* 梦境电影感暗色 · 深蓝紫基底（与落地页统一） */
    --bg: #0d0e1f;
    --bg-2: #14132b;
    --surface: rgba(26, 24, 56, 0.55);
    --card: rgba(26, 24, 56, 0.5);
    --card-hover: rgba(42, 38, 78, 0.7);
    --border: rgba(167, 139, 250, 0.18);
    --text: #eef0ff;
    --text-dim: #9a9ac4;
    --text-faint: #6a6a8c;
    --accent: #ff7a45;
    --accent-2: #a78bfa;
    --accent-grad: linear-gradient(135deg, #ff7a45 0%, #ffb07a 100%);
    --dream-grad: linear-gradient(135deg, #a78bfa, #7c5cff);
    --green: #4ade80;
    --radius: 16px;
    --radius-sm: 10px;
    --glass: blur(14px);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    /* 氛围极光 */
    --aurora-1: rgba(124, 92, 255, 0.22);
    --aurora-2: rgba(167, 139, 250, 0.16);
    --aurora-3: rgba(255, 138, 107, 0.10);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* 全局氛围层：单一柔和大面积渐变，干净不脏 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(1200px 800px at 50% -10%, rgba(99, 66, 230, 0.15), transparent 70%);
    filter: blur(60px);
}

/* ========== 顶部导航 ========== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 14, 31, 0.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.logo-mark { font-size: 22px; }
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.status-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.status-badge.demo { background: rgba(255, 164, 92, 0.15); color: var(--accent-2); border: 1px solid rgba(255, 164, 92, 0.3); }
.status-badge.live { background: rgba(74, 222, 128, 0.15); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.3); }
.status-badge.warn { background: rgba(255, 193, 7, 0.12); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.3); }
.status-badge.energy { background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(56, 189, 248, 0.12)); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ========== 容器 ========== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    min-height: calc(100vh - 60px);
}

/* ========== 首页 ========== */
/* 首页hero：干净渐变，不叠层，无边框 */
.hero {
    text-align: center;
    margin-bottom: 32px;
    padding: 48px 0 40px;
    position: relative;
    z-index: 1;
}
/* 单层柔和光晕：从中心向四周淡出，无硬边、无边框 */
.hero::before {
    content: "";
    position: absolute;
    top: -50px; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 420px;
    background: radial-gradient(640px 320px at 50% 35%, rgba(124, 92, 255, 0.18), transparent 72%);
    z-index: -1;
    pointer-events: none;
}
.hero h1,
.hero p,
.hero .tag,
.hero .trust {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
.tag {
    display: inline-block;
    font-size: 13px;
    color: var(--accent-2);
    border: 1px solid var(--border);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}
.trust {
    margin-top: 26px;
    color: var(--text-dim);
    font-size: 16px;
}
.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.accent {
    color: #ff8a42;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.hero-sub {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}
.entry-card {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 30px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.entry-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-grad);
    opacity: 0.5;
    transition: opacity 0.3s;
}
.entry-card:hover {
    border-color: rgba(255, 107, 53, 0.4);
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 34px rgba(124, 92, 255, 0.20);
}
.entry-card:hover::before { opacity: 1; }
.entry-icon {
    font-size: 28px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 164, 92, 0.06));
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 14px;
    margin-bottom: 0;
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}
.entry-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.entry-card:hover .entry-icon {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}
.entry-title { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.entry-desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 16px; }
.entry-arrow { color: var(--accent); font-size: 14px; font-weight: 600; transition: transform 0.3s; display: inline-block; }
.entry-card:hover .entry-arrow { transform: translateX(6px); }

.principles {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.principle {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-faint);
    font-size: 13px;
}
.p-num {
    font-family: "SF Mono", monospace;
    color: var(--accent);
    font-weight: 700;
}

/* ========== 模块页 ========== */
.module-title { font-size: 26px; font-weight: 700; margin-bottom: 28px; }
.btn-back {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 0;
}
.btn-back:hover { color: var(--accent); }

/* ========== 输入面板 ========== */
.input-panel {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
}
.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}
.textarea, .input {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}
.textarea:focus, .input:focus { outline: none; border-color: var(--accent); }
.textarea { min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-field { margin-bottom: 16px; }

.input-hints {
    margin: 16px 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-faint);
}
.chip {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-row { display: flex; gap: 12px; margin-top: 24px; }

/* 创意工坊输入区：生成方向 + 提示词优化 并排 */
.action-row { display: flex; gap: 12px; margin-top: 8px; }
.action-row .btn-primary, .action-row .btn-secondary { flex: none; }
.btn-secondary {
    background: rgba(255, 107, 53, 0.10);
    color: var(--accent-2);
    border: 1.5px solid rgba(255, 107, 53, 0.45);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-secondary:hover:not(:disabled) { background: rgba(255, 107, 53, 0.12); transform: translateY(-1px); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== 结果区 ========== */
.result-area { animation: fadeUp 0.4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* E. 全局微动效 */
.view-home, .view-module { animation: viewFadeIn 0.35s ease; }
@keyframes viewFadeIn { from { opacity: 0; } to { opacity: 1; } }
.btn-primary, .btn-copy, .btn-continue, .btn-refine, .btn-back, .btn-ghost {
    transition: all 0.2s;
}
.btn-primary:active, .btn-continue:active, .btn-refine:active, .btn-back:active {
    transform: scale(0.96);
}
.btn-copy:active { transform: scale(0.94); }

.analysis-box {
    background: rgba(255, 107, 53, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.analysis-label { font-size: 12px; color: var(--accent); font-weight: 700; display: block; margin-bottom: 6px; }
.analysis-box p { font-size: 14px; color: var(--text-dim); }

.direction-list { display: flex; flex-direction: column; gap: 20px; }
.direction-card {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-left: 3px solid var(--dir-color, var(--accent));
    border-radius: var(--radius);
    padding: 28px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 8px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04);
}
.direction-card:hover { border-color: rgba(255, 107, 53, 0.4); border-left-color: var(--dir-color, var(--accent)); background: var(--card-hover); box-shadow: 0 10px 36px rgba(124, 92, 255, 0.18); }
.ad-card { cursor: default; }
.ad-card:hover { background: var(--card); }

.dir-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dir-num {
    background: var(--accent-grad);
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}
.dir-title { font-size: 19px; font-weight: 700; flex: 1; }
.dir-emotion {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--accent-2);
    white-space: nowrap;
}

.dir-meta { margin-bottom: 16px; }
.meta-item { font-size: 13px; color: var(--text-dim); }
.meta-item b { color: var(--text-faint); font-weight: 500; margin-right: 6px; }

.dir-moment {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    border-left: 3px solid var(--accent);
}
.moment-label { font-size: 12px; color: var(--accent); font-weight: 600; display: block; margin-bottom: 4px; }
.dir-moment p { font-size: 14px; color: var(--text); }

/* 第一感觉徽章 */
.feeling-badge {
    font-size: 12px;
    font-weight: 700;
    background: var(--accent-grad);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* 第一眼视觉钩子 */
.dir-hook {
    background: rgba(255, 107, 53, 0.06);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    border-left: 3px solid var(--accent);
}
.hook-label { font-size: 12px; color: var(--accent); font-weight: 600; display: block; margin-bottom: 4px; }
.dir-hook p { font-size: 14px; color: var(--text); }

/* 用户代入点 */
.dir-projection {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    border-left: 3px solid var(--green);
}
.projection-label { font-size: 12px; color: var(--green); font-weight: 600; display: block; margin-bottom: 4px; }
.dir-projection p { font-size: 14px; color: var(--text-dim); }

.dir-exp { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; background: var(--bg-2); border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; }
.exp-head-label { font-size: 12px; color: var(--green); font-weight: 600; display: block; margin-bottom: 2px; }
.exp-item { display: flex; gap: 12px; align-items: flex-start; }
.exp-time {
    font-family: "SF Mono", monospace;
    font-size: 11px;
    color: var(--text-faint);
    background: var(--bg-2);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
}
.exp-item p { font-size: 13px; color: var(--text-dim); }

.dir-viral { border-top: 1px solid var(--border); padding-top: 14px; }
.viral-label { font-size: 12px; color: var(--green); font-weight: 600; display: block; margin-bottom: 4px; }
.dir-viral p { font-size: 13px; color: var(--text-dim); }

.btn-select {
    width: 100%;
    margin-top: 18px;
    background: var(--bg-2);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 11px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-select:hover { background: var(--accent); color: #fff; }

/* ========== 最终Prompt ========== */
.prompt-result {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
.prompt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.prompt-head h3 { font-size: 22px; font-weight: 700; }

.prompt-box {
    background: var(--bg);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.prompt-box.small { padding: 16px; }
.prompt-label { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 10px; line-height: 1.5; }
.prompt-text { font-size: 14px; color: var(--text); line-height: 1.8; white-space: pre-wrap; }
.btn-copy {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 续写按钮组 + 续写幕卡片 ===== */
.prompt-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: flex-end;
}
.prompt-actions .btn-copy {
    position: static;
}
.btn-continue {
    background: var(--accent-grad);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-continue:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-continue:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* 续写幕卡片 */
.continuation-act {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    margin-top: 24px;
    position: relative;
}
.continuation-act::before {
    content: '';
    position: absolute;
    top: -24px; left: 50%;
    width: 2px; height: 20px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    opacity: 0.6;
    transform: translateX(-50%);
    animation: flow-down 2.5s ease-in-out infinite;
}
@keyframes flow-down {
    0%, 100% { opacity: 0.2; height: 12px; }
    50% { opacity: 0.8; height: 24px; }
}
.act-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.act-badge {
    background: var(--accent-grad);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.35);
}
.act-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.act-type {
    font-size: 11px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.act-theme {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 14px;
    line-height: 1.6;
}
.act-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.act-meta-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.meta-label {
    display: block;
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 4px;
}
.meta-val {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}
.act-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.tl-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.tl-tag {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tl-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.prompt-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.bd-item {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bd-key { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.bd-val { font-size: 13px; color: var(--text-dim); }

.prompt-tips {
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.tips-label { font-size: 12px; color: var(--green); font-weight: 600; display: block; margin-bottom: 4px; }
.prompt-tips p { font-size: 13px; color: var(--text-dim); white-space: pre-line; line-height: 1.7; }

.refine-box {
    background: var(--bg-2);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}
.refine-label { font-size: 13px; color: var(--accent-2); font-weight: 600; display: block; margin-bottom: 12px; }
.refine-row { display: flex; gap: 10px; }
.refine-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.refine-input:focus { border-color: var(--accent); }
.refine-input::placeholder { color: var(--text-faint); }
.btn-refine {
    background: var(--accent-grad);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.btn-refine:disabled { opacity: 0.5; cursor: not-allowed; }
.refine-note { font-size: 12px; color: var(--text-faint); margin-top: 10px; }

/* === 优化结果精简布局 === */
.opt-compact .dir-scores { margin-top: 16px; }
.opt-compact .opt-tip {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
}
.opt-compact .opt-tip .tips-label { display: block; margin-bottom: 4px; }
.opt-compact .opt-tip p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}
.breakdown-wrap { margin-top: 14px; }
.btn-toggle-bd {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}
.btn-toggle-bd:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 107, 53, 0.04);
}

@media (max-width: 768px) {
    .refine-row { flex-direction: column; }
    .btn-refine { width: 100%; min-height: 44px; }
}

/* ========== 广告模块 ========== */
.brand-analysis {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04);
}
.ba-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.ba-item {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ba-label { font-size: 12px; color: var(--text-faint); }
.ba-val { font-size: 16px; font-weight: 600; }
.ba-val.highlight { color: var(--accent); }
.ba-reason, .ba-insight { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }
.ba-insight b { color: var(--text); }

.ad-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.ad-field { }
.af-label { font-size: 12px; color: var(--accent-2); font-weight: 600; display: block; margin-bottom: 4px; }
.ad-field p { font-size: 13px; color: var(--text-dim); }

/* ========== 历史 ========== */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
    background: var(--card);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: 0 6px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
}
.hi-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hi-tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.hi-tag.director { background: rgba(255, 107, 53, 0.15); color: var(--accent); }
.hi-tag.ad { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.hi-time { font-size: 12px; color: var(--text-faint); }
.hi-input { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.hi-output { font-size: 13px; color: var(--text-dim); }
.hi-label { color: var(--text-faint); }
.empty { text-align: center; color: var(--text-faint); padding: 60px; }

/* ========== Loading ========== */
.loading-mask {
    position: fixed;
    inset: 0;
    background: rgba(13, 14, 31, 0.82);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.loading-box { text-align: center; }
.loading-spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { color: var(--text-dim); font-size: 15px; }

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 1000;
    box-shadow: var(--shadow);
}
.toast-enter-active, .toast-leave-active { transition: all 0.3s; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(-50%) translateY(10px); }

/* ========== 爆款模式标签 ========== */
.pattern-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pattern-tag {
    font-size: 12px;
    font-weight: 700;
    background: var(--accent-grad);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
}
.desire-tag, .remake-tag {
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 20px;
}
.desire-tag { color: var(--accent-2); border-color: rgba(255, 164, 92, 0.3); }
.remake-tag { color: var(--green); border-color: rgba(74, 222, 128, 0.3); }
.pattern-psychology {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.psychology-label { font-size: 12px; color: var(--text-faint); font-weight: 600; display: block; margin-bottom: 4px; }
.pattern-psychology p { font-size: 13px; color: var(--text-dim); }

/* ========== AI推荐徽章（弱化评分后的替代） ========== */
.dir-recommend {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-grad);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
    white-space: nowrap;
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(255, 107, 53, 0); }
}

/* ========== 创作目的类型标签 ========== */
.purpose-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: rgba(99, 179, 237, 0.16);
    color: #8fd0ff;
    border: 1px solid rgba(99, 179, 237, 0.38);
    padding: 3px 10px;
    border-radius: 20px;
    margin-right: 8px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ========== 评分区 ========== */
.dir-scores {
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.scores-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.scores-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}
.scores-overall {
    font-size: 26px;
    font-weight: 800;
    font-family: "SF Mono", monospace;
    line-height: 1;
}
.scores-overall.score-high { color: var(--green); }
.scores-overall.score-mid { color: var(--accent-2); }
.scores-overall.score-low { color: #ef4444; }
.scores-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sb-label {
    font-size: 11px;
    color: var(--text-faint);
    width: 100px;
    flex-shrink: 0;
}
.sb-track {
    flex: 1;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}
.sb-fill {
    height: 100%;
    background: var(--accent-grad);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.sb-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    font-family: "SF Mono", monospace;
    width: 20px;
    text-align: right;
}

/* ========== 模式提示条 ========== */
.mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}
.banner-btn {
    flex-shrink: 0;
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}
.banner-btn:hover { background: rgba(255, 193, 7, 0.28); }

.trial-banner {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--green);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 13px;
}
.trial-banner b { color: #4ade80; font-size: 14px; }
.mode-banner.trial {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--green);
}
.mode-banner.trial .banner-btn {
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.4);
    color: var(--green);
}
.mode-banner.trial .banner-btn:hover { background: rgba(74, 222, 128, 0.28); }

/* ========== 设置面板 ========== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-box {
    background: var(--surface);
    -webkit-backdrop-filter: var(--glass);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,.06);
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; color: var(--text); margin: 0; }
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px; }
.set-status {
    display: inline-block;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 18px;
}
.set-block { margin-bottom: 22px; }
.set-block:last-child { margin-bottom: 0; }
.set-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}
.set-row { display: flex; gap: 10px; }
.set-row .set-input { flex: 1; }
.set-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.set-input:focus {
    outline: none;
    border-color: var(--accent);
}
.set-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.set-tip {
    font-size: 12px;
    color: var(--text-dim);
    margin: 8px 0 0;
    line-height: 1.6;
}
.set-field { margin-bottom: 12px; }

/* ========== API 配置向导（借鉴秒达设计）========== */
.set-wizard { max-width: 500px; }

/* ① 为什么需要配置 */
.wizard-why {
    display: flex;
    gap: 12px;
    background: rgba(255, 164, 92, 0.08);
    border: 1px solid rgba(255, 164, 92, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}
.wiz-badge {
    flex-shrink: 0;
    width: 24px; height: 24px;
    background: var(--accent-2);
    color: #1a0a00;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.wizard-why h4 { margin: 2px 0 4px; font-size: 14px; }
.wizard-why p {
    margin: 0; font-size: 12.5px; line-height: 1.6;
    color: var(--text-dim);
}

/* 向导区块 */
.wizard-section { margin-bottom: 22px; }
.wizard-section h4 {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.wiz-num {
    background: rgba(255, 107, 53, 0.15); color: var(--accent-2);
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ② 平台选择卡片 */
.platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.plat-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.plat-card:hover { border-color: rgba(255, 164, 92, 0.3); transform: translateY(-1px); }
.plat-card.active {
    border-color: var(--accent-2);
    background: rgba(255, 164, 92, 0.08);
    box-shadow: 0 0 16px rgba(255, 164, 92, 0.15);
}
.plat-icon { font-size: 28px; margin-bottom: 6px; display: block; }
.plat-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.plat-tag { font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; }
.plat-price { font-size: 11.5px; color: var(--green); }

/* ③ 手风琴步骤 */
.step-accordion { display: flex; flex-direction: column; gap: 6px; }
.step-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.step-item.open { border-color: var(--accent-2); }
.step-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer; user-select: none;
}
.step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 107, 53, 0.15); color: var(--accent-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step-title { flex: 1; font-size: 13.5px; color: var(--text); }
.step-arrow { color: var(--text-dim); font-size: 10px; transition: transform 0.25s; }
.step-body {
    padding: 0 14px 12px 50px;
    font-size: 12.5px; line-height: 1.7; color: var(--text-dim);
}
.step-body a { color: var(--accent); text-decoration: none; }
.step-body a:hover { text-decoration: underline; }
.slide-enter-active, .slide-leave-active { transition: all 0.25s ease; overflow: hidden; }
.slide-enter-from, .slide-leave-to { opacity: 0; max-height: 0; }

/* ④ 表单与按钮 */
.set-field .req { color: #ff5a44; }
.set-field .opt { color: var(--text-dim); font-size: 11.5px; }
.set-btns { display: flex; gap: 10px; margin-top: 8px; }
.btn-save {
    flex: 1; padding: 11px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 14px; font-family: inherit; cursor: pointer;
}
.btn-save:hover { border-color: var(--accent); }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-test {
    flex: 1; padding: 11px; background: linear-gradient(135deg, #ff7b35, #ff5a18);
    border: none; border-radius: var(--radius-sm);
    color: white; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.btn-test:hover { opacity: 0.9; }
.btn-test:disabled { opacity: 0.5; cursor: not-allowed; }

.test-result {
    margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
}
.test-result.ok { background: rgba(74, 222, 128, 0.1); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.2); }
.test-result.err { background: rgba(255, 82, 82, 0.1); color: #ff5252; border: 1px solid rgba(255, 82, 82, 0.2); }

/* 安全提示 */
.set-security {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12px; color: var(--text-dim);
    padding: 10px 14px;
    background: rgba(100, 200, 120, 0.06);
    border: 1px solid rgba(100, 200, 120, 0.15);
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

/* 激活区 */
.wiz-activate { margin-bottom: 20px; }
.set-flabel {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.btn-primary.sm {
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
}

/* ========== 响应式 ========== */
/* 移动端复制栏默认隐藏，仅在手机媒体查询内显示 */
.mobile-copy-bar { display: none; }

@media (max-width: 768px) {
    .hero-title { font-size: 24px; }
    .hero-sub { font-size: 14px; }
    .entry-grid { grid-template-columns: 1fr; gap: 16px; }
    .entry-card { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; }
    .prompt-breakdown { grid-template-columns: 1fr; }
    .ba-grid { grid-template-columns: 1fr; }
    .container { padding: 20px 14px 40px; }
    .module-title { font-size: 20px; }
    .direction-card { padding: 18px 16px; }
    .dir-title { font-size: 16px; }
    .dir-head { flex-wrap: wrap; gap: 8px; }
    .feeling-badge, .dir-emotion { font-size: 11px; padding: 3px 8px; }
    .sb-label { width: 70px; font-size: 10px; }
    .sb-num { font-size: 11px; }
    .scores-overall { font-size: 22px; }
    .prompt-result { padding: 20px 16px; }
    .prompt-head h3 { font-size: 18px; }
    .input-panel { padding: 20px 16px; }
    .btn-primary { width: 100%; padding: 14px; }
    /* 手机端：生成方向 + 提示词优化 改为上下堆叠，按钮各占满宽 */
    .action-row { flex-direction: column; }
    .action-row .btn-primary, .action-row .btn-secondary { width: 100%; }
    .brand-analysis { padding: 20px 16px; }
    .pattern-tags { gap: 6px; }
    .pattern-tag { font-size: 11px; padding: 3px 10px; }
    .topbar-inner { padding: 10px 14px; }
    .logo-text { font-size: 14px; }
    .loading-box p { font-size: 14px; padding: 0 20px; }
    .toast { bottom: 20px; left: 16px; right: 16px; transform: none; }
    .toast-enter-from, .toast-leave-to { transform: translateY(10px); }

    /* 移动端固定复制栏：始终可见，点一下复制Prompt去即梦 */
    .mobile-copy-bar {
        display: block;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 50;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(11, 11, 20, 0.92);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
    }
    .btn-copy-fixed {
        width: 100%;
        height: 50px;
        border: none;
        border-radius: var(--radius-sm);
        background: var(--accent-grad);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    /* 结果页底部留白，避免内容被固定复制栏遮挡 */
    .result-area { padding-bottom: 88px; }
    /* 触摸目标放大，便于手指点击 */
    .btn-copy { min-height: 44px; width: 100%; justify-content: center; }
    .btn-primary { min-height: 44px; }
    .input, .btn-ghost, .btn-select { min-height: 44px; }
    /* 续写幕移动端适配 */
    .act-meta { grid-template-columns: 1fr; }
    .prompt-actions { flex-direction: column; }
    .btn-continue { min-height: 44px; width: 100%; }
}

/* ========== 版本角标 ========== */
.beta-badge {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 9999;
    background: rgba(20, 22, 34, 0.82);
    color: #ffb088;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 53, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    user-select: none;
}
