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

:root {
    --bg: #f0f4ff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.25);
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --accent: #1a73e8;
    --accent-light: #4a9eff;
    --accent-dark: #0d47a1;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gradient-banner: linear-gradient(135deg, #1a73e8 0%, #4a9eff 50%, #7cb3ff 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
    --nav-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: #0d1b2a;
    --footer-text: #e0e0e0;
    --code-bg: rgba(0,0,0,0.05);
}

/* 暗色模式 */
[data-theme="dark"] {
    --bg: #0d1b2a;
    --bg-card: rgba(30, 40, 60, 0.7);
    --bg-glass: rgba(30, 40, 60, 0.25);
    --text: #e8e8f0;
    --text-secondary: #a0a0b8;
    --accent: #4a9eff;
    --accent-light: #7cb3ff;
    --accent-dark: #1a73e8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.5);
    --gradient-banner: linear-gradient(135deg, #0d47a1 0%, #1a73e8 50%, #4a9eff 100%);
    --gradient-card: linear-gradient(145deg, rgba(30,40,60,0.8), rgba(20,30,50,0.3));
    --nav-bg: rgba(13, 27, 42, 0.85);
    --footer-bg: #050d17;
    --footer-text: #b0b0c0;
    --code-bg: rgba(255,255,255,0.05);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

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

/* 导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border var(--transition);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1rem;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--gradient-banner);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: opacity var(--transition);
}

.logo a:hover {
    opacity: 0.8;
}

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

nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: transform var(--transition);
}

nav ul li a:hover,
nav ul li a:focus-visible {
    color: var(--accent);
    background: rgba(26, 115, 232, 0.08);
}

nav ul li a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

#dark-mode-toggle,
#mobile-menu-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all var(--transition);
    backdrop-filter: blur(8px);
    color: var(--text);
}

#dark-mode-toggle:hover,
#mobile-menu-toggle:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.05);
}

#mobile-menu-toggle {
    display: none;
}

/* 主内容区 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 2rem;
}

/* 通用section */
section {
    margin-bottom: 5rem;
    scroll-margin-top: 90px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    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; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1s; }

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    background: var(--gradient-banner);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-banner);
    border-radius: 4px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

p {
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 1rem;
}

/* Hero区域 */
#hero {
    text-align: center;
    padding: 4rem 1rem;
    background: var(--gradient-banner);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15), transparent 60%);
    animation: shimmer 6s infinite alternate;
}

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

#hero h1 {
    -webkit-text-fill-color: #fff;
    background: none;
    color: #fff;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: all var(--transition);
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    background: var(--accent);
    color: #fff;
    border-color: #fff;
}

.cta-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* 卡片通用 */
section:not(#hero) {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

section:not(#hero):hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 产品与服务 */
#products article {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

#products article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

/* 核心服务列表 */
#services ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

#services ul li {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-align: center;
    color: var(--text);
}

#services ul li:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.03);
}

/* 特点网格 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.features-grid div {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 1.8rem 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    text-align: center;
}

.features-grid div:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

.features-grid h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* howto 有序列表 */
#howto ol {
    padding-left: 1.5rem;
    counter-reset: step;
    list-style: none;
}

#howto ol li {
    counter-increment: step;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    position: relative;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--gradient-banner);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

#howto ol li:hover {
    transform: translateX(6px);
    border-color: var(--accent-light);
}

/* FAQ details */
#faq details {
    margin-bottom: 0.75rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

#faq details:hover {
    border-color: var(--accent-light);
}

#faq summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background var(--transition);
}

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

#faq summary::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform var(--transition);
    color: var(--accent);
}

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

#faq details[open] summary {
    background: rgba(26, 115, 232, 0.06);
}

#faq details p {
    padding: 0 1.5rem 1.2rem;
    margin: 0;
}

/* 知识中心 */
#knowledge {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

#knowledge > h2 {
    grid-column: 1 / -1;
}

#knowledge article {
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: default;
}

#knowledge article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-light);
}

#knowledge article h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

/* 联系 */
#contact address {
    font-style: normal;
    background: var(--bg-glass);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    line-height: 2;
}

#contact address p {
    margin-bottom: 0.3rem;
}

/* 页脚 */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 2rem 1.5rem;
    margin-top: 3rem;
    backdrop-filter: blur(8px);
}

footer nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

footer nav ul li a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}

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

footer nav ul li a:hover {
    color: #fff;
}

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

footer p {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--footer-text);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        padding: 0.8rem 2rem;
        width: 100%;
        text-align: center;
        border-radius: 0;
    }

    nav ul li a::after {
        display: none;
    }

    #mobile-menu-toggle {
        display: flex;
    }

    header {
        padding: 0 1rem;
    }

    main {
        padding: 90px 1rem 1rem;
    }

    section:not(#hero) {
        padding: 1.8rem 1.2rem;
    }

    #hero {
        padding: 3rem 1rem;
        min-height: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    footer nav ul {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    h1 {
        font-size: 1.8rem;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
}

/* 暗色模式切换过渡 */
#dark-mode-toggle {
    transition: all var(--transition);
}

/* 焦点样式 */
a:focus-visible,
button:focus-visible,
details summary:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* 选择文本 */
::selection {
    background: var(--accent);
    color: #fff;
}