:root {
    /* --- 默认深色系 (Dark Default) --- */
    --primary: #f472b6;
    --secondary: #a78bfa;
    --bg-body: #0f172a;
    /* 全局背景：深蓝黑 */
    --bg-section-alt: #1e293b;
    /* 下载区域背景：中深蓝 */
    --bg-card: #0f172a;
    /* 卡片背景：同全局，但通常会有投影区分 */
    --bg-nav: rgba(15, 23, 42, 0.9);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
    --grid-color: rgba(255, 255, 255, 0.05);

    --gradient-text: linear-gradient(135deg, #f472b6 0%, #c084fc 100%);
    --gradient-btn: linear-gradient(135deg, #ec4899, #8b5cf6);
}

/* --- 浅色模式 (Light Mode Optimized) --- */
body.light-theme {
    --primary: #ec4899;
    --secondary: #8b5cf6;
    --bg-body: #f5f7f9;
    /* 全局背景: 极浅灰色 */
    --bg-section-alt: #ffffff;
    /* 下载区域背景: 纯白 (层次 2) */
    --bg-card: #e2e8f0;
    /* 下载卡片背景: 浅灰色 (层次 3) */
    --bg-nav: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 15px 30px -5px rgba(148, 163, 184, 0.2);
    --grid-color: rgba(0, 0, 0, 0.06);
}

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

/* 辅助类：防止菜单展开时页面滚动 */
body.no-scroll {
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* ------------------------------------ */
/* --- 导航栏和汉堡菜单 (FIXED) --- */
/* ------------------------------------ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    transition: all 0.3s ease;
    /* 保持桌面端动画流畅 */
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    opacity: 0.8;
    transition: 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* 汉堡菜单基础样式 (桌面端隐藏) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 5px;
    z-index: 1001;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

/* 汉堡菜单激活状态动画 */
.hamburger.active div:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
}

.hamburger.active div:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ------------------------------------ */
/* --- 英雄区 (Hero) --- */
/* ------------------------------------ */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: 80px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    w: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* --- Hero Section 文本设计优化 --- */
.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--text-main);
}

.hero-title .text-h1-p2 {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 5px rgba(236, 72, 153, 0.4), 0 0 15px rgba(139, 92, 246, 0.4);
    font-size: 1.1em;
    display: block;
    margin-top: 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 按钮样式 --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--gradient-btn);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(236, 72, 153, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(236, 72, 153, 0.6);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    margin-left: 1rem;
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: var(--border-color);
}


/* --- 手机演示 --- */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-visual::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 40px;
    background: var(--primary);
    filter: blur(50px);
    opacity: 0.4;
    z-index: 1;
}

.phone-mockup {
    width: 340px;
    height: 680px;
    background: #0f172a;
    border-radius: 55px;
    border: 10px solid #334155;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
    overflow: hidden;
    /* 保持原有的动画定义，动画类已从 index.html 移除，由 main.js 控制或直接在 CSS 定义 */
    animation: phoneShake 0.5s ease-in-out infinite alternate;
    will-change: transform;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #000;
    border-radius: 20px;
    z-index: 20;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* POV 动画容器 */
.pov-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
}

/* 文本样式 (字号最大化) */
.pov-text {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 18rem;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    transform-origin: center;
    animation: textSuspended 0.5s ease-in-out infinite alternate;
    will-change: transform;
    transform: translateZ(0);
    transition: opacity 0.3s ease-in-out;
}

/* --- 动画关键帧：实现悬浮效果 --- */
@keyframes phoneShake {
    0% {
        transform: translateY(0) translateX(-40%) rotate(-2deg) translateZ(0);
    }

    100% {
        transform: translateY(0) translateX(40%) rotate(2deg) translateZ(0);
    }
}

@keyframes textSuspended {
    0% {
        transform: translateX(40%) rotate(2deg) translateZ(0);
    }

    100% {
        transform: translateX(-40%) rotate(-2deg) translateZ(0);
    }
}

/* --- 特效变体 (由JS切换) --- */
.fx-neon {
    color: transparent;
    -webkit-text-stroke: 6px #fff;
    text-shadow:
        0 0 10px #fff,
        0 0 25px #ec4899,
        0 0 50px #ec4899,
        0 0 100px #ec4899;
}

.fx-cyber {
    color: #0f0;
    text-shadow:
        2px 0 #fff, -2px 0 #fff,
        0 0 20px #0f0, 0 0 40px #0f0;
    letter-spacing: 5px;
}

.fx-fire {
    background: linear-gradient(to bottom, #fef08a 0%, #f97316 50%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* 修正: 添加描边，增强轮廓 */
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    filter: blur(0.5px);
    text-shadow: 0 -10px 20px rgba(249, 115, 22, 0.6);
}

.fx-rainbow {
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* 修正: 添加描边和阴影 */
    -webkit-text-stroke: 2px #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    animation: textSuspended 0.5s ease-in-out infinite alternate, rainbowBg 2s linear infinite;
}

@keyframes rainbowBg {
    0% {
        background-position: 0%;
    }

    100% {
        background-position: 200%;
    }
}

.fx-glitch {
    color: #f0f;
    /* 基础颜色：紫色/洋红色 */
    text-shadow:
        4px 0 #0ff,
        /* 青色偏移 */
        -4px 0 #ff0,
        /* 黄色偏移 */
        0 0 5px rgba(255, 255, 255, 0.8),
        0 0 10px #f0f;

    animation: textSuspended 0.5s ease-in-out infinite alternate, glitchShift 0.1s steps(2, start) infinite;
}

.fx-icicles {
    /* 渐变：顶部和底部使用更深的青色/蓝色，压缩白色区域 */
    background: linear-gradient(to top, #67e8f9 0%, #ffffff 70%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* 核心修正：描边颜色改为极浅的青色，并略微收缩 */
    -webkit-text-stroke: 1.8px #a5f3fc;

    /* 基础滤镜：强烈的蓝色光晕 */
    filter: drop-shadow(0 0 6px #0ea5e9);

    /* 修正：内部和冰刺阴影都使用更冷的青色调 */
    text-shadow:
        /* 内部浅青色光泽 */
        0 0 8px #a5f3fc,

        /* 冰刺：使用更深、更冷的青色 */
        0 -10px 4px #0e7490,
        2px -15px 6px #06b6d4;

    animation: textSuspended 0.5s ease-in-out infinite alternate, iceShimmer 2s ease-in-out infinite alternate;
}

@keyframes iceShimmer {
    0% {
        filter: drop-shadow(0 0 6px #0ea5e9);
    }

    /* 峰值使用更亮的蓝色，而不是纯白 */
    50% {
        filter: drop-shadow(0 0 10px #38bdf8);
    }

    100% {
        filter: drop-shadow(0 0 6px #0ea5e9);
    }
}

.fx-outline {
    color: transparent;
    -webkit-text-stroke: 4px var(--primary);
    /* 使用主题色描边 */
    text-shadow:
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 30px rgba(255, 255, 255, 0.4);
}

.fx-metallic {
    background: linear-gradient(to right,
            #a8a8a8 0%, #ffffff 20%, #888888 40%,
            #cccccc 60%, #a8a8a8 80%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px #333;
    /* 深色描边，增强立体感 */

    /* 轻微阴影模拟浮雕效果 */
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

.fx-vaporwave {
    background: linear-gradient(45deg, #ff00ff 0%, #00ffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* 粗糙的描边 */
    -webkit-text-stroke: 3px #fff;

    /* 制造 VHS 错位感 */
    text-shadow:
        -5px 5px 0 #f0f,
        /* 垂直和水平偏移的紫红色阴影 */
        5px -5px 0 #0ff;
    /* 垂直和水平偏移的青色阴影 */
}

.fx-burning-edge {
    /* 文字主体：使用火焰渐变 */
    background: linear-gradient(to bottom, #fef08a 10%, #f97316 60%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px #fff;
    /* 提供清晰的核心轮廓 */

    /* 核心：使用负 Y 偏移，将阴影推向文字上边缘 */
    text-shadow:
        0 -10px 10px #f97316,
        /* 底部火焰层 */
        0 -20px 20px #ef4444;
    /* 上方热气层 */

    filter: blur(0.5px) contrast(2.0);
    /* 增加热气模糊和对比度 */

    /* 核心动画：模拟火焰的闪烁和上升 */
    animation: textSuspended 0.5s ease-in-out infinite alternate, burningFlicker 1.0s ease-in-out infinite alternate;
}

@keyframes burningFlicker {
    0% {
        text-shadow:
            0 -10px 8px #f97316,
            0 -20px 18px #ef4444;
        filter: blur(0.4px);
    }

    50% {
        /* 峰值：火焰上升更高，亮度更大 */
        text-shadow:
            0 -12px 12px #ffff00,
            0 -25px 25px #dc2626;
        filter: blur(0.7px);
    }

    100% {
        text-shadow:
            0 -10px 8px #f97316,
            0 -20px 18px #ef4444;
        filter: blur(0.4px);
    }
}

/* 屏幕底部提示 */
.screen-hint {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    pointer-events: none;
}

/* --- 下载区域 (修正 Flexbox 兼容性和二维码样式) --- */
.section-alt {
    background: var(--bg-section-alt);
    padding: 100px 0;
    position: relative;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.download-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    justify-content: space-between;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.qr-area {
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-area #qrcode-container {
    display: block;
    width: 150px;
    height: 150px;
    line-height: 0;
}


.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-item i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

/* --- 简约居中页脚 --- */
.footer {
    background: var(--bg-body);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.2s;
    margin: 0 5px;
}

.footer-links a:hover {
    color: var(--primary);
}


/* --- 语言切换器样式 --- */
.lang-dropdown-container {
    position: relative;
    margin-left: 20px;
}

.lang-toggle-btn {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.lang-toggle-btn:hover {
    border-color: var(--primary);
}

.lang-dropdown-list {
    position: absolute;
    top: 100%;
    right: 0;
    list-style: none;
    background: var(--bg-nav);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 5px 0;
    min-width: 120px;
    z-index: 2000;
    display: none;
}

.lang-dropdown-list.active {
    display: block;
}

.lang-dropdown-list li {
    padding: 8px 15px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: background 0.2s;
}

.lang-dropdown-list li:hover {
    background: var(--border-color);
    color: var(--primary);
}


/* ------------------------------------ */
/* --- 响应式和移动端菜单修正 (FIXED) --- */
/* ------------------------------------ */
@media (max-width: 900px) {

    /* FIXED: 显示汉堡菜单 */
    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 20px;
    }

    .hero-visual {
        margin-top: 50px;
        transform: scale(0.9);
    }

    .download-box {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    /* FIXED: 菜单默认隐藏，点击后显示 */
    .nav-menu {
        position: fixed;
        top: 70px;
        /* 导航栏高度 */
        left: -100%;
        /* 默认藏在左侧 */
        flex-direction: column;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-nav);
        backdrop-filter: blur(12px);
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
        padding: 30px 20px;
        align-items: flex-start;
        /* 菜单项左对齐 */
        gap: 15px;
    }

    .nav-menu.active {
        left: 0;
    }

    .download-content {
        width: 100%;
        text-align: center;
    }

    .hero-desc {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* 确保菜单项是全宽的，并增大点击区域 */
    .nav-menu li {
        width: 100%;
        text-align: left;
    }

    .nav-menu li a {
        display: block;
        padding: 10px 0;
        font-size: 1.2rem;
    }

    /* 语言切换器在移动端 (在 nav-menu 内部) */
    .lang-dropdown-container {
        margin: 20px 0 0 0;
        /* 修正 margin */
        padding: 15px 0 0 0;
        text-align: left;
        /* FIXED: 移除 border-top，避免双重边框 */
        /* border-top: 1px solid var(--border-color); */
    }

    .lang-toggle-btn {
        width: 100%;
        text-align: left;
    }

    .lang-dropdown-list {
        /* 在左对齐的菜单中，下拉列表也应从左边展开 */
        right: auto;
        left: 0;
        transform: none;
    }
}

/* ------------------------------------ */
/* --- 阿拉伯语 RTL 布局修正 (保留) --- */
/* ------------------------------------ */

body.rtl-mode {
    direction: rtl;
    text-align: right;
}

body.rtl-mode .nav-container,
body.rtl-mode .hero-container {
    flex-direction: row-reverse;
}

body.rtl-mode .nav-menu {
    padding-right: 0;
}

body.rtl-mode .nav-menu li {
    margin-left: 2rem;
    margin-right: 0;
}

body.rtl-mode .hero-content {
    text-align: right;
}

body.rtl-mode .hero-btns a {
    flex-direction: row-reverse;
    gap: 10px;
}

body.rtl-mode .download-box {
    flex-direction: row-reverse;
}

body.rtl-mode .feature-grid {
    justify-content: flex-end;
}

body.rtl-mode .feature-item {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

body.rtl-mode .feature-item i {
    margin-left: 10px;
}

/* FIXED: RTL 模式下的移动端菜单修正 */
@media (max-width: 900px) {
    body.rtl-mode .nav-menu {
        left: auto;
        right: -100%;
        /* 藏在右侧 */
        transition: right 0.3s ease;
        align-items: flex-end;
        /* 菜单项右对齐 */
    }

    body.rtl-mode .nav-menu.active {
        right: 0;
    }

    body.rtl-mode .nav-menu li {
        text-align: right;
    }

    body.rtl-mode .lang-toggle-btn {
        text-align: right;
    }

    body.rtl-mode .lang-dropdown-list {
        left: auto;
        right: 0;
        transform: none;
    }
}