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

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0b0e17;
    color: #e0e4ec;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: #f0b429;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #f7d06a;
}

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

ul, ol {
    list-style: none;
}

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

/* ===== 暗色模式 (默认即为暗色) ===== */
:root {
    --bg-primary: #0b0e17;
    --bg-secondary: #131826;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222a3c;
    --bg-glass: rgba(26, 31, 46, 0.65);
    --text-primary: #e0e4ec;
    --text-secondary: #a0a8b8;
    --accent: #f0b429;
    --accent-hover: #f7d06a;
    --border: #2a3040;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

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

section {
    animation: fadeInUp 0.6s ease-out both;
}

/* ===== 渐变Banner (全局) ===== */
header {
    background: linear-gradient(135deg, #0b0e17 0%, #1a1f2e 50%, #0f1420 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(11, 14, 23, 0.85);
    transition: background 0.3s ease;
}

/* ===== 导航 ===== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
}

nav > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav button[aria-label="切换导航菜单"] {
    display: none;
    padding: 0.25rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}
nav button[aria-label="切换导航菜单"]:hover {
    transform: scale(1.1);
}

#main-menu {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

#main-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: background 0.3s ease, color 0.3s ease;
}
#main-menu li a:hover {
    background: rgba(240, 180, 41, 0.12);
    color: var(--accent);
}

/* ===== Hero 区域 ===== */
section[aria-labelledby="hero-title"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

section[aria-labelledby="hero-title"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240,180,41,0.08) 0%, transparent 70%);
    pointer-events: none;
}

section[aria-labelledby="hero-title"] > div:first-child {
    flex: 1 1 400px;
}

section[aria-labelledby="hero-title"] h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #f0b429, #f7d06a, #e0a800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

section[aria-labelledby="hero-title"] p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2rem;
}

section[aria-labelledby="hero-title"] > div:first-child > div {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

section[aria-labelledby="hero-title"] a[role="button"] {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

section[aria-labelledby="hero-title"] a[role="button"]:first-child {
    background: linear-gradient(135deg, #f0b429, #d4941e);
    color: #0b0e17;
    box-shadow: 0 4px 20px rgba(240,180,41,0.3);
}
section[aria-labelledby="hero-title"] a[role="button"]:first-child:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(240,180,41,0.4);
}

section[aria-labelledby="hero-title"] a[role="button"]:last-child {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
section[aria-labelledby="hero-title"] a[role="button"]:last-child:hover {
    background: var(--accent);
    color: #0b0e17;
    transform: translateY(-3px);
}

section[aria-labelledby="hero-title"] > div:last-child {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
}

section[aria-labelledby="hero-title"] svg {
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
    transition: transform 0.5s ease;
}
section[aria-labelledby="hero-title"] svg:hover {
    transform: scale(1.02);
}

/* ===== 通用 Section 标题 ===== */
section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 0.75rem auto 0;
    border-radius: 4px;
}

/* ===== 产品/服务卡片 ===== */
#products > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

#products article {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease-out both;
}

#products article:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(240,180,41,0.15);
    background: var(--bg-card-hover);
}

#products article svg {
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}
#products article:hover svg {
    transform: scale(1.15);
}

#products article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

#products article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== 功能特点 ===== */
#features > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

#features article {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

#features article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), transparent);
    transition: width 0.3s ease;
}

#features article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

#features article:hover::before {
    width: 6px;
}

#features article h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

#features article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== 关于我们 ===== */
section[aria-labelledby="about-title"] {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    text-align: center;
}

section[aria-labelledby="about-title"] p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===== 知识库 ===== */
#knowledge > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

#knowledge article {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: var(--bg-glass);
}

#knowledge article:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(240,180,41,0.1);
}

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

#knowledge article h3 a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}
#knowledge article h3 a:hover {
    color: var(--accent);
}

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

/* ===== HowTo 区域 ===== */
section[aria-labelledby="howto-title"] {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

section[aria-labelledby="howto-title"] ol {
    list-style: decimal;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

section[aria-labelledby="howto-title"] ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

section[aria-labelledby="howto-title"] ol li a {
    color: var(--accent);
    text-decoration: underline;
}

/* ===== FAQ ===== */
#faq > div {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

#faq details {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

#faq details[open] {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(240,180,41,0.08);
}

#faq summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
    list-style: none;
}

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

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

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

#faq details p {
    padding: 0 1.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== 联系我们 ===== */
#contact {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    text-align: center;
}

#contact address {
    font-style: normal;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    margin-top: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: var(--bg-glass);
}

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

#contact address p:first-child {
    color: var(--accent);
    font-weight: 600;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(135deg, #0b0e17, #131826);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
}

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

footer nav ul {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

footer nav ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
footer nav ul li a:hover {
    color: var(--accent);
}

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

/* ===== 返回顶部 ===== */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #0b0e17;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(240,180,41,0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(240,180,41,0.4);
}

/* ===== 毛玻璃通用 ===== */
.glass {
    background: rgba(26, 31, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(240, 180, 41, 0.1);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    nav button[aria-label="切换导航菜单"] {
        display: block;
    }

    #main-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 1rem 0;
        gap: 0.5rem;
    }

    #main-menu.open {
        display: flex;
    }

    #main-menu li a {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        background: rgba(26, 31, 46, 0.5);
    }

    section[aria-labelledby="hero-title"] {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1.5rem;
    }

    section[aria-labelledby="hero-title"] p {
        margin-left: auto;
        margin-right: auto;
    }

    section[aria-labelledby="hero-title"] > div:first-child > div {
        justify-content: center;
    }

    #products > div,
    #features > div,
    #knowledge > div {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }

    #products article,
    #features article,
    #knowledge article {
        padding: 1.5rem;
    }

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

    footer nav ul {
        justify-content: center;
    }

    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }
}

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

    nav {
        padding: 0.5rem 1rem;
    }

    section[aria-labelledby="hero-title"] {
        padding: 2rem 1rem;
    }

    section[aria-labelledby="hero-title"] h1 {
        font-size: 1.8rem;
    }

    #products > div,
    #features > div,
    #knowledge > div {
        gap: 1rem;
    }

    #faq summary {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    #faq details p {
        padding: 0 1rem 0.8rem;
    }
}

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

/* ===== 选中样式 ===== */
::selection {
    background: rgba(240, 180, 41, 0.3);
    color: #fff;
}

/* ===== 动画延迟 ===== */
#products article:nth-child(1) { animation-delay: 0.1s; }
#products article:nth-child(2) { animation-delay: 0.2s; }
#products article:nth-child(3) { animation-delay: 0.3s; }
#products article:nth-child(4) { animation-delay: 0.4s; }

#features article:nth-child(1) { animation-delay: 0.1s; }
#features article:nth-child(2) { animation-delay: 0.15s; }
#features article:nth-child(3) { animation-delay: 0.2s; }
#features article:nth-child(4) { animation-delay: 0.25s; }
#features article:nth-child(5) { animation-delay: 0.3s; }
#features article:nth-child(6) { animation-delay: 0.35s; }