/* 全局重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.85);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --gradient-start: #1a1a2e;
    --gradient-end: #16213e;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* 链接与按钮基础 */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-hover);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

/* ===== 头部导航 ===== */
header {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end), #0a0a23);
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(233, 69, 96, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(100, 100, 255, 0.1) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes bgShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(5%, 5%) rotate(5deg); }
}

nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav > div:first-child a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--accent), #ff8a5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.25rem 0;
    transition: color var(--transition);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

nav ul li a:hover {
    color: var(--text-primary);
}

nav ul li a:hover::after {
    width: 100%;
}

nav > div:last-child {
    display: flex;
    gap: 0.75rem;
}

nav > div:last-child button {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: background var(--transition), transform var(--transition);
}

nav > div:last-child button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* 头部主内容 */
header > div:last-child {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

header h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, var(--accent), #ff8a5c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

header p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

header div:last-child div {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

header div:last-child div a {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--transition);
    letter-spacing: 0.5px;
}

header div:last-child div a:first-child {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

header div:last-child div a:first-child:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
}

header div:last-child div a:last-child {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

header div:last-child div a:last-child:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: var(--accent);
}

/* ===== 主内容区通用 ===== */
main {
    position: relative;
    z-index: 1;
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: sectionIn 0.8s ease forwards;
}

@keyframes sectionIn {
    to { opacity: 1; transform: translateY(0); }
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }

h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== 关于我们 ===== */
#about p {
    max-width: 800px;
    margin: 0 auto 1.2rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    text-align: center;
    line-height: 1.8;
}

/* ===== 产品服务 ===== */
#products > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

#products article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

#products article:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.2);
}

#products article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

#products article p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 平台特色 ===== */
#features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

#features ul li {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    transition: all var(--transition);
    font-size: 1rem;
    color: var(--text-secondary);
}

#features ul li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.02);
    border-color: var(--accent);
}

#features ul li strong {
    color: var(--accent);
    font-weight: 600;
}

/* ===== APP下载 ===== */
#download {
    text-align: center;
}

#download p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

#download > div {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

#download > div a {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    background: linear-gradient(135deg, var(--accent), #ff6b81);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
    transition: all var(--transition);
}

#download > div a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
}

/* ===== 资源中心 ===== */
#resources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

#resources h2 {
    grid-column: 1 / -1;
}

#resources article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

#resources article:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(233, 69, 96, 0.15);
}

#resources article h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

#resources article p {
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1rem;
}

#resources article a {
    align-self: flex-start;
    font-weight: 600;
    color: var(--accent);
    position: relative;
}

#resources article a::after {
    content: ' →';
    transition: margin-left var(--transition);
}

#resources article a:hover::after {
    margin-left: 6px;
}

/* ===== 常见问题 ===== */
#faq > div {
    max-width: 800px;
    margin: 0 auto;
}

details {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 0.8rem;
    padding: 0.8rem 1.2rem;
    transition: all var(--transition);
    cursor: pointer;
}

details:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

details[open] {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.08);
}

summary {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    padding: 0.3rem 0;
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform var(--transition);
}

details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

details p {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 联系我们 ===== */
#contact address {
    font-style: normal;
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

#contact address p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#contact address p:last-child {
    margin-bottom: 0;
}

#contact > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== 页脚 ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
}

footer > div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
}

footer nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

footer nav a:hover {
    color: var(--accent);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    nav {
        padding: 0.8rem 1rem;
    }

    nav ul {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--glass-border);
    }

    nav ul li a {
        font-size: 0.9rem;
    }

    header > div:last-child {
        padding: 3rem 1.5rem;
    }

    section {
        padding: 3rem 1.2rem;
    }

    #products > div {
        grid-template-columns: 1fr;
    }

    #features ul {
        grid-template-columns: 1fr;
    }

    #resources {
        grid-template-columns: 1fr;
    }

    footer > div {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    nav > div:first-child a {
        font-size: 1.2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header div:last-child div a {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    #download > div a {
        padding: 0.7rem 1.8rem;
        font-size: 0.95rem;
    }
}

/* ===== 暗色模式（默认已暗，额外支持系统切换） ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f5fa;
        --bg-secondary: #e8e8f0;
        --bg-card: rgba(255, 255, 255, 0.85);
        --text-primary: #1a1a2e;
        --text-secondary: #555;
        --accent: #e94560;
        --accent-hover: #d63050;
        --gradient-start: #e8e8f0;
        --gradient-end: #dcdce6;
        --glass-bg: rgba(255, 255, 255, 0.7);
        --glass-border: rgba(0, 0, 0, 0.1);
        --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    header {
        background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end), #f0f0f8);
    }

    header h1 {
        background: linear-gradient(135deg, #1a1a2e, var(--accent), #ff8a5c);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    h2 {
        background: linear-gradient(135deg, #1a1a2e, var(--accent));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    #products article,
    #resources article,
    #contact address {
        background: var(--bg-card);
    }

    #features ul li {
        background: rgba(255, 255, 255, 0.6);
    }

    details {
        background: rgba(255, 255, 255, 0.6);
    }

    footer {
        background: var(--bg-secondary);
    }
}