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

:root {
    --primary: #ffd700;
    --primary-dark: #e6b800;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.12);
    --text-light: #f5f5f5;
    --text-muted: #b0b0c0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

/* 暗色模式默认 */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 60%),
                      radial-gradient(ellipse at 80% 20%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 滚动动画基础 */
section {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s ease forwards;
}

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; }

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

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    transition: background var(--transition);
}

nav[aria-label="主导航"] {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

nav[aria-label="主导航"] > a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

nav[aria-label="主导航"] > a svg {
    width: 36px;
    height: 36px;
}

nav[aria-label="主导航"] ul {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

nav[aria-label="主导航"] ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 6px 0;
    position: relative;
    transition: color var(--transition);
}

nav[aria-label="主导航"] ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition);
}

nav[aria-label="主导航"] ul li a:hover {
    color: #fff;
}

nav[aria-label="主导航"] ul li a:hover::after {
    width: 100%;
}

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 215, 0, 0.05) 0%, transparent 40%);
    animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-10%, -10%); }
}

#hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #fff, var(--primary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

#hero div {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

#hero div a[role="button"] {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #0a0a1a;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

#hero div a[role="button"]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
}

#hero div a[role="button"]:nth-child(2) {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

#hero div a[role="button"]:nth-child(2):hover {
    background: var(--primary);
    color: #0a0a1a;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

#hero img {
    margin-top: 40px;
    max-width: 600px;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

/* 通用section样式 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
    color: var(--primary);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 2px;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

/* About */
#about p {
    margin-bottom: 16px;
    color: var(--text-muted);
    max-width: 800px;
}

#about address {
    font-style: normal;
    background: var(--bg-card);
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    margin-top: 16px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Download */
#download {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

#download article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#download article:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.15);
}

#download article p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

#download article a[download] {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #0a0a1a;
    border-radius: 50px;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

#download article a[download]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

#download > p {
    grid-column: 1 / -1;
    background: rgba(255, 215, 0, 0.08);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--primary);
    font-size: 0.95rem;
}

/* Features */
#features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

#features ul li {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    text-align: center;
    font-weight: 500;
    color: var(--text-light);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

#features ul li::before {
    content: '✦';
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

#features ul li:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.1);
    background: rgba(255, 215, 0, 0.05);
}

/* Guide */
#guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

#guide article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px;
    transition: all var(--transition);
}

#guide article:hover {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

#guide article:last-child {
    grid-column: 1 / -1;
}

#guide ol {
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 2;
}

#guide ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

#guide p {
    color: var(--text-muted);
}

/* FAQ */
#faq details {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all var(--transition);
}

#faq details[open] {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.05);
}

#faq summary {
    padding: 18px 24px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color var(--transition);
    list-style: none;
}

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

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

#faq details[open] summary::after {
    transform: rotate(45deg);
}

#faq summary:hover {
    color: var(--primary);
}

#faq details p {
    padding: 0 24px 18px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Contact */
#contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

#contact ul li {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    color: var(--text-muted);
    transition: background var(--transition);
}

#contact ul li:hover {
    background: rgba(255, 215, 0, 0.05);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 20px 30px;
    margin-top: 40px;
}

footer nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 28px;
    margin-bottom: 24px;
}

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

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

footer p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

footer p:last-child {
    font-family: monospace;
    color: #666;
    font-size: 0.8rem;
}

/* 响应式 */
@media (max-width: 768px) {
    nav[aria-label="主导航"] ul {
        gap: 12px;
    }

    nav[aria-label="主导航"] ul li a {
        font-size: 0.8rem;
    }

    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    #download,
    #guide {
        grid-template-columns: 1fr;
    }

    section {
        padding: 50px 0;
    }

    h2 {
        font-size: 1.6rem;
    }

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

@media (max-width: 480px) {
    #header {
        height: auto;
    }

    nav[aria-label="主导航"] {
        flex-direction: column;
        height: auto;
        padding: 12px 16px;
        gap: 10px;
    }

    nav[aria-label="主导航"] ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }

    #hero {
        padding: 100px 16px 60px;
    }

    #hero h1 {
        font-size: 1.6rem;
    }

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

    #download article,
    #guide article {
        padding: 20px;
    }

    footer nav ul {
        gap: 12px 16px;
    }
}

/* 小细节：选中文字 */
::selection {
    background: var(--primary);
    color: #0a0a1a;
}