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

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --accent-1: #f7b731;
    --accent-2: #e94560;
    --accent-3: #0f3460;
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
    --gradient-card: linear-gradient(145deg, rgba(247, 183, 49, 0.08), rgba(233, 69, 96, 0.05));
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(247, 183, 49, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
    --nav-height: 70px;
}

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

body {
    font-family: var(--font-sans);
    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-1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e0a62e;
}

/* ===== 通用 ===== */
a {
    color: var(--accent-1);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #ffd166;
}

img, svg {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.2;
}

section {
    padding: 80px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ===== 头部导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: var(--nav-height);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

nav > a:first-child {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}
nav > a:first-child span {
    font-size: 1.8rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

nav ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    transition: var(--transition);
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-1);
    transition: var(--transition);
}
nav ul li a:hover {
    color: var(--text-primary);
}
nav ul li a:hover::after {
    width: 100%;
}

nav button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
nav button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-1);
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--gradient-hero);
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
}
#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(247, 183, 49, 0.08), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(233, 69, 96, 0.06), transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(2%, 3%) scale(1.1); }
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-1), #ff6b6b, var(--accent-1));
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 6s linear infinite;
    margin-bottom: 16px;
}
@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 32px;
}

#hero a[href*="download"],
#hero a[href*="register"] {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    margin: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
#hero a[href*="download"] {
    background: linear-gradient(135deg, var(--accent-1), #e0a62e);
    color: #1a1a2e;
    box-shadow: 0 4px 20px rgba(247, 183, 49, 0.3);
}
#hero a[href*="download"]:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(247, 183, 49, 0.5);
}
#hero a[href*="register"] {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
#hero a[href*="register"]:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-3px);
}

/* 轮播指示 */
#hero > div:last-of-type {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    flex-wrap: wrap;
    justify-content: center;
}
#hero > div:last-of-type div {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: float 4s ease-in-out infinite;
}
#hero > div:last-of-type div:nth-child(2) { animation-delay: 0.5s; }
#hero > div:last-of-type div:nth-child(3) { animation-delay: 1s; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== 通用标题 ===== */
section h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    margin: 12px auto 0;
    border-radius: 10px;
}

section > p:first-of-type {
    text-align: center;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.05rem;
}

/* ===== 卡片网格通用 ===== */
#products > div,
#services > div,
#features > div,
#advantages > div,
#resources > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-card);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}
article:hover {
    transform: translateY(-6px);
    border-color: rgba(247, 183, 49, 0.2);
    box-shadow: var(--shadow-glow);
}
article:hover::before {
    opacity: 1;
}

article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-1);
    position: relative;
    z-index: 1;
}
article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
article a {
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}
article a::after {
    content: '→';
    transition: var(--transition);
}
article a:hover::after {
    transform: translateX(4px);
}

/* ===== 评价区 ===== */
#testimonials > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
blockquote {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    border-left: 4px solid var(--accent-1);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
blockquote:hover {
    transform: translateY(-4px);
    border-left-color: var(--accent-2);
}
blockquote p {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px;
}
blockquote cite {
    font-style: normal;
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== FAQ ===== */
#faq > div {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
details {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: var(--transition);
}
details:hover {
    border-color: rgba(247, 183, 49, 0.15);
}
summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    transition: var(--transition);
    user-select: none;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent-1);
    transition: var(--transition);
}
details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
details[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
details p {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== HowTo ===== */
#howto ol {
    max-width: 700px;
    margin: 28px auto 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#howto ol li {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
    list-style-position: inside;
}
#howto ol li:hover {
    border-color: rgba(247, 183, 49, 0.15);
    transform: translateX(4px);
}
#howto ol li strong {
    color: var(--accent-1);
}
#howto > p:last-child {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 24px;
    font-size: 0.9rem;
}

/* ===== 联系 ===== */
#contact address {
    font-style: normal;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    max-width: 500px;
    margin: 24px auto 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#contact address p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
#contact > p:last-child {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 0.9rem;
}

/* ===== 页脚 ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 48px 20px 32px;
    text-align: center;
}
footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}
footer nav ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}
footer nav ul li a:hover {
    color: var(--accent-1);
}
footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 8px;
}

/* ===== 滚动动画 ===== */
@media (prefers-reduced-motion: no-preference) {
    section {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeUp 0.8s ease forwards;
    }
    section:nth-child(2) { animation-delay: 0.1s; }
    section:nth-child(3) { animation-delay: 0.2s; }
    section:nth-child(4) { animation-delay: 0.3s; }
    section:nth-child(5) { animation-delay: 0.4s; }
    section:nth-child(6) { animation-delay: 0.5s; }
    section:nth-child(7) { animation-delay: 0.6s; }
    section:nth-child(8) { animation-delay: 0.7s; }
    section:nth-child(9) { animation-delay: 0.8s; }
    section:nth-child(10) { animation-delay: 0.9s; }
    section:nth-child(11) { animation-delay: 1s; }
    section:nth-child(12) { animation-delay: 1.1s; }
    section:nth-child(13) { animation-delay: 1.2s; }

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
    section {
        padding: 60px 16px;
    }
    nav ul {
        display: none;
    }
    nav button:last-child {
        display: flex;
    }
    #hero {
        padding: 100px 16px 60px;
    }
    #hero a[href*="download"],
    #hero a[href*="register"] {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
    #products > div,
    #services > div,
    #features > div,
    #advantages > div,
    #resources > div,
    #testimonials > div {
        grid-template-columns: 1fr;
    }
    article {
        padding: 20px 16px;
    }
    #faq > div {
        padding: 0;
    }
    footer nav ul {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    #hero h1 {
        font-size: 1.8rem;
    }
    #hero p {
        font-size: 0.95rem;
    }
    #hero > div:last-of-type div {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    section h2 {
        font-size: 1.5rem;
    }
}

/* ===== 暗色模式（默认即为暗色，但保留切换兼容） ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #0f0f1a;
        --bg-secondary: #1a1a2e;
        --bg-card: rgba(26, 26, 46, 0.75);
        --text-primary: #f0f0f5;
        --text-secondary: #b0b0c0;
    }
}

/* ===== 辅助按钮（汉堡菜单）显示 ===== */
nav button:last-child {
    display: none;
}
@media (max-width: 768px) {
    nav button:last-child {
        display: flex;
    }
}

/* ===== 其他细节 ===== */
#about p {
    max-width: 800px;
    margin: 0 auto 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    text-align: center;
}

#howto > p:first-of-type {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 24px;
}

/* 卡片内链接统一 */
article a {
    color: var(--accent-1);
    font-weight: 600;
}

/* 安全区域 */
header + main {
    padding-top: var(--nav-height);
}

/* 选中文本 */
::selection {
    background: var(--accent-1);
    color: #1a1a2e;
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--accent-1);
    outline-offset: 2px;
}

/* 按钮和链接点击区域 */
nav a, button, a[href] {
    -webkit-tap-highlight-color: transparent;
}

/* 平滑过渡 */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}