/* ===== 全局重置 & 基础 ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}
a {
    transition: color 0.3s;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== 暗色模式 (全局, 通过body class控制) ===== */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}
body.dark-mode header,
body.dark-mode footer {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
}
body.dark-mode section,
body.dark-mode article,
body.dark-mode .card,
body.dark-mode details,
body.dark-mode blockquote,
body.dark-mode .contact-box,
body.dark-mode .howto-box,
body.dark-mode .news-item {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
    color: #f0f0f0 !important;
}
body.dark-mode p, body.dark-mode li, body.dark-mode summary, body.dark-mode time {
    color: #ccc !important;
}
body.dark-mode a {
    color: #ff6b81 !important;
}
body.dark-mode input, body.dark-mode button {
    background: #2a2a2a !important;
    color: #eee !important;
    border-color: #444 !important;
}
body.dark-mode .banner {
    background: linear-gradient(135deg, #2a1a3e, #1a1a2e) !important;
}
body.dark-mode .glass {
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ===== 滚动动画 (利用IntersectionObserver, 默认隐藏, 进入视图渐入) ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 毛玻璃效果 (通用) ===== */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ===== 圆角卡片 (通用) ===== */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* ===== 渐变Banner ===== */
.banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 60px 40px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.banner h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.banner p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 24px;
    opacity: 0.9;
}
.banner .btn-primary {
    display: inline-block;
    background: #e94560;
    color: #fff;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}
.banner .btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.6);
    background: #d63851;
}

/* ===== 头部导航 (sticky) ===== */
#header {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
#header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
#header .logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
#header .logo-area h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}
#header nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
#header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
    position: relative;
    transition: color 0.3s;
}
#header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: width 0.3s;
}
#header nav ul li a:hover {
    color: #e94560;
}
#header nav ul li a:hover::after {
    width: 100%;
}
#header .search-form {
    display: flex;
    gap: 6px;
}
#header .search-form input {
    padding: 8px 14px;
    border-radius: 50px;
    border: none;
    width: 180px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.9rem;
    transition: background 0.3s, width 0.3s;
}
#header .search-form input:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    width: 220px;
}
#header .search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}
#header .search-form button {
    padding: 8px 18px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}
#header .search-form button:hover {
    background: #d63851;
    transform: scale(0.96);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #888;
}
.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.breadcrumb ol li a {
    color: #e94560;
    text-decoration: none;
}
.breadcrumb ol li a:hover {
    text-decoration: underline;
}

/* ===== 通用section标题 ===== */
.section-title {
    font-size: 1.8rem;
    color: #1a1a2e;
    border-bottom: 3px solid #e94560;
    padding-bottom: 12px;
    margin-bottom: 28px;
    font-weight: 700;
    position: relative;
}
.section-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #e94560;
}

/* ===== 产品网格 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.product-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #e94560;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
}
.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}
.product-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* ===== 优势列表 ===== */
.advantage-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.advantage-list li {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s, transform 0.2s;
    border-left: 4px solid #e94560;
}
.advantage-list li:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}
.advantage-list li strong {
    color: #e94560;
}

/* ===== 解决方案 / 应用 / 案例 卡片 ===== */
.solution-grid, .case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.solution-card, .case-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.solution-card:hover, .case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-color: #e94560;
}
.solution-card h3, .case-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}
.solution-card p, .case-card p {
    font-size: 0.9rem;
    color: #555;
}

/* ===== 客户评价 (blockquote) ===== */
blockquote.customer-review {
    background: #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid #e94560;
    margin: 0;
    transition: background 0.3s, transform 0.2s;
}
blockquote.customer-review:hover {
    background: #e8e8e8;
    transform: scale(1.01);
}
blockquote.customer-review p {
    font-size: 0.95rem;
    color: #444;
    font-style: italic;
}
blockquote.customer-review footer {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #888;
}

/* ===== 新闻网格 ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.news-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.news-item h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: #1a1a2e;
}
.news-item time {
    font-size: 0.8rem;
    color: #aaa;
    display: block;
    margin-bottom: 10px;
}
.news-item p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}
.news-item a {
    color: #e94560;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}
.news-item a:hover {
    text-decoration: underline;
}

/* ===== FAQ (details) ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.2s;
}
.faq-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.faq-item summary {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: #e94560;
    transition: transform 0.3s;
}
.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
.faq-item p {
    font-size: 0.9rem;
    color: #555;
    margin-top: 12px;
    line-height: 1.7;
}

/* ===== HowTo 教程 ===== */
.howto-box {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 28px;
}
.howto-box h3 {
    font-size: 1.2rem;
    color: #1a1a2e;
    margin: 20px 0 10px;
}
.howto-box h3:first-child {
    margin-top: 0;
}
.howto-box ul, .howto-box ol {
    padding-left: 20px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
}
.howto-box p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
}

/* ===== 联系信息 ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.contact-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
}
.contact-item:hover {
    transform: translateY(-4px);
    background: #f0f0f0;
}
.contact-item h3 {
    font-size: 1rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.contact-item p {
    font-size: 0.9rem;
    color: #555;
}

/* ===== 友情链接 ===== */
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.friend-links a {
    color: #555;
    text-decoration: none;
    padding: 6px 16px;
    background: #f0f0f0;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}
.friend-links a:hover {
    background: #e94560;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
footer {
    background: #1a1a2e;
    color: #fff;
    padding: 32px 20px;
    text-align: center;
}
footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
footer .footer-links a {
    color: #e94560;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}
footer .footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}
footer p {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}

/* ===== 返回顶部按钮 ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e94560;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    border: none;
    outline: none;
}
#backToTop:hover {
    transform: scale(1.1);
    background: #d63851;
    box-shadow: 0 6px 20px rgba(233,69,96,0.5);
}

/* ===== 暗黑模式切换按钮 (固定) ===== */
#darkModeToggle {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 999;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#darkModeToggle:hover {
    transform: scale(1.1);
    background: #d63851;
}

/* ===== 响应式布局 (Mobile First) ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    #header .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    #header .logo-area {
        justify-content: center;
    }
    #header nav ul {
        justify-content: center;
        gap: 12px;
    }
    #header .search-form {
        justify-content: center;
    }
    #header .search-form input {
        width: 140px;
    }
    #header .search-form input:focus {
        width: 160px;
    }
    .banner {
        padding: 40px 20px;
    }
    .banner h2 {
        font-size: 1.6rem;
    }
    .banner p {
        font-size: 0.95rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
    .advantage-list {
        grid-template-columns: 1fr;
    }
    .solution-grid, .case-grid, .news-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .faq-item summary {
        font-size: 0.95rem;
    }
    #darkModeToggle {
        top: 70px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .banner h2 {
        font-size: 1.3rem;
    }
    .banner .btn-primary {
        padding: 12px 28px;
        font-size: 1rem;
    }
    #header nav ul {
        gap: 8px;
    }
    #header nav ul li a {
        font-size: 0.85rem;
    }
}

/* ===== 辅助类 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.text-center {
    text-align: center;
}
.mt-20 {
    margin-top: 20px;
}
.mb-20 {
    margin-bottom: 20px;
}
.mb-40 {
    margin-bottom: 40px;
}
.p-20 {
    padding: 20px;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gap-10 {
    gap: 10px;
}
.gap-20 {
    gap: 20px;
}