/* 全局重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg-primary: #0a0a23;
    --bg-secondary: #12123a;
    --bg-card: rgba(18, 18, 58, 0.75);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c8;
    --accent: #f0c040;
    --accent-hover: #f5d060;
    --accent-glow: rgba(240, 192, 64, 0.3);
    --border: rgba(240, 192, 64, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus-visible {
    color: var(--accent-hover);
    text-decoration: underline;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}
img, svg {
    max-width: 100%;
    display: block;
}
button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}
ul {
    list-style: none;
}
/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
/* 滚动动画基础 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
section {
    animation: fadeIn 0.8s ease-out both;
}
section > h2, section > div > h2 {
    animation: fadeInUp 0.6s ease-out both;
}
section > div > article, section > div > details {
    animation: fadeInUp 0.6s ease-out both;
    animation-fill-mode: both;
}
section > div > article:nth-child(1), section > div > details:nth-child(1) { animation-delay: 0.1s; }
section > div > article:nth-child(2), section > div > details:nth-child(2) { animation-delay: 0.2s; }
section > div > article:nth-child(3), section > div > details:nth-child(3) { animation-delay: 0.3s; }
section > div > article:nth-child(4), section > div > details:nth-child(4) { animation-delay: 0.4s; }
section > div > article:nth-child(5), section > div > details:nth-child(5) { animation-delay: 0.5s; }
section > div > article:nth-child(6), section > div > details:nth-child(6) { animation-delay: 0.6s; }
section > div > article:nth-child(7), section > div > details:nth-child(7) { animation-delay: 0.7s; }
section > div > article:nth-child(8), section > div > details:nth-child(8) { animation-delay: 0.8s; }
section > div > article:nth-child(9), section > div > details:nth-child(9) { animation-delay: 0.9s; }
section > div > article:nth-child(10), section > div > details:nth-child(10) { animation-delay: 1s; }

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 35, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: background var(--transition);
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}
nav > div:first-child a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}
nav > div:first-child a:hover {
    color: var(--accent);
    text-decoration: none;
}
nav > div:first-child svg {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow);
}
nav ul {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
nav ul li a {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
}
nav ul li a:hover, nav ul li a:focus-visible {
    color: var(--accent);
    background: var(--bg-glass);
    text-decoration: none;
}
nav ul li a[aria-current="page"] {
    color: var(--accent);
    background: var(--bg-glass);
    box-shadow: 0 0 8px var(--accent-glow);
}
#darkModeToggle, #mobileMenuToggle {
    font-size: 1.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    background: var(--bg-glass);
    transition: all var(--transition);
    color: var(--text-primary);
}
#darkModeToggle:hover, #mobileMenuToggle:hover {
    background: rgba(240, 192, 64, 0.2);
    transform: scale(1.08);
}
#mobileMenuToggle {
    display: none;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(135deg, #0a0a23 0%, #1a1a4e 40%, #2a2a6e 70%, #0a0a23 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
#hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle at 30% 40%, rgba(240, 192, 64, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}
#hero > div {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
#hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(240, 192, 64, 0.15);
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out;
}
#hero p {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
#hero div > div {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
#hero a[role="button"] {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    background: var(--accent);
    color: #0a0a23;
    transition: all var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 20px var(--accent-glow);
}
#hero a[role="button"]:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
    text-decoration: none;
}
#hero a[role="button"]:last-child {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: none;
}
#hero a[role="button"]:last-child:hover {
    background: var(--accent);
    color: #0a0a23;
}

/* Section通用 */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}
section > h2, section > div > h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--accent);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
section > h2::after, section > div > h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* About */
#about > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
#about article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
#about article:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(240, 192, 64, 0.15);
    border-color: var(--accent);
}
#about article h3 {
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}
#about article p {
    color: var(--text-secondary);
}

/* Products */
#products > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
#products article {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
#products article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #f0c040, var(--accent));
    opacity: 0.6;
}
#products article:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 40px rgba(240, 192, 64, 0.2);
    border-color: var(--accent);
}
#products article h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}
#products article p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
#products article a {
    display: inline-block;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    background: var(--accent);
    color: #0a0a23;
    font-weight: 600;
    transition: all var(--transition);
    text-decoration: none;
}
#products article a:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
    text-decoration: none;
}

/* Services */
#services > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.8rem;
}
#services article {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 1.8rem 1.5rem;
    border: 1px solid rgba(240, 192, 64, 0.1);
    transition: all var(--transition);
    text-align: center;
}
#services article:hover {
    background: rgba(240, 192, 64, 0.08);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(240, 192, 64, 0.1);
}
#services article h4 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}
#services article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Features */
#features > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}
#features article {
    background: linear-gradient(145deg, rgba(18, 18, 58, 0.8), rgba(10, 10, 35, 0.9));
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-align: center;
}
#features article:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(240, 192, 64, 0.15);
}
#features article h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
}
#features article p {
    color: var(--text-secondary);
}

/* FAQ */
#faq > div {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
#faq details {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    transition: all var(--transition);
    cursor: pointer;
}
#faq details:hover {
    border-color: var(--accent);
    background: rgba(240, 192, 64, 0.05);
}
#faq details[open] {
    border-color: var(--accent);
    background: rgba(240, 192, 64, 0.06);
    box-shadow: 0 4px 20px rgba(240, 192, 64, 0.08);
}
#faq summary {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.3rem 0;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
#faq summary::before {
    content: '▸';
    color: var(--accent);
    font-size: 1.2rem;
    transition: transform var(--transition);
}
#faq details[open] summary::before {
    transform: rotate(90deg);
}
#faq details p {
    color: var(--text-secondary);
    padding: 0.8rem 0 0.4rem 1.8rem;
    line-height: 1.7;
}

/* Contact */
#contact address {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-style: normal;
}
#contact address p {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}
#contact address a {
    color: var(--accent);
    font-weight: 500;
}
#contact address a:hover {
    color: var(--accent-hover);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 2rem;
    margin-top: 2rem;
}
footer > div {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
footer h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}
footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
footer nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    justify-content: flex-end;
}
footer nav ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.2rem 0;
    position: relative;
}
footer nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}
footer nav ul li a:hover::after {
    width: 100%;
}
footer nav ul li a:hover {
    color: var(--accent);
    text-decoration: none;
}
footer > div > div:last-child {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(240, 192, 64, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
footer > div > div:last-child a {
    color: var(--text-secondary);
    margin: 0 0.5rem;
    font-size: 0.9rem;
}
footer > div > div:last-child a:hover {
    color: var(--accent);
}

/* 响应式 - 平板及手机 */
@media (max-width: 768px) {
    nav {
        padding: 0.6rem 1rem;
    }
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 35, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        gap: 0.2rem;
    }
    nav ul.active {
        display: flex;
    }
    nav ul li a {
        padding: 0.8rem 1.5rem;
        width: 100%;
        text-align: center;
        border-radius: 0;
    }
    #mobileMenuToggle {
        display: inline-flex;
    }
    #darkModeToggle {
        margin-left: auto;
    }
    #hero {
        padding: 5rem 1rem 3rem;
    }
    section {
        padding: 3rem 1rem;
    }
    #about > div, #products > div, #services > div, #features > div {
        grid-template-columns: 1fr;
    }
    footer > div {
        grid-template-columns: 1fr;
        text-align: center;
    }
    footer nav ul {
        justify-content: center;
    }
}

/* 小手机 */
@media (max-width: 480px) {
    nav > div:first-child a {
        font-size: 1.1rem;
    }
    nav > div:first-child svg {
        width: 30px;
        height: 30px;
    }
    #hero h1 {
        font-size: 1.8rem;
    }
    #hero p {
        font-size: 0.95rem;
    }
    #hero a[role="button"] {
        padding: 0.7rem 1.6rem;
        font-size: 0.95rem;
    }
    section > h2, section > div > h2 {
        font-size: 1.5rem;
    }
    #products article, #about article, #contact address {
        padding: 1.5rem;
    }
    #faq details {
        padding: 0.6rem 1rem;
    }
}

/* 暗色模式（默认已是暗色，但保留切换逻辑） */
body.light-mode {
    --bg-primary: #f4f4fa;
    --bg-secondary: #e8e8f0;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(0, 0, 0, 0.04);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --accent: #c8962e;
    --accent-hover: #b8842a;
    --accent-glow: rgba(200, 150, 46, 0.25);
    --border: rgba(200, 150, 46, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
body.light-mode header {
    background: rgba(244, 244, 250, 0.85);
    border-bottom-color: rgba(200, 150, 46, 0.2);
}
body.light-mode #hero {
    background: linear-gradient(135deg, #e8e8f0 0%, #d4d4e8 40%, #c4c4e0 70%, #e8e8f0 100%);
}
body.light-mode #hero h1 {
    color: #1a1a2e;
    text-shadow: 0 0 20px rgba(200, 150, 46, 0.1);
}
body.light-mode #hero a[role="button"]:last-child {
    border-color: var(--accent);
    color: var(--accent);
}
body.light-mode #hero a[role="button"]:last-child:hover {
    background: var(--accent);
    color: #fff;
}
body.light-mode #about article, 
body.light-mode #products article, 
body.light-mode #contact address,
body.light-mode #faq details {
    background: var(--bg-card);
}
body.light-mode #features article {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(232, 232, 240, 0.9));
}
body.light-mode footer {
    background: var(--bg-secondary);
}