/* ==================== 性能优化 CSS ==================== */
:root {
    --bg-dark: #05070a;
    --navy-deep: #0a0e14;
    --gold: #d4af37;
    --gold-bright: #f1c40f;
    --cyan-glow: #00f2ff;
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --glass: rgba(15, 23, 42, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);

    /* 预计算常用值 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
}
/* ==================== 浅色主题 ==================== */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --navy-deep: #ffffff;
    --gold: #b8860b;
    --gold-bright: #d4a017;
    --cyan-glow: #0891b2;
    --text-main: #1e293b;
    --text-dim: #64748b;
    --glass: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(0, 0, 0, 0.1);
}

/* 主题切换按钮 */
.theme-toggle {
    background: var(--glass);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.1);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: inline;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: inline;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* 浅色主题适配 */
[data-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hero::before {
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
}

[data-theme="light"] .philo-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-section.inverse {
    background: #f1f5f9;
}

[data-theme="light"] .feature-section:not(.inverse) {
    background: #ffffff;
}

[data-theme="light"] .download-footer {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

[data-theme="light"] .bottom-bar {
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .download-modal-inner {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-close {
    color: var(--text-dim);
}

[data-theme="light"] .modal-close:hover {
    color: var(--gold);
}

[data-theme="light"] .download-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .download-card:hover {
    background: #ffffff;
    border-color: var(--gold);
}

[data-theme="light"] .faq-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .faq-question {
    color: var(--text-main);
}

[data-theme="light"] .contact-item {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-primary-glow {
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.3);
}

[data-theme="light"] .gold-text {
    color: var(--gold);
}



/* ==================== 本地字体定义 ==================== */
@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* 字体回退优化 */
body.landing-page {
    font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    /* 减少重绘 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.landing-page {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* 文本渲染优化 */
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 滚动动画样式 ==================== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* 延迟动画 */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }

/* ==================== 导航栏 ==================== */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 10px 30px;
    z-index: 1000;
    /* GPU 加速 */
    will-change: width, border-radius, top;
    contain: layout style;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-logo {
    width: 24px;
    height: 24px;
    /* 防止图片抖动 */
    display: block;
}

.logo-text {
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--cyan-glow);
}

.btn-download-sm {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: #000;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
    will-change: transform;
}

.btn-download-sm:hover {
    transform: scale(1.02);
}

/* ==================== Hero Section ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
    /* 隔离重绘范围 */
    contain: layout;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.6;
}

/* 支持 WebP 背景图片 */
@supports (background-image: url('assets/hero_bg.webp')) {
    .hero-bg {
        background-image: url('assets/hero_bg.webp');
        background-size: cover;
        background-position: center;
        opacity: 0.6;
    }

    .hero-bg-fallback {
        display: none;
    }
}

.hero-content {
    z-index: 10;
    max-width: 900px;
}

h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.gold-text {
    background: linear-gradient(to right, var(--gold), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reveal-subtext, .hero-subtext {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--text-dim);
    margin-bottom: 40px;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn-primary-glow {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: white;
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    will-change: transform, box-shadow;
}

.btn-primary-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(0, 210, 255, 0.6);
}

.btn-outline {
    border: 1px solid var(--border-glass);
    color: white;
    padding: 16px 40px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hero-mockup-container {
    width: 100%;
    perspective: 1000px;
}

.hero-mockup {
    width: 80%;
    max-width: 800px;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    transform: rotateX(10deg);
    /* GPU 加速 */
    will-change: transform;
    backface-visibility: hidden;
}

/* ==================== 哲理板块 ==================== */
.philosophy {
    padding: 100px 0;
    background: var(--navy-deep);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.philo-card {
    text-align: center;
    padding: 30px;
    /* 隔离重绘 */
    contain: layout style;
}

.philo-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.philo-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.philo-card p {
    color: var(--text-dim);
}

/* ==================== 特性板块 ==================== */
.feature-section {
    padding: 120px 0;
}

.feature-section.inverse {
    background: #000;
}

.flex-row, .flex-row-reverse {
    display: flex;
    align-items: center;
    gap: 80px;
}

.flex-row-reverse {
    flex-direction: row-reverse;
}

.content-side {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

.badge {
    display: inline-block;
    background: rgba(0, 242, 255, 0.1);
    color: var(--cyan-glow);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 25px;
    line-height: 1.2;
}

.image-side {
    flex: 1.2;
    min-width: 0;
}

.side-mockup {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: block;
}

.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: var(--text-dim);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold);
}

/* ==================== 安全背书板块 ==================== */
.security-trust {
    padding: 100px 0;
    background: var(--navy-deep);
    text-align: center;
}

.trust-desc {
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 30px;
}

.trust-image-container {
    max-width: 600px;
    margin: 0 auto;
}

.trust-mockup {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

/* ==================== 下载引导 ==================== */
.download-footer {
    padding: 150px 0;
    background: radial-gradient(circle at center, #1a2333 0%, #05070a 100%);
    text-align: center;
}

.download-footer p {
    color: var(--text-dim);
}

.btn-giant {
    background: white;
    color: black;
    padding: 25px 60px;
    border-radius: 100px;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 40px 0;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255,255,255,0.2);
    transition: transform var(--transition-normal), background var(--transition-normal);
    will-change: transform;
}

.btn-giant:hover {
    transform: scale(1.03);
    background: var(--gold-bright);
}

.stats-footer {
    font-size: 1rem;
    margin-top: 20px;
}

.disclaimer {
    margin-top: 30px;
    font-size: 0.9rem;
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    /* 性能优化 */
    contain: strict;
}

.modal-overlay[aria-hidden="true"] {
    pointer-events: none;
}

.download-modal-inner {
    background: #0f172a;
    border: 1px solid var(--border-glass);
    padding: 50px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: white;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.download-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
    will-change: transform;
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--cyan-glow);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: block;
}

.card-text strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.card-text span {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* 免责声明弹窗 */
.disclaimer-modal {
    text-align: left;
}

.disclaimer-modal h3 {
    text-align: center;
    margin-bottom: 30px;
}

.disclaimer-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.disclaimer-list li {
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 3px solid var(--gold);
    color: var(--text-dim);
    font-size: 0.95rem;
}

.disclaimer-list li strong {
    color: white;
    display: block;
    margin-bottom: 5px;
}

/* 联系我们弹窗 */
.contact-modal {
    max-width: 800px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 35px 0;
    text-align: left;
}

.contact-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 25px;
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 15px;
    will-change: transform;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--cyan-glow);
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 2rem;
}

.contact-info strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.contact-info p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.contact-link {
    color: var(--cyan-glow);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.contact-link:hover {
    border-bottom-color: var(--cyan-glow);
}

.contact-qrcode-container {
    margin-top: 10px;
    background: white;
    padding: 10px;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.contact-qrcode {
    width: 120px;
    height: 120px;
    display: block;
}

/* ==================== FAQ 常见问题 ==================== */
.faq-section {
    padding: 100px 0;
    background: #000;
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 10px;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 20px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--cyan-glow);
}

.faq-icon {
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 300;
    transition: transform var(--transition-normal);
}

.faq-question.active {
    color: var(--cyan-glow);
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 10px;
}

.faq-answer p {
    color: var(--text-dim);
    padding-bottom: 20px;
    font-size: 0.95rem;
    margin-top: 10px;
}

.faq-answer p strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ==================== 底部栏 ==================== */
.bottom-bar {
    background: var(--navy-deep);
    padding: 30px 0;
    border-top: 1px solid var(--border-glass);
}

.bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.social-links a:hover {
    color: var(--cyan-glow);
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1024px) {
    .flex-row, .flex-row-reverse {
        flex-direction: column;
        gap: 50px;
    }

    .content-side, .image-side {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .glass-nav {
        width: 95%;
        padding: 10px 20px;
        top: 10px;
    }

    .nav-links a {
        display: none;
    }

    .btn-download-sm {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .hero-mockup {
        width: 95%;
        transform: rotateX(5deg);
    }

    .feature-section {
        padding: 80px 0;
    }

    .download-footer {
        padding: 100px 0;
    }

    .btn-giant {
        padding: 18px 40px;
        font-size: 1.2rem;
    }

    .download-modal-inner {
        padding: 30px 20px;
        margin: 20px;
    }

    .bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 0.9rem;
    }

    .philo-icon {
        font-size: 2rem;
    }

    .philo-card h3 {
        font-size: 1.2rem;
    }
}

/* ==================== 减少动画（用户偏好） ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}
