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

:root {
    --bg-primary: #0d0d1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f5;
    --text-secondary: #b0b0c0;
    --accent-primary: #ff6b35;
    --accent-secondary: #f7c948;
    --accent-gradient: linear-gradient(135deg, #ff6b35, #f7c948);
    --border-glass: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-card: 16px;
    --radius-sm: 8px;
    --transition-base: 0.3s ease;
    --font-sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --max-width: 1200px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* 容器 */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 头部导航 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 20px;
    transition: var(--transition-base);
}

header:hover {
    background: rgba(13, 13, 26, 0.95);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

nav > a {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: 1px;
    transition: opacity var(--transition-base);
}

nav > a:hover {
    opacity: 0.85;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

nav ul::-webkit-scrollbar {
    display: none;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width var(--transition-base);
}

nav ul li a:hover,
nav ul li a:focus {
    color: var(--text-primary);
    background: var(--bg-glass);
}

nav ul li a:hover::after {
    width: 60%;
}

/* ===== Hero 区域 (渐变Banner) ===== */
#hero {
    margin-top: 64px;
    padding: 100px 20px 80px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 0 0 40px 40px;
    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) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(247, 201, 72, 0.1) 0%, transparent 50%);
    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 h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    line-height: 1.2;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

#hero a {
    display: inline-block;
    padding: 14px 40px;
    background: var(--accent-gradient);
    color: #0d0d1a;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all var(--transition-base);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

#hero a:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
}

/* ===== 通用章节样式 ===== */
section {
    padding: 70px 0;
    scroll-margin-top: 80px;
}

section h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 4px;
}

section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 800px;
}

/* ===== 圆角卡片 & 毛玻璃效果 ===== */
article, blockquote, #services ul, #features ul, #benefits ul, #workflow ol, #case-studies article, #knowledge article, #faq details, #contact ul {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

article:hover, blockquote:hover, details:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 107, 53, 0.3);
}

article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ===== 列表样式 ===== */
ul, ol {
    padding-left: 20px;
    color: var(--text-secondary);
}

li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* ===== FAQ 折叠面板 ===== */
details {
    cursor: pointer;
    padding: 16px 24px;
}

details summary {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

details summary::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform var(--transition-base);
    color: var(--accent-primary);
}

details[open] summary::before {
    transform: rotate(90deg);
}

details p {
    margin-top: 12px;
    padding-left: 24px;
    color: var(--text-secondary);
}

/* ===== 评价块引用 ===== */
blockquote {
    font-style: italic;
    border-left: 4px solid var(--accent-primary);
    padding: 20px 24px;
}

blockquote p {
    margin-bottom: 0;
}

/* ===== 知识中心链接 ===== */
#knowledge article a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

#knowledge article a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ===== 使用指南 ===== */
#howto ol {
    padding-left: 24px;
}

#howto ol li {
    margin-bottom: 14px;
    line-height: 1.7;
}

#howto ol li strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ===== 联系方式 ===== */
#contact ul {
    list-style: none;
    padding-left: 0;
}

#contact ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-glass);
}

#contact ul li:last-child {
    border-bottom: none;
}

/* ===== 页脚 ===== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: 40px 20px;
    margin-top: 40px;
    text-align: center;
}

footer nav ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

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

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

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

footer a {
    color: var(--accent-secondary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== 滚动动画 (使用Intersection Observer的备用方案: 通过CSS动画) ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* 依次延迟动画 (简化处理，实际项目中可用JS控制) */
#about { animation-delay: 0.1s; }
#company { animation-delay: 0.15s; }
#products { animation-delay: 0.2s; }
#services { animation-delay: 0.25s; }
#solutions { animation-delay: 0.3s; }
#industries { animation-delay: 0.35s; }
#features { animation-delay: 0.4s; }
#benefits { animation-delay: 0.45s; }
#workflow { animation-delay: 0.5s; }
#case-studies { animation-delay: 0.55s; }
#testimonials { animation-delay: 0.6s; }
#knowledge { animation-delay: 0.65s; }
#faq { animation-delay: 0.7s; }
#howto { animation-delay: 0.75s; }
#contact { animation-delay: 0.8s; }

/* ===== 响应式布局 ===== */
@media (max-width: 1024px) {
    nav ul {
        gap: 4px;
    }
    nav ul li a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    header {
        padding: 0 12px;
    }

    nav {
        height: 56px;
    }

    nav > a {
        font-size: 1.2rem;
    }

    nav ul {
        gap: 2px;
    }

    nav ul li a {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    #hero {
        padding: 80px 16px 60px;
        margin-top: 56px;
        border-radius: 0 0 24px 24px;
    }

    #hero h1 {
        font-size: 1.8rem;
    }

    #hero p {
        font-size: 0.95rem;
    }

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

    section {
        padding: 50px 0;
    }

    section h2 {
        font-size: 1.4rem;
    }

    article, blockquote, #services ul, #features ul, #benefits ul, #workflow ol, #case-studies article, #knowledge article, #faq details, #contact ul {
        padding: 18px;
    }

    footer {
        padding: 30px 16px;
    }

    footer nav ul {
        gap: 12px;
    }

    /* 隐藏部分导航链接以节省空间 (移动端显示核心链接) */
    nav ul li:nth-child(n+6) {
        display: none;
    }
}

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

    #hero {
        padding: 70px 12px 50px;
    }

    #hero h1 {
        font-size: 1.5rem;
    }

    section h2 {
        font-size: 1.2rem;
    }

    article h3 {
        font-size: 1.05rem;
    }

    details summary {
        font-size: 0.9rem;
    }

    nav ul li a {
        font-size: 0.7rem;
        padding: 4px 6px;
    }

    nav > a {
        font-size: 1rem;
    }
}

/* ===== 暗色模式 (默认已是暗色，但保留额外支持) ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f5fa;
        --bg-secondary: #e8e8f0;
        --bg-card: rgba(255, 255, 255, 0.85);
        --text-primary: #1a1a2e;
        --text-secondary: #4a4a5a;
        --border-glass: rgba(0, 0, 0, 0.1);
        --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    header {
        background: rgba(245, 245, 250, 0.85);
    }

    #hero {
        background: linear-gradient(135deg, #e8e8f0 0%, #d4d4e0 50%, #c0c0d0 100%);
    }

    #hero h1 {
        -webkit-text-fill-color: #ff6b35;
        background: none;
        color: #ff6b35;
    }

    #hero p {
        color: #4a4a5a;
    }

    #hero a {
        color: #fff;
    }

    nav ul li a {
        color: #4a4a5a;
    }

    nav ul li a:hover {
        color: #1a1a2e;
        background: rgba(0,0,0,0.05);
    }

    section p, ul, ol, li {
        color: #4a4a5a;
    }

    details p {
        color: #4a4a5a;
    }

    footer {
        background: #e8e8f0;
    }

    footer p, footer nav ul li a {
        color: #4a4a5a;
    }
}

/* ===== 辅助功能 ===== */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ===== 打印样式 ===== */
@media print {
    header {
        position: static;
        background: none;
        border: none;
    }
    #hero::before {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    section {
        animation: none;
        opacity: 1;
    }
}