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

:root {
    --primary: #ff7e5f;
    --primary-dark: #e0684a;
    --secondary: #feb47b;
    --bg: #ffffff;
    --bg-alt: #f7f8fa;
    --text: #1a1a2e;
    --text-light: #555;
    --card-bg: rgba(255,255,255,0.85);
    --card-shadow: 0 8px 32px rgba(0,0,0,0.08);
    --glass-bg: rgba(255,255,255,0.6);
    --glass-border: rgba(255,255,255,0.3);
    --nav-bg: rgba(255,255,255,0.95);
    --footer-bg: #1a1a2e;
    --footer-text: #ccc;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode {
    --bg: #121212;
    --bg-alt: #1e1e2e;
    --text: #e0e0e0;
    --text-light: #aaa;
    --card-bg: rgba(30,30,46,0.85);
    --card-shadow: 0 8px 32px rgba(0,0,0,0.5);
    --glass-bg: rgba(30,30,46,0.6);
    --glass-border: rgba(255,255,255,0.1);
    --nav-bg: rgba(18,18,18,0.95);
    --footer-bg: #0a0a12;
    --footer-text: #888;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

h1, h2, h3, h4 {
    line-height: 1.3;
    font-weight: 700;
}

/* 导航栏 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background var(--transition);
}

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

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    width: 120px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu li a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.nav-menu li a:hover {
    background: var(--primary);
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition), transform var(--transition);
    color: var(--text);
    line-height: 1;
}

.nav-actions button:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

.dark-mode .nav-actions button:hover {
    background: rgba(255,255,255,0.1);
}

.menu-toggle {
    display: none;
}

.search-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

.search-box.visible {
    max-height: 64px;
    padding: 12px 20px;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* 面包屑 */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

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

/* Hero Banner */
.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0 auto;
    max-width: 1200px;
}

.hero-banner img {
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
    display: block;
    animation: fadeInUp 0.8s ease;
}

/* 通用section */
main section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

main section:nth-child(1) { animation-delay: 0.1s; }
main section:nth-child(2) { animation-delay: 0.2s; }
main section:nth-child(3) { animation-delay: 0.3s; }
main section:nth-child(4) { animation-delay: 0.4s; }
main section:nth-child(5) { animation-delay: 0.5s; }
main section:nth-child(6) { animation-delay: 0.6s; }
main section:nth-child(7) { animation-delay: 0.7s; }
main section:nth-child(8) { animation-delay: 0.8s; }
main section:nth-child(9) { animation-delay: 0.9s; }
main section:nth-child(10) { animation-delay: 1.0s; }
main section:nth-child(11) { animation-delay: 1.1s; }
main section:nth-child(12) { animation-delay: 1.2s; }
main section:nth-child(13) { animation-delay: 1.3s; }
main section:nth-child(14) { animation-delay: 1.4s; }
main section:nth-child(15) { animation-delay: 1.5s; }

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

section h1, section h2 {
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    margin-top: 8px;
}

section p {
    color: var(--text-light);
    max-width: 800px;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid var(--glass-border);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    padding: 16px 20px 0;
    font-size: 1.2rem;
}

.card p {
    padding: 8px 20px 20px;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* 列表样式 */
.advantages ul, .hot-recommend ul, .related-recommendations ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.advantages li, .hot-recommend li, .related-recommendations li {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, background 0.3s ease;
}

.advantages li:hover, .hot-recommend li:hover, .related-recommendations li:hover {
    transform: translateX(6px);
    background: rgba(255,126,95,0.1);
}

.advantages li strong {
    color: var(--primary);
}

.hot-recommend a, .related-recommendations a {
    display: block;
    color: var(--text);
    font-weight: 500;
}

.hot-recommend a:hover, .related-recommendations a:hover {
    color: var(--primary);
}

/* FAQ 样式 */
.faq div[itemscope] {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.faq div[itemscope]:hover {
    transform: translateX(6px);
}

.faq h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.faq p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* HowTo 步骤 */
.howto ol {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.howto li {
    counter-increment: step;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    position: relative;
    transition: transform 0.3s ease;
}

.howto li::before {
    content: counter(step);
    position: absolute;
    top: -12px;
    left: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.howto li:hover {
    transform: translateY(-4px);
}

/* 案例与新闻文章 */
.cases article, .news article, .latest-articles article {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases article:hover, .news article:hover, .latest-articles article:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cases h3, .news h3, .latest-articles h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

/* 最新更新 */
.latest-updates p {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

/* 联系 */
.contact p {
    margin-bottom: 6px;
    font-size: 1rem;
}

/* 侧边栏 */
aside {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    margin-top: 20px;
}

aside h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--primary);
}

aside p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 页脚 */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 20px 24px;
    text-align: center;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--footer-text);
    font-size: 14px;
    transition: color var(--transition);
}

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

.footer-qrcode {
    display: inline-block;
    margin: 0 16px 16px;
    text-align: center;
}

.footer-qrcode img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: #fff;
    padding: 4px;
}

.footer-qrcode p {
    font-size: 13px;
    color: var(--footer-text);
}

.icp, .copyright {
    font-size: 13px;
    margin-top: 8px;
    color: var(--footer-text);
}

footer p a {
    color: var(--footer-text);
}

footer p a:hover {
    color: var(--primary);
}

/* 返回顶部 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,126,95,0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    z-index: 999;
    display: none;
}

#back-to-top.show {
    opacity: 1;
    transform: scale(1);
    display: block;
}

#back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(255,126,95,0.6);
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 20px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.4s ease;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu li a {
        padding: 12px 16px;
        font-size: 16px;
        display: block;
        border-radius: 8px;
    }

    .menu-toggle {
        display: block;
    }

    .hero-banner img {
        min-height: 200px;
    }

    main section {
        padding: 40px 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .advantages ul, .hot-recommend ul, .related-recommendations ul, .howto ol {
        grid-template-columns: 1fr;
    }

    aside {
        grid-template-columns: 1fr 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 6px;
    }

    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

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

    .logo img {
        width: 100px;
        height: 34px;
    }

    .nav-actions button {
        font-size: 18px;
        padding: 6px;
    }

    aside {
        grid-template-columns: 1fr;
    }

    .search-box input {
        font-size: 14px;
    }
}

/* 暗色模式额外调整 */
.dark-mode .card {
    border-color: rgba(255,255,255,0.08);
}

.dark-mode .search-box input {
    border-color: #333;
    background: #1e1e2e;
    color: #e0e0e0;
}

.dark-mode .search-box input:focus {
    border-color: var(--primary);
}

.dark-mode .nav-menu {
    background: var(--nav-bg);
}

.dark-mode .breadcrumb a {
    color: #aaa;
}

.dark-mode .hero-banner img {
    filter: brightness(0.9);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

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

/* 选中文本 */
::selection {
    background: var(--primary);
    color: #fff;
}