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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0b0b1a;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* ===== 暗色模式（默认） ===== */
body {
    --bg-primary: #0b0b1a;
    --bg-secondary: #13132b;
    --bg-card: rgba(255,255,255,0.05);
    --bg-glass: rgba(20,20,50,0.6);
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0c0;
    --accent: #6c63ff;
    --accent-light: #8b83ff;
    --accent-glow: rgba(108,99,255,0.3);
    --border-color: rgba(255,255,255,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0b1a;
}
::-webkit-scrollbar-thumb {
    background: #3a3a6a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5a5a8a;
}

/* ===== 通用动画 ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(108,99,255,0.15); }
}

section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 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: 1.0s; }
section:nth-child(12) { animation-delay: 1.1s; }
section:nth-child(13) { animation-delay: 1.2s; }

/* ===== 头部导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11,11,26,0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    transition: background 0.3s;
}

nav[aria-label="主导航"] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

nav[aria-label="主导航"] a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a[aria-current="page"] {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ===== 主体内容 ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem 3rem;
}

/* ===== 通用 section ===== */
section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

section:hover {
    border-color: rgba(108,99,255,0.3);
    box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 30px var(--accent-glow);
    transform: translateY(-4px);
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    background: linear-gradient(135deg, #6c63ff, #ff6b9d, #f9ca24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: #fff;
    margin-bottom: 1.2rem;
    position: relative;
    display: inline-block;
}

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

h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.6rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #fff;
}

ul, ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

li {
    margin-bottom: 0.4rem;
}

/* ===== Hero 区域（渐变Banner） ===== */
#hero {
    background: linear-gradient(135deg, #0b0b1a 0%, #1a1a3e 40%, #2d1b4e 70%, #0b0b1a 100%);
    border: none;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(108,99,255,0.15);
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(108,99,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255,107,157,0.06) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

#hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

#hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #c0c0d0;
    position: relative;
    z-index: 1;
}

#hero a {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    margin: 0.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

#hero a:first-of-type {
    background: linear-gradient(135deg, var(--accent), #5a52d5);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

#hero a:first-of-type:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 40px var(--accent-glow);
}

#hero a:last-of-type {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
}

#hero a:last-of-type:hover {
    border-color: var(--accent);
    background: rgba(108,99,255,0.15);
    transform: translateY(-3px);
}

#hero img {
    margin-top: 1.5rem;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

#hero img:hover {
    transform: scale(1.02);
}

/* ===== 产品卡片 ===== */
#products article {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.8rem;
    margin-bottom: 1.2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

#products article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108,99,255,0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

#products article:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px var(--accent-glow);
}

#products article:hover::before {
    opacity: 1;
}

/* ===== details / FAQ ===== */
details {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

details:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

details[open] {
    border-color: var(--accent);
    background: rgba(108,99,255,0.08);
}

details summary {
    font-weight: 600;
    color: #fff;
    outline: none;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

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

/* ===== 联系信息 ===== */
#contact ul {
    list-style: none;
    padding: 0;
}

#contact ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#contact ul li:last-child {
    border-bottom: none;
}

/* ===== 页脚 ===== */
footer {
    background: rgba(11,11,26,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1rem;
    margin-bottom: 1.2rem;
}

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

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

footer p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.4rem;
}

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

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

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    header {
        padding: 0 1rem;
    }

    nav[aria-label="主导航"] {
        gap: 0.3rem;
        padding: 0.6rem 0;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    nav[aria-label="主导航"]::-webkit-scrollbar {
        display: none;
    }

    nav[aria-label="主导航"] a {
        font-size: 0.78rem;
        padding: 0.3rem 0.7rem;
        flex-shrink: 0;
    }

    main {
        padding: 5rem 0.8rem 2rem;
    }

    section {
        padding: 1.8rem 1.2rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    #hero {
        padding: 2rem 1.2rem;
    }

    #hero a {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    #products article {
        padding: 1.2rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    footer nav {
        gap: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 1.2rem 0.8rem;
    }

    #hero {
        padding: 1.5rem 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

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

/* ===== 暗色模式微调 ===== */
@media (prefers-color-scheme: light) {
    body {
        --bg-primary: #f5f5fa;
        --bg-secondary: #ffffff;
        --bg-card: rgba(255,255,255,0.7);
        --bg-glass: rgba(255,255,255,0.5);
        --text-primary: #1a1a2e;
        --text-secondary: #4a4a6a;
        --border-color: rgba(0,0,0,0.08);
        --shadow: 0 8px 32px rgba(0,0,0,0.08);
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    header {
        background: rgba(245,245,250,0.8);
    }

    section {
        background: var(--bg-card);
        border-color: var(--border-color);
    }

    h2 { color: var(--text-primary); }
    h3 { color: var(--text-primary); }

    #hero {
        background: linear-gradient(135deg, #e8e0ff 0%, #f0e6ff 40%, #fff0f5 70%, #e8e0ff 100%);
    }

    #hero h1 {
        background: linear-gradient(135deg, #4a3fbf, #d6336c, #e6a800);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    #hero p {
        color: #4a4a6a;
    }

    #hero a:last-of-type {
        color: #1a1a2e;
        border-color: rgba(0,0,0,0.15);
    }

    #hero a:last-of-type:hover {
        border-color: var(--accent);
        background: rgba(108,99,255,0.1);
    }

    details summary { color: var(--text-primary); }

    footer {
        background: rgba(245,245,250,0.9);
    }

    footer p { color: #666; }
}