/* 全局重置与基础 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #0f0f1a;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* 暗色模式（默认） */
body {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.7);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent: #ff6b35;
    --accent-hover: #ff8c5a;
    --gradient-start: #1a1a2e;
    --gradient-end: #16213e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(15, 15, 26, 0.9);
    --footer-bg: #0a0a14;
}

/* 亮色模式 */
body.light-mode {
    --bg-primary: #f4f4f9;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --accent: #e65c2e;
    --accent-hover: #d94a1a;
    --gradient-start: #ffffff;
    --gradient-end: #f0f0f5;
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: #e8e8f0;
}

/* 导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.3s, border-color 0.3s;
}
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
}
nav a[aria-label="返回首页"] {
    flex-shrink: 0;
}
nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
}
nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: color 0.3s, background 0.3s;
}
nav ul li a:hover {
    color: var(--accent);
    background: var(--glass-bg);
}
#theme-toggle, #mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    color: var(--text-primary);
    background: var(--glass-bg);
}
#theme-toggle:hover, #mobile-menu-btn:hover {
    background: var(--glass-border);
    transform: scale(1.1);
}
#mobile-menu-btn {
    display: none;
}

/* 主内容 */
main {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* 通用section样式 */
section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 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; }
section:nth-child(9) { animation-delay: 0.8s; }
section:nth-child(10) { animation-delay: 0.9s; }
section:nth-child(11) { animation-delay: 1.0s; }
section:nth-child(12) { animation-delay: 1.1s; }
section:nth-child(13) { animation-delay: 1.2s; }

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

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin-top: 0.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: var(--accent-hover);
}

/* Hero区域 - 渐变Banner */
#hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 24px;
    padding: 4rem 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,107,53,0.15), transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, -20px); }
}
#hero div {
    position: relative;
    z-index: 1;
}
#hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
#hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 2rem;
}
#hero a[role="button"] {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    margin: 0.5rem;
}
#hero a[role="button"]:first-of-type {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
#hero a[role="button"]:first-of-type:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.5);
}
#hero a[role="button"]:last-of-type {
    background: var(--glass-bg);
    color: #fff;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}
#hero a[role="button"]:last-of-type:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

/* 圆角卡片通用样式 */
#about, #products, #services, #features, #advantages, #testimonials, #resources, #faq, #howto, #contact {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

/* 产品卡片 */
#products > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}
#products article {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
#products article:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    background: var(--glass-border);
}
#products article a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    background: var(--accent);
    color: #fff;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}
#products article a:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* 特色卡片网格 */
#features > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
#features article {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 1.8rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s;
}
#features article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* 列表样式 */
#services ul, #advantages ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0;
}
#services ul li, #advantages ul li {
    background: var(--glass-bg);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}
#services ul li:hover, #advantages ul li:hover {
    background: var(--glass-border);
    transform: translateX(5px);
}

/* 用户评价 */
#testimonials blockquote {
    background: var(--glass-bg);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-style: italic;
    transition: background 0.3s;
}
#testimonials blockquote:hover {
    background: var(--glass-border);
}
#testimonials blockquote p {
    margin: 0;
    color: var(--text-secondary);
}

/* 资源区域 */
#resources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}
#resources article {
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}
#resources article:hover {
    transform: translateY(-4px);
}
#resources ul {
    list-style: none;
    padding: 0;
}
#resources ul li {
    margin-bottom: 0.5rem;
}
#resources ul li a {
    color: var(--text-secondary);
    padding: 0.3rem 0;
    display: inline-block;
    transition: color 0.3s, padding-left 0.3s;
}
#resources ul li a:hover {
    color: var(--accent);
    padding-left: 8px;
}

/* FAQ details */
#faq details {
    margin-bottom: 1rem;
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--glass-border);
    transition: background 0.3s;
    cursor: pointer;
}
#faq details:hover {
    background: var(--glass-border);
}
#faq summary {
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}
#faq details p {
    margin-top: 0.8rem;
    padding-left: 0.5rem;
    color: var(--text-secondary);
}

/* HowTo 步骤 */
#howto ol {
    list-style: none;
    counter-reset: step;
    padding: 0;
}
#howto ol li {
    counter-increment: step;
    padding: 1rem 1.5rem 1rem 3rem;
    background: var(--glass-bg);
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: background 0.3s, transform 0.2s;
}
#howto ol li:hover {
    background: var(--glass-border);
    transform: translateX(5px);
}
#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* 联系 */
#contact p {
    margin-bottom: 0.5rem;
}
#contact a {
    color: var(--accent);
    font-weight: 500;
}

/* 页脚 */
footer {
    background: var(--footer-bg);
    padding: 2rem 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--glass-border);
}
footer > div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
footer p {
    color: var(--text-secondary);
    margin: 0;
}
footer nav a {
    color: var(--text-secondary);
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}
footer nav a:hover {
    color: var(--accent);
}

/* 响应式布局 */
@media (max-width: 768px) {
    nav {
        padding: 0.5rem 1rem;
    }
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--nav-bg);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid var(--glass-border);
    }
    nav ul.open {
        display: flex;
    }
    #mobile-menu-btn {
        display: block;
    }
    #theme-toggle {
        order: 1;
    }
    #mobile-menu-btn {
        order: 2;
    }
    main {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #hero {
        min-height: 40vh;
        padding: 2rem 1rem;
    }
    #hero h1 {
        font-size: 2rem;
    }
    #hero p {
        font-size: 1rem;
    }
    #hero a[role="button"] {
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
    }
    section {
        padding: 1.5rem !important;
        margin-bottom: 2rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    #products > div, #features > div {
        grid-template-columns: 1fr;
    }
    #services ul, #advantages ul {
        grid-template-columns: 1fr;
    }
    #resources {
        grid-template-columns: 1fr;
    }
    footer > div {
        flex-direction: column;
        text-align: center;
    }
    footer nav a {
        margin: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 1.6rem;
    }
    #hero p {
        font-size: 0.9rem;
    }
    nav ul li a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

/* 暗色模式切换动画 */
#theme-toggle {
    transition: transform 0.3s, background 0.3s;
}

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