*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0088cc;
    --primary-dark: #006699;
    --primary-light: #2aabee;
    --primary-gradient: linear-gradient(135deg, #0088cc 0%, #2aabee 100%);
    --header-height: 64px;
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.92);
    --text-primary: #0f0f1a;
    --text-secondary: #4a4a5a;
    --text-muted: #8a8a9a;
    --border-color: #e6edf4;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 24px rgba(0, 136, 204, 0.06);
    --footer-bg: #0f0f1a;
    --footer-text: rgba(255, 255, 255, 0.7);
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
    --bg-body: #0f0f1a;
    --bg-surface: #18182a;
    --bg-card: #1a1a2e;
    --bg-nav: rgba(15, 15, 26, 0.92);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --text-muted: #70708a;
    --border-color: #2a2a40;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --footer-bg: #08080e;
    --footer-text: rgba(255, 255, 255, 0.6);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

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

h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    margin-bottom: 0.5rem;
}

h3 {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 60ch;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 50ch;
    margin: 0 auto 2.5rem;
}

/* --- 公共导航 --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1001;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition), border-color var(--transition);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.logo .brand {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-links .nav-cta {
    background: var(--primary-gradient);
    color: #fff !important;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
}

.nav-links .nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25);
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.theme-toggle {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--border-color);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 6px;
    flex-shrink: 0;
    z-index: 1002;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.menu-toggle:active {
    opacity: 0.6;
}

/* --- 公共页脚 --- */
.footer {
    padding: 40px 0 24px;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--footer-text);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: #fff;
}

.footer-links a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-brand p {
    color: var(--footer-text);
    font-size: 0.9rem;
    max-width: 40ch;
    opacity: 0.7;
    margin-top: 0.4rem;
    line-height: 1.7;
}

.footer-bottom {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1rem;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.5;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    color: var(--footer-text);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.footer-socials a:hover {
    opacity: 1;
}

/* --- 公共响应式（导航 & 页脚） --- */
@media (max-width: 992px) {
    .footer .container {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .header {
        height: var(--header-height);
    }

    .header .container {
        height: var(--header-height);
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--bg-nav);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        margin: 0;
        gap: 0.8rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-140%);
        transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        align-items: stretch;
        text-align: center;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
        border-radius: 0 0 var(--radius) var(--radius);
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links a {
        padding: 0.8rem 0;
        font-size: 1.05rem;
        font-weight: 500;
        border-bottom: 1px solid var(--border-color);
        transition: background 0.15s;
        display: block;
        width: 100%;
        cursor: pointer;
        touch-action: manipulation;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: var(--bg-surface);
        border-radius: 6px;
    }

    .nav-links .nav-cta {
        background: var(--primary-gradient);
        color: #fff !important;
        padding: 0.7rem 1.2rem;
        border-radius: 50px;
        border-bottom: none;
        font-weight: 600;
        margin-top: 0.2rem;
        box-shadow: 0 4px 16px rgba(0, 136, 204, 0.2);
    }

    .nav-links .nav-cta:hover,
    .nav-links .nav-cta:active {
        background: var(--primary-gradient);
        opacity: 0.9;
        transform: translateY(-1px);
    }

    .menu-toggle {
        display: flex;
        z-index: 1002;
        position: relative;
        cursor: pointer;
        padding: 8px 6px;
    }

    .footer .container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
        max-width: 100%;
    }

    .footer-col,
    .footer-socials {
        display: none;
    }

    .footer-brand {
        display: flex;
    }

    .footer-links {
        align-items: center;
        gap: 0.4rem;
    }

    .footer-col h4 {
        margin-bottom: 0.3rem;
        font-size: 0.95rem;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 0.2rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 0.8rem;
        padding-top: 1.2rem;
    }

    .footer-socials {
        gap: 1.5rem;
        font-size: 1.2rem;
    }

    .footer-socials a {
        opacity: 0.7;
    }

    .footer-logo {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        padding: 0.8rem 1rem 1.2rem;
        gap: 0.6rem;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem 0;
    }

    .nav-links .nav-cta {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .footer {
        padding: 28px 0 16px;
    }

    .footer .container {
        gap: 1rem;
    }

    .footer-col h4 {
        font-size: 0.85rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        font-size: 0.7rem;
    }
}

/* --- 公共滚动条 --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- 公共辅助 --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {

    .header,
    .footer,
    .menu-toggle,
    .nav-tools {
        display: none !important;
    }

    .hero {
        padding-top: 20px;
    }

    body {
        background: #fff;
        color: #000;
    }
}