/* ===== Reset & Base ===== */
*, *::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, sans-serif;
    background: #0b0e1a;
    color: #e0e4f0;
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* ===== Dark Mode (默认暗色) ===== */
:root {
    --bg-primary: #0b0e1a;
    --bg-secondary: #13172b;
    --bg-card: rgba(19, 23, 43, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #e0e4f0;
    --text-secondary: #a0a8c0;
    --accent: #ffd700;
    --accent-hover: #ffed4a;
    --border-glass: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
    --gradient-banner: linear-gradient(135deg, #0f1a3a 0%, #1a3a5c 40%, #2a5a7a 100%);
    --gradient-accent: linear-gradient(135deg, #ffd700, #ff8c00);
    --nav-bg: rgba(11, 14, 26, 0.85);
}

/* ===== Scroll Animation (Intersection Observer 备用) ===== */
section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.7s 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; }
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Header & Nav ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    transition: background 0.3s;
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
}
nav > div a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
nav > div a span {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}
nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color 0.3s ease;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}
nav ul li a:hover {
    color: var(--accent);
}
nav ul li a:hover::after {
    width: 100%;
}

/* ===== Main Banner ===== */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-banner);
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
    text-align: center;
}
#home::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%);
    pointer-events: none;
}
#home::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(26,58,92,0.4) 0%, transparent 70%);
    pointer-events: none;
}
#home > div {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
#home h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}
#home p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
#home a {
    display: inline-block;
    padding: 0.9rem 2.8rem;
    background: var(--gradient-accent);
    color: #0b0e1a;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}
#home a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255,215,0,0.5);
}

/* ===== Common Section ===== */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}
section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* ===== About ===== */
#about p {
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* ===== Products & Services ===== */
#products > div,
#services > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}
article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem 1.8rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: var(--shadow-card);
}
article:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    border-color: rgba(255,215,0,0.25);
}
article h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--accent);
}
article p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

/* ===== Knowledge ===== */
#knowledge > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}
#knowledge article a {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}
#knowledge article a::after {
    content: '→';
    margin-left: 0.4rem;
    transition: margin-left 0.3s;
}
#knowledge article a:hover {
    color: var(--accent-hover);
}
#knowledge article a:hover::after {
    margin-left: 0.8rem;
}

/* ===== FAQ ===== */
details {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    transition: background 0.3s, border-color 0.3s;
    cursor: pointer;
}
details[open] {
    background: rgba(255,215,0,0.06);
    border-color: rgba(255,215,0,0.3);
}
summary {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    padding: 0.3rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    transition: transform 0.3s;
}
details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
details p {
    margin-top: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-right: 1rem;
}

/* ===== HowTo ===== */
#howto-heading + ol {
    list-style: none;
    counter-reset: step-counter;
    margin-top: 1.5rem;
}
#howto-heading + ol li {
    counter-increment: step-counter;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-secondary);
    transition: background 0.3s, transform 0.3s;
}
#howto-heading + ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: var(--gradient-accent);
    color: #0b0e1a;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
#howto-heading + ol li strong {
    color: var(--accent);
    font-weight: 600;
}
#howto-heading + ol li:hover {
    background: rgba(255,215,0,0.08);
    transform: translateX(4px);
}

/* ===== Contact ===== */
#contact address {
    font-style: normal;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-top: 1.5rem;
    max-width: 500px;
}
#contact address p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
#contact address a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}
#contact address a:hover {
    color: var(--accent-hover);
}

/* ===== Footer ===== */
footer {
    background: #070a14;
    border-top: 1px solid var(--border-glass);
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
}
footer > div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
footer ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
footer ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}
footer ul li a:hover {
    color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    html { font-size: 15px; }
    nav {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.6rem 1rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 1.5rem;
    }
    nav ul li a {
        font-size: 0.9rem;
    }
    #home h1 {
        font-size: 2.2rem;
    }
    #home p {
        font-size: 1rem;
    }
    #home a {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
    }
    section {
        padding: 3rem 1rem;
    }
    section h2 {
        font-size: 1.8rem;
    }
    #products > div,
    #services > div,
    #knowledge > div {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    article {
        padding: 1.5rem;
    }
    details {
        padding: 0.8rem 1rem;
    }
    #howto-heading + ol li {
        padding: 0.8rem 1rem 0.8rem 3rem;
    }
    #contact address {
        padding: 1.5rem;
    }
    footer > div {
        flex-direction: column;
        text-align: center;
    }
    footer ul {
        gap: 1.2rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #home h1 {
        font-size: 1.8rem;
    }
    nav ul {
        gap: 0.8rem;
    }
    nav ul li a {
        font-size: 0.85rem;
    }
}

/* ===== Accessibility & Misc ===== */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
::selection {
    background: rgba(255,215,0,0.3);
    color: #fff;
}
/* 毛玻璃增强 */
article, details, #contact address, #howto-heading + ol li {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}