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

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4a9eff;
    --accent: #ff6b35;
    --accent-light: #ff8f5e;
    --bg-dark: #0b0e1a;
    --bg-card: #13172b;
    --bg-card-hover: #1c2140;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #6b7280;
    --glass-bg: rgba(19, 23, 43, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-hero: linear-gradient(135deg, #0b0e1a 0%, #1a1f3a 40%, #1a73e8 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 115, 232, 0.08), rgba(255, 107, 53, 0.05));
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 暗色模式（默认即暗色，但保留切换能力） */
body.dark-mode {
    --primary: #4a9eff;
    --primary-dark: #1a73e8;
    --primary-light: #7bb8ff;
    --bg-dark: #0a0d1a;
    --bg-card: #12162b;
    --bg-card-hover: #1a1f3a;
    --text-primary: #f0f2f5;
    --text-secondary: #b0b8c4;
    --glass-bg: rgba(18, 22, 43, 0.8);
    --gradient-hero: linear-gradient(135deg, #0a0d1a 0%, #131a35 40%, #1a73e8 100%);
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 链接 */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus {
    color: var(--accent);
    outline: none;
}

/* 按钮通用 */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
}

/* 标题 */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* ========== HEADER ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition);
}

body.dark-mode header {
    background: rgba(10, 13, 26, 0.88);
}

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

nav > a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

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

nav ul li a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--text-primary);
    background: rgba(26, 115, 232, 0.15);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

#darkModeToggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all var(--transition);
    flex-shrink: 0;
}

#darkModeToggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: rotate(30deg);
}

/* 移动端导航按钮 */
nav > button[aria-label="切换导航菜单"] {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all var(--transition);
}

nav > button[aria-label="切换导航菜单"]:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ========== HERO ========== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(26, 115, 232, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 40%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, -5%) scale(1.1); }
}

#hero > div {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

#hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

#hero h1 span {
    display: block;
    font-size: 0.5em;
    color: var(--primary-light);
    font-weight: 400;
    letter-spacing: 0.2em;
    margin-top: 0.3rem;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0.5rem auto;
}

#hero p:first-of-type {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-primary);
    font-weight: 500;
}

#hero a {
    display: inline-block;
    margin-top: 2rem;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.3);
}

#hero a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

/* ========== 通用 Section ========== */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

/* ========== ABOUT ========== */
#about {
    padding-top: 100px;
}

#about > p {
    text-align: center;
    max-width: 800px;
    margin: 1rem auto;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

#about > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

#about article {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

#about article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

#about article:hover::before {
    opacity: 1;
}

#about article:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

#about article h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--primary-light);
}

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

/* ========== PRODUCTS / SERVICES / ADVANTAGES ========== */
#products > div,
#services > div,
#advantages > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

#products article,
#services article,
#advantages article {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

#products article::after,
#services article::after,
#advantages article::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#products article:hover,
#services article:hover,
#advantages article:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
    border-color: rgba(26, 115, 232, 0.3);
}

#products article h3,
#services article h3,
#advantages article h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-light);
}

#products article p,
#services article p,
#advantages article p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ========== TESTIMONIALS ========== */
#testimonials > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

#testimonials blockquote {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    transition: all var(--transition);
}

#testimonials blockquote::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

#testimonials blockquote:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(26, 115, 232, 0.2);
}

#testimonials blockquote p {
    font-style: italic;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-left: 20px;
}

#testimonials blockquote footer {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

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

details {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all var(--transition);
}

details:hover {
    border-color: rgba(26, 115, 232, 0.2);
}

details summary {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    transition: background var(--transition);
    user-select: none;
}

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

details summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-light);
    transition: transform var(--transition);
    line-height: 1;
}

details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

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

details p {
    padding: 0 24px 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========== CONTACT ========== */
#contact address {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px 28px;
    max-width: 600px;
    margin: 30px auto 0;
    font-style: normal;
    display: grid;
    gap: 16px;
}

#contact address p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#contact address a {
    color: var(--primary-light);
    font-weight: 500;
}

#contact address a:hover {
    color: var(--accent);
}

/* ========== FOOTER ========== */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--glass-border);
    padding: 60px 20px 30px;
    margin-top: 40px;
}

footer > div:first-child {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

footer h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
}

footer ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition);
}

footer ul li a:hover {
    color: var(--primary-light);
}

footer > div:last-child {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

footer > div:last-child p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== BACK TO TOP ========== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all var(--transition);
    opacity: 0.9;
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(26, 115, 232, 0.6);
    opacity: 1;
}

#back-to-top:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
}

/* ========== SEARCH SIM ========== */
#search-sim {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

#search-sim[hidden] {
    display: none;
}

#search-sim > div {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#search-sim form {
    display: flex;
    gap: 12px;
}

#search-sim input[type="search"] {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}

#search-sim input[type="search"]:focus {
    border-color: var(--primary);
}

#search-sim input[type="search"]::placeholder {
    color: var(--text-muted);
}

#search-sim button[type="submit"] {
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background var(--transition);
}

#search-sim button[type="submit"]:hover {
    background: var(--primary-dark);
}

#search-close {
    align-self: flex-end;
    padding: 8px 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

#search-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* 屏幕阅读器专用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== 滚动动画 ========== */
section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    section {
        padding: 60px 20px;
    }
}

@media (max-width: 768px) {
    nav ul {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(11, 14, 26, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 20px;
        border-bottom: 1px solid var(--glass-border);
        display: none;
        z-index: 100;
    }

    nav ul.show {
        display: flex;
    }

    nav > button[aria-label="切换导航菜单"] {
        display: flex;
    }

    #hero {
        padding: 80px 20px 40px;
        min-height: 80vh;
    }

    #hero h1 {
        font-size: clamp(1.6rem, 8vw, 2.5rem);
    }

    #hero a {
        padding: 12px 32px;
        font-size: 0.95rem;
    }

    section {
        padding: 50px 16px;
    }

    #about > div,
    #products > div,
    #services > div,
    #advantages > div,
    #testimonials > div {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #about article,
    #products article,
    #services article,
    #advantages article,
    #testimonials blockquote {
        padding: 24px 20px;
    }

    footer > div:first-child {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0 12px;
        height: 56px;
    }

    nav > a svg {
        width: 120px;
        height: 32px;
    }

    #hero {
        padding: 70px 16px 30px;
    }

    #hero p:first-of-type {
        font-size: 1rem;
    }

    #hero a {
        padding: 10px 28px;
        font-size: 0.9rem;
    }

    section h2 {
        font-size: 1.4rem;
    }

    #contact address {
        padding: 24px 20px;
    }

    footer > div:first-child {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    #back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    #search-sim > div {
        padding: 20px;
    }

    #search-sim form {
        flex-direction: column;
    }
}