/* 梧桐AI 全局样式 - 深色科技风 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a10;
    --bg2: #0f0f1a;
    --primary: #7c5cfc;
    --primary-light: #a78bfa;
    --text: #e8e0f0;
    --text2: #9080a8;
    --text3: #605070;
    --gradient: linear-gradient(135deg, #7c5cfc, #4f46e5);
    --card-bg: rgba(255,255,255,0.03);
    --border: rgba(124,92,252,0.1);
}

body {
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景网格 */
.bg-grid {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(124,92,252,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,92,252,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}

.bg-glow {
    position: fixed; top: -200px; left: 50%;
    transform: translateX(-50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(124,92,252,0.08) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* 导航 */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10,10,16,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo span { -webkit-text-fill-color: initial; }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: 14px; }

.container { position: relative; z-index: 1; }

/* Hero - 关键修复：内容可滚动 */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
    min-height: auto !important;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 20px;
    background: rgba(124,92,252,0.1);
    border: 1px solid rgba(124,92,252,0.2);
    font-size: 12px; color: var(--primary-light);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(28px, 7vw, 56px);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #7c5cfc, #c084fc, #818cf8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 14px; color: var(--text2);
    max-width: 400px; line-height: 1.6;
    margin-bottom: 24px;
}

.btn-primary {
    padding: 12px 28px; border-radius: 12px;
    background: var(--gradient); border: none;
    color: white; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s;
    text-decoration: none; display: inline-block;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124,92,252,0.3);
}

.btn-secondary {
    padding: 8px 20px; border-radius: 10px;
    background: transparent; border: 1px solid rgba(124,92,252,0.3);
    color: var(--text); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none; display: inline-block; text-align: center;
}
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary-light); }

.hero-stats {
    display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
    margin-top: 28px; padding-top: 20px;
    border-top: 1px solid rgba(124,92,252,0.08);
}
.hero-stats .stat { text-align: center; }
.hero-stats .num {
    font-size: 22px; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats .label { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* Section */
.section { padding: 40px 16px; max-width: 600px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 24px; }
.section-title h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.section-title p { color: var(--text2); font-size: 13px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.step { text-align: center; padding: 16px 8px; }
.step .step-icon { font-size: 28px; margin-bottom: 8px; }
.step .num-label { font-size: 10px; color: var(--primary-light); font-weight: 700; margin-bottom: 6px; letter-spacing: 1px; }
.step h4 { font-size: 14px; margin-bottom: 4px; }
.step p { font-size: 12px; color: var(--text3); line-height: 1.4; }

/* Footer */
.footer { padding: 24px 16px; text-align: center; border-top: 1px solid var(--border); color: var(--text3); font-size: 12px; }

/* ===== 创作页 ===== */
.create-layout {
    max-width: 100%;
    padding: 80px 12px 20px;
    min-height: 100dvh;
}

.input-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

.form-input {
    width: 100%; padding: 12px 14px; border-radius: 10px;
    border: 1px solid rgba(124,92,252,0.15);
    background: rgba(255,255,255,0.03);
    color: var(--text); font-size: 15px; outline: none;
}
.form-input:focus { border-color: var(--primary); }

.template-select, .duration-select {
    display: flex; gap: 6px; flex-wrap: wrap;
}

.tmpl-btn, .dur-btn {
    padding: 7px 14px; border-radius: 8px;
    border: 1px solid rgba(124,92,252,0.12);
    background: rgba(255,255,255,0.02);
    color: var(--text2); font-size: 12px; cursor: pointer;
}
.tmpl-btn.active, .dur-btn.active {
    background: rgba(124,92,252,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* 结果区 */
.result-area {
    min-height: 200px;
    display: flex; align-items: center; justify-content: center;
}

.empty-state { text-align: center; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; color: var(--text2); }

/* Loading */
.loading-state { text-align: center; }
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(124,92,252,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { font-size: 14px; color: var(--text2); margin-bottom: 12px; }

.progress-bar {
    width: 200px; height: 4px;
    background: rgba(124,92,252,0.1);
    border-radius: 4px; overflow: hidden;
    margin: 0 auto;
}
.progress-fill { height: 100%; width: 0%; background: var(--gradient); border-radius: 4px; transition: width 0.5s ease; }

/* 视频结果 */
.result-state { width: 100%; max-width: 400px; margin: 0 auto; }
.result-state video { width: 100%; border-radius: 12px; }
.result-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: center; }

/* 后台管理（桌面保留宽布局） */
@media (min-width: 769px) {
    .create-layout { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 380px 1fr; gap: 24px; padding: 100px 20px 40px; }
    .hero { padding: 120px 20px 60px; min-height: 80vh !important; }
    .hero p { font-size: 16px; max-width: 520px; }
    .hero-stats { gap: 40px; }
    .hero-stats .num { font-size: 28px; }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .section { padding: 60px 20px; max-width: 900px; }
    .nav { padding: 14px 32px; }
}

/* 修复点击穿透 - 确保所有按钮和链接在最顶层 */
.btn-primary, .btn-secondary, .nav a, .nav-links a, .tmpl-btn, .dur-btn, .form-input {
    position: relative;
    z-index: 10;
}
.hero-actions, .nav, .input-card {
    position: relative;
    z-index: 10;
}
