/* 数联科技 AI舞蹈生成平台 - Demo 样式 */

:root {
    --bg-primary: #0a0f14;
    --bg-secondary: #0f1419;
    --bg-card: #151c24;
    --bg-sheet: #1e2833;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #f97316;
    --accent-light: #fb923c;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(249, 115, 22, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #0a0f14 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.demo-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
}

/* 手机框架 */
.phone-frame {
    width: 375px;
    height: 812px;
    background: var(--bg-primary);
    border-radius: 40px;
    border: 3px solid #2a2a3e;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #000;
    border-radius: 0 0 20px 20px;
    z-index: 100;
}

/* 页面切换 */
.screen { display: none; height: 100%; overflow-y: auto; }
.screen.active { display: flex; flex-direction: column; }

/* 状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 40px 24px 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* App头部 */
.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.app-logo { font-size: 28px; }
.app-header h1 { font-size: 20px; font-weight: 700; color: var(--text-primary); }

/* 页面头部 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 16px;
}

.back-btn {
    width: 36px; height: 36px;
    background: var(--bg-card);
    border: none; border-radius: 10px;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page-header h2 { font-size: 17px; font-weight: 600; color: var(--text-primary); }
.header-action { color: var(--accent); font-size: 14px; cursor: pointer; }

/* 首页内容 */
.home-content { flex: 1; padding: 0 20px; overflow-y: auto; }

.upload-section { margin-bottom: 24px; }

.upload-box {
    background: linear-gradient(135deg, rgba(249,115,22,0.1) 0%, rgba(249,115,22,0.05) 100%);
    border: 2px dashed var(--border-accent);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover { border-color: var(--accent); background: rgba(249,115,22,0.15); }

.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-text { display: block; color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.upload-hint { display: block; color: var(--text-muted); font-size: 12px; }

/* 模板网格 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title { color: var(--text-primary); font-size: 15px; font-weight: 600; }
.view-all { color: var(--text-muted); font-size: 12px; cursor: pointer; }

.template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.template-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.template-item:hover { background: var(--bg-sheet); }
.template-icon { font-size: 28px; margin-bottom: 6px; }
.template-item span { display: block; color: var(--text-secondary); font-size: 11px; }

/* 最近列表 */
.recent-list { display: flex; flex-direction: column; gap: 10px; }

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 12px;
    border-radius: 12px;
}

.recent-thumb {
    width: 44px; height: 44px;
    background: var(--bg-sheet);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.recent-info { flex: 1; }
.recent-title { display: block; color: var(--text-primary); font-size: 14px; font-weight: 500; }
.recent-time { display: block; color: var(--text-muted); font-size: 11px; }
.recent-status { font-size: 11px; padding: 4px 8px; border-radius: 6px; }
.recent-status.done { background: rgba(34,197,94,0.2); color: #22c55e; }

/* 底部导航 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 12px 20px 28px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
}

.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 20px; }

/* 上传页面 */
.upload-content { flex: 1; padding: 20px; }

.music-upload-area { margin-bottom: 24px; }

.upload-placeholder {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
}

.upload-placeholder:hover { border-color: var(--accent); }
.upload-icon-large { font-size: 64px; margin-bottom: 16px; }
.upload-placeholder span { display: block; color: var(--text-secondary); margin-bottom: 4px; }
.upload-formats { color: var(--text-muted); font-size: 12px; }

.music-preview {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
}

.music-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.music-icon { font-size: 32px; }
.music-name { display: block; color: var(--text-primary); font-size: 15px; font-weight: 600; }
.music-meta { display: block; color: var(--text-muted); font-size: 12px; }

.music-waveform {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.waveform-bars {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 40px;
}

.waveform-bars span {
    width: 4px;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.waveform-bars span:nth-child(1) { height: 20px; animation-delay: 0s; }
.waveform-bars span:nth-child(2) { height: 30px; animation-delay: 0.1s; }
.waveform-bars span:nth-child(3) { height: 25px; animation-delay: 0.2s; }
.waveform-bars span:nth-child(4) { height: 35px; animation-delay: 0.3s; }
.waveform-bars span:nth-child(5) { height: 20px; animation-delay: 0.4s; }
.waveform-bars span:nth-child(6) { height: 40px; animation-delay: 0.5s; }
.waveform-bars span:nth-child(7) { height: 30px; animation-delay: 0.6s; }
.waveform-bars span:nth-child(8) { height: 25px; animation-delay: 0.7s; }
.waveform-bars span:nth-child(9) { height: 35px; animation-delay: 0.8s; }
.waveform-bars span:nth-child(10) { height: 20px; animation-delay: 0.9s; }
.waveform-bars span:nth-child(11) { height: 30px; animation-delay: 0.1s; }
.waveform-bars span:nth-child(12) { height: 40px; animation-delay: 0.2s; }
.waveform-bars span:nth-child(13) { height: 25px; animation-delay: 0.3s; }
.waveform-bars span:nth-child(14) { height: 35px; animation-delay: 0.4s; }
.waveform-bars span:nth-child(15) { height: 20px; animation-delay: 0.5s; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.beat-analysis {
    display: flex;
    justify-content: space-around;
}

.beat-item { text-align: center; }
.beat-value { display: block; color: var(--accent); font-size: 20px; font-weight: 700; }
.beat-label { display: block; color: var(--text-muted); font-size: 11px; }

/* 按钮 */
.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316, #fb923c);
    border: none;
    color: #000;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.secondary-btn {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.hidden { display: none !important; }

/* 配置页面 */
.config-content { flex: 1; padding: 0 20px 20px; overflow-y: auto; }

.config-section { margin-bottom: 24px; }
.config-label { display: block; color: var(--text-primary); font-size: 14px; font-weight: 600; margin-bottom: 12px; }

.config-textarea {
    width: 100%;
    height: 80px;
    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;
}

.config-textarea:focus { outline: none; border-color: var(--accent); }

.style-options { display: flex; flex-wrap: wrap; gap: 8px; }

.style-item {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.style-item.active { background: rgba(249,115,22,0.2); border-color: var(--accent); color: var(--accent); }

.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.character-item {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.character-item.active { border-color: var(--accent); background: rgba(249,115,22,0.1); }
.character-item.pro { opacity: 0.7; }
.char-avatar { font-size: 28px; margin-bottom: 4px; }
.character-item span { display: block; color: var(--text-secondary); font-size: 10px; }
.pro-badge { position: absolute; top: 4px; right: 4px; background: var(--accent); color: #000; font-size: 8px; padding: 2px 4px; border-radius: 4px; }

.scene-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.scene-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
}

.scene-item.active { border-color: var(--accent); background: rgba(249,115,22,0.1); }
.scene-icon { font-size: 20px; }
.scene-item span { color: var(--text-secondary); font-size: 13px; }

.output-options { background: var(--bg-card); border-radius: 12px; padding: 16px; }
.output-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.output-row:last-child { margin-bottom: 0; }
.output-row span { color: var(--text-secondary); font-size: 13px; }

.output-select {
    background: var(--bg-sheet);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 12px;
}

.format-options { display: flex; gap: 16px; }
.format-options label { color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; gap: 6px; }

.generate-btn { margin-top: 20px; }

/* 生成中页面 */
.generating-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.generating-animation { position: relative; margin-bottom: 32px; }
.dance-emoji { font-size: 80px; animation: dance 1s ease-in-out infinite; }
.pulse-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.generating-title { color: var(--text-primary); font-size: 20px; margin-bottom: 24px; }

.progress-container { width: 100%; max-width: 280px; margin-bottom: 32px; }
.progress-bar { height: 8px; background: var(--bg-card); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #f97316, #fb923c); border-radius: 4px; width: 0%; transition: width 0.3s; }
.progress-text { display: block; text-align: center; color: var(--accent); font-size: 14px; font-weight: 600; }

.generating-steps { width: 100%; max-width: 240px; margin-bottom: 32px; }

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.step-item.done { color: #22c55e; }
.step-item.active { color: var(--accent); }
.step-icon { font-size: 14px; }

.generating-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(249,115,22,0.1);
    padding: 12px 16px;
    border-radius: 12px;
}

.tip-icon { font-size: 16px; }
.generating-tips span { color: var(--text-secondary); font-size: 13px; }

/* 结果页 */
.result-content { flex: 1; padding: 0 20px 20px; overflow-y: auto; }

.video-preview { margin-bottom: 20px; }

.video-placeholder {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.video-avatar { font-size: 64px; opacity: 0.5; }
.play-button {
    position: absolute;
    width: 56px; height: 56px;
    background: rgba(249,115,22,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    cursor: pointer;
}

.video-title { display: block; color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.video-meta { display: block; color: var(--text-muted); font-size: 12px; }

.result-stats { display: flex; gap: 12px; margin-bottom: 24px; }

.stat-card {
    flex: 1;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.stat-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.stat-value { display: block; color: var(--accent); font-size: 18px; font-weight: 700; }
.stat-label { display: block; color: var(--text-muted); font-size: 10px; }

.export-section { margin-bottom: 24px; }
.export-section h3 { color: var(--text-primary); font-size: 15px; margin-bottom: 12px; }

.export-list { display: flex; flex-direction: column; gap: 10px; }

.export-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 14px;
    border-radius: 12px;
}

.export-icon { font-size: 24px; }
.export-info { flex: 1; }
.export-name { display: block; color: var(--text-primary); font-size: 14px; }
.export-size { display: block; color: var(--text-muted); font-size: 11px; }

.export-btn {
    background: var(--accent);
    border: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.action-buttons { display: flex; gap: 12px; }
.action-buttons .primary-btn { flex: 1; }

/* 右侧导航 */
.demo-nav {
    background: rgba(15,20,25,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 300px;
}

.demo-nav h3 { color: var(--text-primary); font-size: 16px; margin-bottom: 8px; }
.demo-subtitle { color: var(--text-muted); font-size: 12px; margin-bottom: 20px; }

.nav-section { margin-bottom: 20px; }
.nav-label { display: block; color: var(--accent); font-size: 11px; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }

.nav-section button {
    display: block;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.nav-section button:hover { background: var(--bg-sheet); border-color: var(--accent); }

.feature-list, .metric-list { list-style: none; }
.feature-list li, .metric-list li {
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 0;
}

.feature-list li strong, .metric-list li strong { color: var(--accent); }

/* 移动端适配 */
@media (max-width: 768px) {
    body { padding: 0; }
    .demo-container { flex-direction: column; padding: 0; gap: 0; }
    .demo-nav { display: none !important; }
    .phone-frame { width: 100%; max-width: 100%; height: 100vh; border-radius: 0; border: none; }
    .phone-notch { display: none; }
    .status-bar { display: none; }
    .screen { padding-top: env(safe-area-inset-top, 20px); }
}

/* 移动端悬浮导航 */
.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(249, 115, 22, 0.6);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
    cursor: pointer;
    z-index: 9998;
    backdrop-filter: blur(10px);
}

.fab-icon { font-size: 13px; color: rgba(249, 115, 22, 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;
}

.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;
    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;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-header h3 { color: var(--text-primary); font-size: 18px; }

.mobile-nav-close {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.1);
    border: none; border-radius: 50%;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
}

.mobile-nav-content { padding: 16px 20px 40px; max-height: calc(80vh - 80px); overflow-y: auto; }

.mobile-nav-section { margin-bottom: 20px; }
.mobile-nav-label { display: block; color: var(--accent); font-size: 11px; font-weight: 600; margin-bottom: 10px; }

.mobile-nav-section button {
    display: block;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 8px;
}

.mobile-nav-features {
    list-style: none;
    background: rgba(249,115,22,0.1);
    border-radius: 12px;
    padding: 12px 16px;
}

.mobile-nav-features li {
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-features li:last-child { border-bottom: none; }
.mobile-nav-features li strong { color: var(--accent); }

@media (max-width: 768px) {
    .mobile-fab { display: block; }
}
