*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    font-family: 'sans-serif', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.5;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* === Header / Navigation === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
                background 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.header.scrolled { background: rgba(255, 255, 255, 0.96); }
.header.hidden { transform: translateY(-100%); }
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    height: 75px;
}
.header-logo { flex-shrink: 0; }
.header-logo img { height: 50px; width: auto; }
.header-nav {
    display: flex;
    align-items: center;
    gap: 48px;
}
.header-nav a {
    font-size: 16px;
    color: #000;
    transition: color 0.3s;
}
.header-nav a:hover,
.header-nav a.active { color: #0068dd; }
.header-nav > a,
.header-nav > .nav-item-dropdown > a { font-weight: 600; }
.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0068dd;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 16px;
    transition: background 0.3s;
}
.header-cta:hover { background: #0055b3; }

/* === Nav Dropdown === */
.nav-item-dropdown { position: relative; }
.nav-item-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 20px;
    padding: 12px 0 8px 0;
    box-shadow: 0 0 6.4px 5px rgba(0,104,221,0.1);
    width: 240px;
}
@keyframes navDropIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes navSubDropIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-item-dropdown:hover > .dropdown,
.nav-item-dropdown.open > .dropdown { display: block; }
@media (min-width: 769px) {
    .nav-item-dropdown:hover > .dropdown,
    .nav-item-dropdown.open > .dropdown { animation: navDropIn .22s ease; }
    .nav-item-dropdown .nav-item-dropdown:hover > .dropdown,
    .nav-item-dropdown .nav-item-dropdown.open > .dropdown { animation: navSubDropIn .22s ease; }
    .nav-item-dropdown .nav-item-dropdown > .dropdown {
        position: static;
        transform: none;
        width: auto;
        box-shadow: none;
        border-radius: 12px;
        padding: 0;
        margin-top: 4px;
    }
    .dropdown > .nav-item-dropdown > a {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }
    .dropdown > .nav-item-dropdown > a::after {
        content: '';
        display: inline-block;
        width: 0.5em; height: 0.5em;
        border-right: 2px solid #999;
        border-bottom: 2px solid #999;
        transform: rotate(45deg) translate(-25%, -25%);
        transition: transform .22s ease;
    }
    .dropdown > .nav-item-dropdown:hover > a::after,
    .dropdown > .nav-item-dropdown.open > a::after {
        transform: rotate(-135deg) translate(-25%, -25%);
    }
}
.dropdown a {
    display: block;
    padding: 6px 20px;
    font-size: 16px;
    color: #444 !important;
    text-align: center;
}
.dropdown a:hover,
.dropdown a.active-dropdown { color: #0068dd !important; }
.dropdown > .nav-item-dropdown > a {
    font-weight: 600;
    color: #222 !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: 0.3s;
}

/* === Footer === */
.footer {
    position: relative;
    min-height: 50px;
    overflow: hidden;
    background: #1a1a2e;
}
.footer .content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    color: #fff;
    text-align: center;
    font-size: 16px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .header-nav { display: none; }
    .menu-toggle { display: flex; }
    .header-nav.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: calc(100vh - 75px);
        overflow-y: auto;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }
    @supports not (scrollbar-gutter: stable) {
        .header-nav.open { overflow-y: scroll; }
    }
    .nav-item-dropdown .dropdown {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border-radius: 12px;
        margin-top: 4px;
    }
    .header-nav a { min-height: 44px; display: flex; align-items: center; }
    .dropdown a { min-height: 36px; padding: 8px 20px; }
    .nav-item-dropdown > .dropdown { display: none; }
    .nav-item-dropdown.open > .dropdown { display: block; animation: navSubDropIn .22s ease; }
    .nav-item-dropdown .nav-item-dropdown > .dropdown { margin-left: 12px; }
    .nav-item-dropdown > a { position: relative; cursor: pointer; padding-right: 24px; }
    .nav-item-dropdown > a::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        width: 7px;
        height: 7px;
        border-right: 2px solid #666;
        border-bottom: 2px solid #666;
        transform: translateY(-65%) rotate(45deg);
        transition: transform 0.25s;
    }
    .nav-item-dropdown.open > a::after { transform: translateY(-35%) rotate(-135deg); }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .header-inner { padding: 12px 16px; }
    .header-logo img { height: 40px; }
    .header-nav.open {
        padding: 16px;
        gap: 16px;
    }
    .footer .content { font-size: 14px; }
}

/* ponytail: SEO 语义H1,视觉隐藏仅给爬虫读 */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
