/* ========== 基础变量 & 重置 ========== */
:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --bg: #fafbff;
    --surface: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 24px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.1);
    --nav-h: 64px;
    --max-w: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ========== 导航 ========== */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226,232,240,.6);
    transition: box-shadow .3s;
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.06); }

.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.logo-icon { font-size: 22px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ========== 英雄区 ========== */
#hero {
    position: relative; overflow: hidden;
    padding: calc(var(--nav-h) + 80px) 24px 100px;
    text-align: center;
    min-height: 92vh;
    display: flex; align-items: center; justify-content: center;
}

.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,.12), transparent),
        radial-gradient(ellipse 50% 50% at 80% 30%, rgba(14,165,233,.08), transparent),
        radial-gradient(ellipse 40% 40% at 20% 60%, rgba(236,72,153,.06), transparent);
}

.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.hero-badge {
    display: inline-block; padding: 6px 16px;
    background: rgba(99,102,241,.1); color: var(--primary);
    font-size: 13px; font-weight: 600; border-radius: 100px;
    margin-bottom: 28px;
}

#hero h1 {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 800; line-height: 1.15; letter-spacing: -.02em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #0ea5e9, #ec4899);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 17px; color: var(--text-secondary); line-height: 1.8;
    max-width: 560px; margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 56px; }

.hero-stats {
    display: flex; justify-content: center; gap: 48px;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; transition: all .25s;
}
.btn-primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 2px 12px rgba(79,70,229,.25);
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(79,70,229,.3); }
.btn-outline {
    border: 1.5px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-secondary {
    background: var(--bg); border: 1.5px solid var(--border); color: var(--text);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ========== 通用区块 ========== */
section { padding: 96px 0; }
section:nth-child(even) { background: var(--surface); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block; padding: 5px 14px; border-radius: 100px;
    background: rgba(99,102,241,.08); color: var(--primary);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 16px;
}
.section-header h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.section-header p { font-size: 16px; color: var(--text-secondary); }

/* ========== 功能卡片 ========== */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
    padding: 32px 28px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: all .3s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ========== 截图预览 ========== */
.screenshots-showcase { max-width: 900px; margin: 0 auto; }
.screenshot-placeholder {
    border-radius: var(--radius); border: 2px dashed var(--border);
    background: var(--surface); padding: 80px 40px; text-align: center;
}
.placeholder-inner p { font-size: 16px; color: var(--text-muted); margin-top: 16px; }
.placeholder-inner span { font-size: 13px; color: var(--text-muted); opacity: .7; display: block; margin-top: 8px; }
.placeholder-inner code {
    background: rgba(99,102,241,.08); color: var(--primary);
    padding: 2px 8px; border-radius: 5px; font-size: 12px;
}

/* ========== 轮播 ========== */
.carousel {
    position: relative; display: none;
    border-radius: var(--radius); overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow-lg);
}
.carousel.active { display: block; }
.carousel-track {
    display: flex; transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.carousel-track img {
    width: 100%; flex-shrink: 0;
    display: block; object-fit: contain;
    cursor: zoom-in;
}
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.85); color: #1e293b;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: all .2s; z-index: 2; border: none; cursor: pointer;
    opacity: 0;
}
.carousel:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.carousel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.4); border: none; cursor: pointer;
    transition: all .25s; padding: 0;
}
.carousel-dot.active {
    background: #fff; width: 24px; border-radius: 4px;
}

/* ========== 下载中心 ========== */
.download-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px;
    align-items: start;
}
.download-card {
    padding: 32px 28px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    text-align: center; transition: all .3s;
}
.download-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.download-main { border: 2px solid rgba(99,102,241,.25); position: relative; overflow: hidden; }
.download-main::before {
    content: '推荐'; position: absolute; top: 16px; right: -28px;
    background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 36px; transform: rotate(45deg);
}

.download-icon-wrap {
    width: 68px; height: 68px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.main-dl { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; }
.wechat-dl { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.sunflower-dl { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }

.download-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.dl-version { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.dl-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.dl-size { font-size: 12px; color: var(--text-muted); display: block; margin-top: 10px; }
.btn-download { width: 100%; justify-content: center; }

/* ========== 教程 ========== */
.tutorials-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.tutorial-card {
    border-radius: var(--radius); overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    transition: all .3s; cursor: pointer;
}
.tutorial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.tutorial-thumb {
    position: relative; padding-top: 56.25%; background: #0f172a;
    overflow: hidden;
}
.tutorial-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tutorial-thumb .play-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.3); opacity: 0; transition: opacity .3s;
}
.tutorial-card:hover .play-icon { opacity: 1; }
.play-icon svg { width: 48px; height: 48px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }

.tutorial-info { padding: 16px 20px; }
.tutorial-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.tutorial-info p { font-size: 13px; color: var(--text-muted); }
.tutorial-badge {
    display: inline-block; padding: 2px 8px; border-radius: 5px;
    font-size: 11px; font-weight: 600; margin-bottom: 6px;
}
.badge-video { background: rgba(239,68,68,.1); color: #ef4444; }
.badge-image { background: rgba(14,165,233,.1); color: #0ea5e9; }

.tutorials-empty {
    text-align: center; padding: 60px 20px;
    border: 2px dashed var(--border); border-radius: var(--radius);
    background: var(--surface);
}
.tutorials-empty p { font-size: 16px; color: var(--text-muted); margin-top: 16px; }
.tutorials-empty span { font-size: 13px; color: var(--text-muted); opacity: .7; display: block; margin-top: 6px; }

/* ========== 联系我们 ========== */
#contact { padding: 80px 0 96px; }
.contact-card {
    display: flex; align-items: center; justify-content: space-between; gap: 40px;
    padding: 48px 56px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; box-shadow: 0 8px 30px rgba(79,70,229,.25);
}
.contact-left h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.contact-left p { font-size: 15px; opacity: .85; }

.contact-right { display: flex; flex-direction: column; gap: 14px; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .9; }

/* ========== 页脚 ========== */
footer {
    background: #0f172a; color: rgba(255,255,255,.5);
    padding: 32px 0;
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: rgba(255,255,255,.8); }
.footer-copy { font-size: 13px; }

/* ========== 视频弹窗 ========== */
.video-modal {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.85);
    display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.video-modal.active { display: flex; }
.video-modal-inner {
    position: relative; width: 100%; max-width: 900px;
    border-radius: var(--radius-sm); overflow: hidden; background: #000;
}
.video-modal-inner video { width: 100%; display: block; }
.video-modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
    color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s;
}
.video-modal-close:hover { background: rgba(255,255,255,.3); }

/* ========== 图片弹窗 ========== */
.image-modal {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.85);
    display: none; align-items: center; justify-content: center;
    padding: 24px; cursor: zoom-out;
}
.image-modal.active { display: flex; }
.image-modal img {
    max-width: 95vw; max-height: 90vh;
    border-radius: var(--radius-sm); object-fit: contain;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .download-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .tutorials-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-card { flex-direction: column; text-align: center; padding: 36px 28px; }
    .contact-right { align-items: center; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: var(--nav-h); left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        padding: 16px 24px; gap: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
    }
    .nav-toggle { display: flex; }

    .features-grid, .tutorials-grid { grid-template-columns: 1fr; }

    #hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 64px; min-height: 80vh; }
    #hero h1 { font-size: 32px; }
    .hero-desc { font-size: 15px; }
    .hero-stats { gap: 28px; }
    .stat-num { font-size: 22px; }

    section { padding: 64px 0; }
    .section-header { margin-bottom: 36px; }
    .section-header h2 { font-size: 24px; }

    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .6s ease both; }
