/* DreamFace Avatar Video 2.0 终极方案Demo - 匹配原生UI风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0f14;
    --bg-secondary: #121a22;
    --bg-card: #1a252e;
    --bg-sheet: #1a2a35;
    --accent: #2dd4bf;
    --accent-dark: #14b8a6;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255,255,255,0.1);
    --pro-color: #2dd4bf;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0f14 0%, #0f1419 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    gap: 30px;
}

.demo-container { display: flex; gap: 30px; align-items: flex-start; }

/* 手机框架 */
.phone-frame {
    width: 375px; height: 812px;
    background: #000; border-radius: 45px;
    padding: 12px; position: relative;
    box-shadow: 0 25px 80px -12px rgba(45, 212, 191, 0.2), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
}

.phone-notch {
    position: absolute; top: 12px; left: 50%;
    transform: translateX(-50%);
    width: 150px; height: 30px;
    background: #000; border-radius: 0 0 20px 20px;
    z-index: 100;
}

/* 屏幕 */
.screen {
    width: 100%; height: 100%;
    background: var(--bg-primary);
    border-radius: 35px; overflow-y: auto; overflow-x: hidden;
    display: none; position: relative;
}
.screen.active { display: block; }
.screen::-webkit-scrollbar { display: none; }

/* 状态栏 */
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px 10px; color: #fff; font-size: 14px; font-weight: 500; }
.status-icons { font-size: 12px; opacity: 0.8; }

/* 通用头部 */
.df-header { display: flex; justify-content: space-between; align-items: center; padding: 5px 20px 15px; }
.df-header h1 { color: var(--text-primary); font-size: 17px; font-weight: 600; }
.back-btn { width: 36px; height: 36px; background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; }
.confirm-btn { background: var(--accent); color: #000; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }

/* 通用元素 */
.section-title { color: var(--text-primary); font-size: 18px; font-weight: 600; margin-bottom: 16px; padding: 0 20px; }
.section-title-sm { color: var(--text-primary); font-size: 14px; font-weight: 600; }
.arrow { color: var(--text-muted); font-size: 20px; }
.new-badge { background: var(--accent); color: #000; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 6px; }
.pro-tag { background: var(--accent); color: #000; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.hidden { display: none !important; }

/* 模式选择页 */
.mode-content { padding: 10px 0; }
.mode-cards { padding: 0 20px; margin-bottom: 30px; }
.mode-card { display: flex; align-items: center; gap: 16px; background: var(--bg-card); border-radius: 16px; padding: 20px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; }
.mode-card:hover { background: var(--bg-sheet); }
.mode-icon { font-size: 32px; }
.mode-info { flex: 1; }
.mode-name { color: var(--text-primary); font-size: 16px; font-weight: 600; display: block; margin-bottom: 4px; }
.mode-desc { color: var(--text-secondary); font-size: 13px; }

/* 模板区 */
.template-section { padding: 0 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.view-all { color: var(--accent); font-size: 13px; cursor: pointer; }
.template-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.template-scroll::-webkit-scrollbar { display: none; }
.template-card { min-width: 80px; background: var(--bg-card); border-radius: 12px; padding: 16px 12px; text-align: center; cursor: pointer; position: relative; }
.template-card:hover { background: var(--bg-sheet); }
.template-card.pro { opacity: 0.8; }
.template-icon { font-size: 28px; margin-bottom: 8px; }
.template-card span { color: var(--text-secondary); font-size: 11px; display: block; }
.template-card .pro-tag { position: absolute; top: 6px; right: 6px; font-size: 8px; padding: 2px 4px; }

/* 主创作页 */
.main-content { padding: 0 20px; }
.preview-area { display: flex; justify-content: center; margin-bottom: 16px; }
.avatar-preview-box { width: 200px; height: 260px; background: linear-gradient(180deg, var(--bg-sheet) 0%, var(--bg-card) 100%); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; border: 2px solid var(--accent); }
.avatar-placeholder { font-size: 80px; opacity: 0.8; }
.edit-label { position: absolute; bottom: 16px; color: var(--text-secondary); font-size: 12px; }

/* 照片选择器 */
.photo-selector { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.photo-item { width: 52px; height: 52px; background: var(--bg-card); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; border: 2px solid transparent; }
.photo-item.add { border: 2px dashed var(--text-muted); }
.photo-item.add span { color: var(--text-muted); font-size: 24px; }
.photo-item.selected { border-color: var(--accent); }
.photo-thumb { font-size: 28px; }

/* 功能选项行 */
.option-row { display: flex; align-items: center; gap: 12px; background: var(--bg-card); padding: 16px; border-radius: 12px; margin-bottom: 10px; cursor: pointer; }
.option-row:hover { background: var(--bg-sheet); }
.option-icon { font-size: 20px; }
.option-label { flex: 1; color: var(--text-primary); font-size: 15px; }
.option-value { color: var(--text-secondary); font-size: 13px; }
.advanced-link { color: var(--text-muted); font-size: 13px; text-align: center; padding: 12px; cursor: pointer; display: block; background: none; border: none; width: 100%; }

/* 合成按钮 */
.generate-btn { width: 100%; background: var(--accent); border: none; color: #000; padding: 16px; border-radius: 30px; font-size: 17px; font-weight: 600; cursor: pointer; margin-top: 20px; }

/* 底部面板 */
.bottom-sheet { position: absolute; bottom: -100%; left: 0; right: 0; background: var(--bg-sheet); border-radius: 24px 24px 0 0; transition: bottom 0.3s ease; z-index: 200; max-height: 80%; overflow-y: auto; }
.bottom-sheet.active { bottom: 0; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.sheet-header span { color: var(--text-primary); font-size: 16px; font-weight: 600; }
.sheet-header-simple { padding: 20px; text-align: center; }
.sheet-header-simple span { color: var(--text-primary); font-size: 16px; font-weight: 600; }
.close-sheet { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.sheet-content { padding: 16px 20px 40px; }
.sheet-hint { color: var(--text-secondary); font-size: 12px; margin-bottom: 16px; }

/* 脚本选项 */
.script-section { margin-bottom: 16px; }
.script-label { color: var(--text-secondary); font-size: 12px; display: block; margin-bottom: 8px; }
.script-option { display: flex; align-items: center; gap: 12px; background: var(--bg-card); padding: 16px; border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.opt-icon { width: 32px; height: 32px; background: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #000; font-weight: 700; }
.script-option span { color: var(--text-primary); font-size: 14px; }

/* 输入模式切换 */
.input-mode-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.mode-tab { flex: 1; background: var(--bg-card); border: none; color: var(--text-secondary); padding: 12px; border-radius: 10px; font-size: 13px; cursor: pointer; }
.mode-tab.active { background: var(--accent); color: #000; font-weight: 600; }

/* 脚本输入 */
.script-textarea { width: 100%; height: 120px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--text-primary); font-size: 14px; resize: none; font-family: inherit; }
.script-textarea:focus { outline: none; border-color: var(--accent); }
.script-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.char-count { color: var(--text-muted); font-size: 12px; }
.upgrade-limit { color: var(--accent); font-size: 12px; cursor: pointer; }
.script-tools { display: flex; gap: 12px; margin-top: 16px; }
.tool-btn { background: var(--bg-card); border: none; color: var(--text-primary); padding: 10px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; }

/* 情感选择 */
.emotion-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.emotion-label { color: var(--text-primary); font-size: 14px; display: block; margin-bottom: 12px; }
.emotion-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.emotion-btn { background: var(--bg-card); border: 2px solid transparent; color: var(--text-secondary); padding: 8px 12px; border-radius: 20px; font-size: 12px; cursor: pointer; }
.emotion-btn.selected { border-color: var(--accent); color: var(--text-primary); background: rgba(45, 212, 191, 0.1); }
.emotion-slider { display: flex; align-items: center; gap: 12px; }
.emotion-slider span { color: var(--text-secondary); font-size: 12px; }
.emotion-slider input[type="range"] { flex: 1; appearance: none; height: 4px; background: var(--bg-card); border-radius: 2px; }
.emotion-slider input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; background: var(--accent); border-radius: 50%; cursor: pointer; }

/* 导演模式 */
.director-field { margin-bottom: 16px; }
.director-field label { color: var(--text-primary); font-size: 13px; display: block; margin-bottom: 8px; }
.director-field .hint { color: var(--text-muted); font-size: 11px; }
.director-field textarea { width: 100%; height: 70px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; color: var(--text-primary); font-size: 13px; resize: none; font-family: inherit; }
.ai-parse-preview { background: rgba(45, 212, 191, 0.1); border: 1px solid rgba(45, 212, 191, 0.3); border-radius: 12px; padding: 12px; }
.parse-title { color: var(--text-primary); font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.parse-items { display: flex; flex-direction: column; gap: 4px; }
.parse-item { color: var(--text-secondary); font-size: 12px; }

/* 声音选择 */
.voice-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 8px; }
.voice-tabs::-webkit-scrollbar { display: none; }
.voice-tab { background: var(--bg-card); border: none; color: var(--text-secondary); padding: 8px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.voice-tab.active { background: var(--accent); color: #000; font-weight: 600; }
.voice-tab.highlight { border: 1px solid var(--accent); color: var(--accent); }
.voice-list { max-height: 300px; overflow-y: auto; }
.voice-section-title { color: var(--text-primary); font-size: 13px; font-weight: 600; padding: 12px 0 8px; display: flex; align-items: center; gap: 8px; }
.voice-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
.voice-item:hover { background: var(--bg-card); }
.voice-item.selected { background: rgba(45, 212, 191, 0.15); border: 1px solid var(--accent); }
.voice-item.pro { opacity: 0.9; }
.voice-lang { width: 36px; height: 36px; background: var(--bg-card); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.voice-info { flex: 1; }
.voice-name { color: var(--text-primary); font-size: 14px; display: block; }
.voice-gender, .voice-desc { color: var(--text-muted); font-size: 11px; }
.play-voice { width: 32px; height: 32px; background: var(--accent); border: none; border-radius: 50%; color: #000; font-size: 12px; cursor: pointer; }

/* 动画效果 */
.effect-item { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; margin-bottom: 12px; cursor: pointer; background: var(--bg-card); border: 2px solid transparent; }
.effect-item.selected { border-color: var(--accent); }
.effect-thumb { width: 50px; height: 60px; background: var(--bg-secondary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.effect-info { flex: 1; }
.effect-name { color: var(--text-primary); font-size: 14px; display: block; margin-bottom: 4px; }
.effect-desc { color: var(--text-muted); font-size: 11px; }

/* 高级设置 */
.setting-section { margin-bottom: 20px; }
.setting-label { color: var(--text-primary); font-size: 14px; display: block; margin-bottom: 12px; }
.resolution-options { display: flex; gap: 12px; }
.res-btn { flex: 1; background: var(--bg-card); border: 2px solid transparent; color: var(--text-primary); padding: 14px; border-radius: 12px; font-size: 14px; cursor: pointer; }
.res-btn.selected { border-color: var(--accent); background: rgba(45, 212, 191, 0.1); }
.res-btn.pro { opacity: 0.7; }

/* 多人创作页 */
.multi-content { padding: 0 20px; }
.multi-options { margin-bottom: 24px; }
.multi-option { display: flex; align-items: center; gap: 16px; background: var(--bg-card); padding: 20px; border-radius: 16px; margin-bottom: 12px; cursor: pointer; }
.multi-icon { font-size: 28px; }
.multi-info { flex: 1; }
.multi-name { color: var(--text-primary); font-size: 15px; font-weight: 600; display: block; margin-bottom: 4px; }
.multi-desc { color: var(--text-secondary); font-size: 12px; }
.multi-preview { background: var(--bg-card); border-radius: 16px; padding: 20px; text-align: center; }
.multi-preview h4 { color: var(--text-primary); font-size: 14px; margin-bottom: 16px; }
.preview-demo { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.demo-avatar { width: 60px; height: 60px; background: var(--bg-sheet); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.preview-hint { color: var(--text-muted); font-size: 12px; }

/* 多人上传 */
.multi-upload-content { padding: 0 20px; }
.upload-hint { color: var(--text-secondary); font-size: 13px; text-align: center; margin-bottom: 20px; }
.multi-photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.multi-photo-item { aspect-ratio: 1; background: var(--bg-card); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.multi-photo-item.filled .photo-thumb { font-size: 48px; }
.multi-photo-item .photo-label { color: var(--text-secondary); font-size: 12px; margin-top: 8px; }
.multi-photo-item .remove-photo { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: rgba(0,0,0,0.5); border: none; border-radius: 50%; color: #fff; font-size: 12px; cursor: pointer; }
.multi-photo-item.add { border: 2px dashed var(--text-muted); background: transparent; }
.add-icon { color: var(--text-muted); font-size: 32px; }
.add-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.role-names { display: flex; gap: 12px; margin-bottom: 24px; }
.role-input { flex: 1; }
.role-input label { color: var(--text-secondary); font-size: 12px; display: block; margin-bottom: 6px; }
.role-input input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: var(--text-primary); font-size: 14px; }
.interaction-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.interact-btn { background: var(--bg-card); border: 2px solid transparent; color: var(--text-primary); padding: 10px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; }
.interact-btn.selected { border-color: var(--accent); background: rgba(45, 212, 191, 0.1); }
.interact-btn.pro { opacity: 0.7; }

/* 多人剧本 */
.script-edit-content { padding: 0 20px 40px; }
.role-assignment { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; }
.role-card { text-align: center; }
.role-avatar { width: 56px; height: 56px; background: var(--bg-card); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 8px; }
.role-name { color: var(--text-primary); font-size: 14px; font-weight: 600; display: block; }
.role-voice { color: var(--text-muted); font-size: 11px; }
.script-guide { margin-bottom: 12px; }
.script-guide p { color: var(--text-secondary); font-size: 12px; }
.multi-script-textarea { width: 100%; height: 180px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--text-primary); font-size: 13px; resize: none; font-family: inherit; line-height: 1.6; }
.script-buttons { display: flex; gap: 8px; margin: 12px 0; }
.script-tool-btn { flex: 1; background: var(--bg-card); border: none; color: var(--text-primary); padding: 10px; border-radius: 8px; font-size: 11px; cursor: pointer; }
.interaction-settings { margin-bottom: 20px; }
.interaction-settings label { display: block; color: var(--text-secondary); font-size: 13px; margin-bottom: 8px; }
.interaction-settings input[type="checkbox"] { margin-right: 8px; accent-color: var(--accent); }
.action-buttons { display: flex; gap: 12px; }
.preview-btn { flex: 1; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); padding: 14px; border-radius: 12px; font-size: 14px; cursor: pointer; }

/* 邀请合拍 */
.invite-content { padding: 0 20px; }
.my-avatar-section, .invite-section, .share-invite { margin-bottom: 24px; }
.my-avatar-section h4, .invite-section h4, .share-invite h4 { color: var(--text-primary); font-size: 14px; margin-bottom: 12px; }
.invite-avatar-box { background: var(--bg-card); border-radius: 16px; padding: 24px; text-align: center; }
.invite-avatar { font-size: 64px; margin-bottom: 8px; }
.avatar-status { color: var(--accent); font-size: 13px; }
.invite-buttons { display: flex; flex-direction: column; gap: 10px; }
.invite-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); padding: 16px; border-radius: 12px; font-size: 14px; cursor: pointer; text-align: center; }
.share-icons { display: flex; gap: 16px; flex-wrap: wrap; }
.share-icon-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.share-icon-item span:first-child { width: 44px; height: 44px; background: var(--bg-card); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.share-icon-item span:last-child { color: var(--text-muted); font-size: 10px; }
.invite-hint { background: rgba(45, 212, 191, 0.1); border-radius: 12px; padding: 14px; color: var(--accent); font-size: 13px; text-align: center; }

/* 生成中页 */
.generating-content { display: flex; flex-direction: column; align-items: center; padding: 30px 20px; min-height: 100%; }
.generating-title { color: var(--text-primary); font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.generating-preview-box { width: 100%; max-width: 280px; aspect-ratio: 9/16; background: linear-gradient(180deg, rgba(45, 212, 191, 0.2) 0%, var(--bg-card) 100%); border-radius: 20px; display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 16px; }
.gen-avatar { font-size: 80px; opacity: 0.6; }
.gen-progress-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gen-percent { color: var(--text-primary); font-size: 48px; font-weight: 700; }
.gen-progress-bar { width: 100%; max-width: 280px; height: 4px; background: var(--bg-card); border-radius: 2px; margin-bottom: 24px; overflow: hidden; }
.gen-progress-fill { height: 100%; background: var(--accent); width: 5%; transition: width 0.3s; }
.gen-hint { color: var(--text-muted); font-size: 11px; text-align: center; padding: 0 20px; margin-bottom: 24px; line-height: 1.5; }
.gen-background-btn { background: var(--accent); border: none; color: #000; padding: 14px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* 结果页 */
.result-header { display: flex; align-items: center; justify-content: space-between; padding: 50px 16px 12px; }
.close-btn, .more-btn { width: 32px; height: 32px; background: transparent; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.result-title { flex: 1; color: var(--text-primary); font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.result-video-area { padding: 0 0 16px; }
.result-video { width: 100%; aspect-ratio: 9/16; max-height: 380px; background: linear-gradient(180deg, var(--bg-sheet) 0%, var(--bg-card) 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.result-avatar { font-size: 100px; opacity: 0.7; }
.watermark { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.5); font-size: 14px; text-align: center; }
.watermark span { font-size: 10px; opacity: 0.7; }

/* 效果微调 */
.tweak-section { padding: 12px 16px; background: var(--bg-secondary); margin: 0 16px 16px; border-radius: 16px; }
.tweak-section h4 { color: var(--text-primary); font-size: 13px; margin-bottom: 12px; }
.tweak-sliders { margin-bottom: 12px; }
.tweak-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11px; }
.tweak-row > span:first-child { color: var(--text-secondary); width: 50px; }
.tweak-label-left, .tweak-label-right { color: var(--text-muted); font-size: 10px; width: 40px; }
.tweak-label-right { text-align: right; }
.tweak-row input[type="range"] { flex: 1; appearance: none; height: 3px; background: var(--bg-card); border-radius: 2px; }
.tweak-row input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; cursor: pointer; }
.tweak-buttons { display: flex; gap: 10px; }
.tweak-apply { flex: 1; background: var(--accent); border: none; color: #000; padding: 10px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tweak-reset { background: var(--bg-card); border: none; color: var(--text-primary); padding: 10px 16px; border-radius: 8px; font-size: 12px; cursor: pointer; }

/* 结果操作栏 */
.result-actions { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.result-btn { background: var(--bg-card); border: none; color: var(--text-primary); padding: 12px 20px; border-radius: 8px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.result-btn.publish { background: #fff; color: #000; font-weight: 600; }
.result-btn.hd { opacity: 0.8; }

/* 分享面板 */
.share-panel { position: absolute; bottom: -100%; left: 0; right: 0; background: var(--bg-sheet); border-radius: 20px 20px 0 0; padding: 20px; transition: bottom 0.3s; z-index: 200; }
.share-panel.active { bottom: 0; }
.share-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.share-panel-header span { color: var(--text-primary); font-size: 15px; }
.share-panel-header button { background: none; border: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.share-item span:first-child { width: 48px; height: 48px; background: var(--bg-card); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.share-item span:last-child { color: var(--text-muted); font-size: 10px; }
.share-item.whatsapp span:first-child { background: #25d366; }
.share-item.instagram span:first-child { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-item.tiktok span:first-child { background: #000; }
.share-item.messenger span:first-child { background: #0084ff; }

/* 更多面板 */
.more-panel { position: absolute; bottom: -100%; left: 0; right: 0; background: var(--bg-sheet); border-radius: 20px 20px 0 0; padding: 8px 0 30px; z-index: 200; }
.more-panel.active { bottom: 0; }
.more-option { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; }
.more-option span { color: var(--text-primary); font-size: 14px; flex: 1; }
.more-option.delete span { color: #ef4444; }
.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider { position: absolute; inset: 0; background: var(--bg-card); border-radius: 24px; cursor: pointer; }
.toggle .slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider:before { transform: translateX(20px); }

/* 弹窗 */
.modal { position: absolute; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 300; border-radius: 35px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-sheet); border-radius: 20px; padding: 32px 24px; text-align: center; width: 280px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.modal-icon { font-size: 56px; margin-bottom: 16px; }
.modal-reward { margin-bottom: 20px; }
.reward-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.reward-title { color: var(--text-primary); font-size: 18px; font-weight: 600; display: block; margin-bottom: 4px; }
.reward-desc { color: var(--text-muted); font-size: 13px; }
.modal-btn { width: 100%; background: var(--accent); border: none; color: #000; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.box-animation { margin-bottom: 20px; }
.box-open { font-size: 60px; display: block; animation: shake 0.5s ease-in-out; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.reward-reveal { margin-bottom: 24px; }
.reward-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.reward-name { color: #fff; font-size: 18px; font-weight: 700; display: block; margin-bottom: 4px; }
.reward-desc { color: #94a3b8; font-size: 13px; }
.modal-btn { width: 100%; background: linear-gradient(135deg, #10b981, #059669); border: none; color: #fff; padding: 14px; border-radius: 14px; font-size: 16px; font-weight: 600; cursor: pointer; }

/* Demo导航 */
.demo-nav { background: rgba(10, 15, 20, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 24px; max-width: 320px; }
.demo-nav h3 { color: #fff; margin-bottom: 8px; font-size: 16px; }
.demo-subtitle { color: var(--text-muted); font-size: 12px; margin-bottom: 20px; }
.nav-section { margin-bottom: 20px; }
.nav-label { color: var(--accent); font-size: 11px; font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 10px; }
.nav-section button { display: block; width: 100%; background: var(--bg-card); border: 1px solid var(--border); color: #fff; padding: 12px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; text-align: left; margin-bottom: 8px; transition: all 0.2s; }
.nav-section button:hover { background: var(--bg-sheet); border-color: var(--accent); }
.nav-info { border-top: 1px solid var(--border); padding-top: 16px; }
.nav-info h4 { color: #fff; font-size: 13px; margin-bottom: 12px; }
.nav-info ul { list-style: none; }
.nav-info li { color: var(--text-secondary); font-size: 11px; padding: 5px 0; padding-left: 16px; position: relative; line-height: 1.4; }
.nav-info li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.nav-info li b { color: var(--accent); }
.demo-nav { background: rgba(255,255,255,0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 24px; max-width: 300px; }
.demo-nav h3 { color: #fff; margin-bottom: 16px; font-size: 16px; }
.nav-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.nav-buttons button { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 12px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; text-align: left; transition: all 0.2s; }
.nav-buttons button:hover { background: rgba(16, 185, 129, 0.2); border-color: #10b981; }
.demo-info, .demo-target { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 16px; margin-top: 16px; }
.demo-info h4, .demo-target h4 { color: #fff; font-size: 13px; margin-bottom: 10px; }
.demo-info ul, .demo-target ul { list-style: none; }
.demo-info li, .demo-target li { color: #94a3b8; font-size: 11px; padding: 5px 0; padding-left: 16px; position: relative; line-height: 1.4; }
.demo-info li::before { content: '•'; position: absolute; left: 0; color: #10b981; }
.demo-target li::before { content: '📈'; position: absolute; left: 0; }
.demo-info li strong, .demo-target li strong { color: #10b981; }

/* ========== 新增功能样式 ========== */

/* 换声音区域 */
.voice-change-section { margin: 0 16px 16px; background: var(--bg-secondary); border-radius: 16px; padding: 16px; }
.voice-change-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.voice-change-header h4 { color: var(--text-primary); font-size: 13px; margin: 0; }
.voice-change-hint { color: var(--text-muted); font-size: 10px; }
.voice-change-options { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.voice-change-options::-webkit-scrollbar { display: none; }
.voice-quick-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 56px; padding: 10px 8px; background: var(--bg-card); border-radius: 12px; cursor: pointer; border: 2px solid transparent; position: relative; }
.voice-quick-item:hover { background: var(--bg-sheet); }
.voice-quick-item.selected { border-color: var(--accent); background: rgba(45, 212, 191, 0.1); }
.voice-quick-item.pro { opacity: 0.85; }
.voice-quick-item .pro-tag { position: absolute; top: -4px; right: -4px; font-size: 8px; padding: 2px 4px; }
.vq-icon { font-size: 20px; }
.vq-name { color: var(--text-secondary); font-size: 10px; white-space: nowrap; }

/* 动画等级区域 */
.animation-level-section { margin: 0 16px 16px; background: var(--bg-secondary); border-radius: 16px; padding: 16px; }
.animation-level-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.animation-level-header h4 { color: var(--text-primary); font-size: 13px; margin: 0; }
.animation-hint { color: var(--text-muted); font-size: 10px; }
.animation-compare { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.compare-box { flex: 1; text-align: center; }
.compare-preview-box { background: var(--bg-card); border-radius: 12px; padding: 20px 10px; position: relative; margin-bottom: 8px; }
.compare-preview-box.pro-glow { border: 1px solid var(--accent); box-shadow: 0 0 20px rgba(45, 212, 191, 0.2); }
.compare-avatar { font-size: 32px; opacity: 0.7; }
.compare-quality { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,0.5); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 9px; }
.compare-quality.hd { background: var(--accent); color: #000; }
.no-watermark { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 9px; }
.compare-arrow-box { color: var(--text-muted); font-size: 18px; }
.compare-label-text { color: var(--text-primary); font-size: 11px; display: block; margin-bottom: 2px; }
.compare-desc { color: var(--text-muted); font-size: 9px; }
.animation-level-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.level-btn { flex: 1; background: var(--bg-card); border: 2px solid transparent; color: var(--text-primary); padding: 10px 8px; border-radius: 10px; font-size: 11px; cursor: pointer; }
.level-btn.active { border-color: var(--accent); background: rgba(45, 212, 191, 0.1); }
.level-btn.pro-level { opacity: 0.8; }
.pro-upgrade-hint { display: flex; align-items: center; justify-content: space-between; background: rgba(45, 212, 191, 0.1); border-radius: 10px; padding: 10px 12px; }
.pro-upgrade-hint span { color: var(--accent); font-size: 11px; }
.upgrade-now-btn { background: var(--accent); border: none; color: #000; padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; }

/* 多角色关系定义 */
.relationship-section { background: rgba(45, 212, 191, 0.05); border: 1px solid rgba(45, 212, 191, 0.2); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.relationship-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.relationship-header h4 { color: var(--text-primary); font-size: 14px; margin: 0; }
.relationship-hint { color: var(--text-muted); font-size: 10px; }
.relationship-textarea { width: 100%; height: 80px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; color: var(--text-primary); font-size: 13px; resize: none; font-family: inherit; }
.relationship-textarea:focus { outline: none; border-color: var(--accent); }
.relationship-presets { margin: 12px 0; }
.preset-label { color: var(--text-secondary); font-size: 11px; display: block; margin-bottom: 8px; }
.preset-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); padding: 6px 10px; border-radius: 16px; font-size: 11px; cursor: pointer; }
.preset-btn:hover { border-color: var(--accent); background: rgba(45, 212, 191, 0.1); }
.ai-scene-preview { background: rgba(45, 212, 191, 0.1); border: 1px solid rgba(45, 212, 191, 0.3); border-radius: 10px; padding: 12px; margin-top: 12px; }
.scene-preview-title { color: var(--text-primary); font-size: 12px; font-weight: 600; display: block; margin-bottom: 8px; }
.scene-preview-items { display: flex; flex-direction: column; gap: 4px; }
.scene-item { color: var(--text-secondary); font-size: 11px; }

/* 创作者排行榜 */
.leaderboard-section { padding: 20px 20px 0; }
.leaderboard-list { display: flex; flex-direction: column; gap: 10px; }
.leaderboard-item { display: flex; align-items: center; gap: 10px; background: var(--bg-card); padding: 12px; border-radius: 12px; cursor: pointer; }
.leaderboard-item:hover { background: var(--bg-sheet); }
.rank { width: 20px; height: 20px; background: var(--bg-sheet); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb700); color: #000; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #b87333); color: #fff; }
.creator-avatar { font-size: 28px; }
.creator-info { flex: 1; }
.creator-name { color: var(--text-primary); font-size: 13px; font-weight: 600; display: block; }
.creator-stats { color: var(--text-muted); font-size: 10px; }
.creator-work { position: relative; }
.work-thumb { width: 40px; height: 50px; background: var(--bg-sheet); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.work-tag { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; padding: 2px 4px; border-radius: 4px; font-size: 8px; }
.leaderboard-hint { margin-top: 12px; padding: 10px; background: rgba(45, 212, 191, 0.1); border-radius: 8px; color: var(--text-secondary); font-size: 11px; text-align: center; }

/* 弹窗增强 */
.modal-title { color: var(--text-primary); font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.modal-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.modal-desc b { color: var(--accent); }
.modal-btns { display: flex; flex-direction: column; gap: 8px; }
.modal-btn-secondary { width: 100%; background: transparent; border: 1px solid var(--border); color: var(--text-primary); padding: 12px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.pro-benefits { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; padding: 12px; background: rgba(45, 212, 191, 0.1); border-radius: 10px; }
.pro-benefits span { color: var(--accent); font-size: 12px; }

/* 创作者作品弹窗 */
.modal-large { width: 300px; padding: 20px; }
.creator-work-preview { margin-bottom: 16px; }
.work-video-box { width: 100%; aspect-ratio: 9/16; max-height: 200px; background: var(--bg-card); border-radius: 12px; display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 12px; }
.work-avatar-large { font-size: 48px; opacity: 0.6; }
.play-icon { position: absolute; width: 40px; height: 40px; background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.work-meta { text-align: left; }
.work-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.author-avatar { font-size: 20px; }
.author-name { color: var(--text-primary); font-size: 13px; font-weight: 600; }
.rank-badge { background: var(--accent); color: #000; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.work-title { color: var(--text-secondary); font-size: 12px; margin-bottom: 8px; }
.work-stats-row { display: flex; gap: 12px; }
.work-stats-row span { color: var(--text-muted); font-size: 11px; }
.work-actions-modal { margin-bottom: 16px; }
.action-use-template { width: 100%; background: var(--accent); border: none; color: #000; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.template-hint { color: var(--text-muted); font-size: 10px; text-align: center; margin-top: 6px; }
.template-customize { border-top: 1px solid var(--border); padding-top: 12px; }
.template-customize h4 { color: var(--text-primary); font-size: 12px; margin-bottom: 10px; }
.customize-options { display: flex; flex-wrap: wrap; gap: 6px; }
.customize-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 12px; border-radius: 8px; font-size: 11px; cursor: pointer; }
.customize-btn:hover { border-color: var(--accent); }

/* ========== 移动端 H5 适配 ========== */

/* 检测移动端 */
@media (max-width: 768px) {
    /* 隐藏桌面端布局，全屏展示手机原型 */
    body {
        background: var(--bg-primary);
        padding: 0;
        margin: 0;
    }
    
    .demo-container {
        flex-direction: column;
        padding: 0;
        gap: 0;
        min-height: 100vh;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    /* 隐藏右侧导航面板 */
    .demo-nav {
        display: none !important;
    }
    
    /* 手机框架全屏适配 */
    .phone-frame {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: var(--bg-primary);
    }
    
    /* 隐藏手机刘海（移动端本身就是手机） */
    .phone-notch {
        display: none;
    }
    
    /* 状态栏隐藏（用系统自带的） */
    .status-bar {
        display: none;
    }
    
    /* 调整内容区域顶部间距 */
    .screen {
        padding-top: env(safe-area-inset-top, 20px);
    }
    
    .df-header {
        padding-top: 10px;
    }
    
    /* 底部面板适配安全区域 */
    .bottom-panel {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    
    /* 模态框适配 */
    .modal-content {
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
    
    /* 触摸优化 */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .mode-card:active,
    .template-item:active,
    .voice-item:active,
    .action-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* 小屏幕进一步优化 */
@media (max-width: 390px) {
    .mode-cards {
        gap: 10px;
    }
    
    .mode-card {
        padding: 14px;
    }
    
    .template-grid {
        gap: 8px;
    }
    
    .section-title {
        font-size: 16px;
    }
}

/* ========== 移动端悬浮导航 ========== */

/* 悬浮按钮 - 默认隐藏，移动端显示 */
.mobile-fab {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 16px;
    padding: 10px 16px;
    background: rgba(10, 15, 20, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(45, 212, 191, 0.6);
    box-shadow: 0 0 15px rgba(45, 212, 191, 0.4), 0 0 30px rgba(45, 212, 191, 0.2);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-fab:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.6), 0 0 40px rgba(45, 212, 191, 0.3);
}

.mobile-fab.nav-open {
    background: rgba(45, 212, 191, 0.2);
    border-color: rgba(45, 212, 191, 0.8);
}

.fab-icon {
    font-size: 13px;
    color: rgba(45, 212, 191, 0.9);
    font-weight: 500;
}

/* 导航遮罩层 - 默认不可见不可交互 */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 导航面板 - 默认不可见不可交互 */
.mobile-nav-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    z-index: 10000;
    transform: translateY(100%);
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 80vh;
    overflow: hidden;
}

.mobile-nav-panel.show {
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
}

.mobile-nav-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-content {
    padding: 16px 20px 40px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-section {
    margin-bottom: 20px;
}

.mobile-nav-label {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.mobile-nav-section button {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.mobile-nav-section button:active {
    background: rgba(45, 212, 191, 0.2);
    border-color: var(--accent);
    transform: scale(0.98);
}

.mobile-nav-features {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(45, 212, 191, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
}

.mobile-nav-features li {
    color: #94a3b8;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-features li:last-child {
    border-bottom: none;
}

.mobile-nav-features li b {
    color: var(--accent);
}

/* 移动端显示悬浮按钮和导航 */
@media (max-width: 768px) {
    .mobile-fab {
        display: block;
    }
    
    /* 安全区域适配 */
    .mobile-nav-content {
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }
}
