:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
    padding-bottom: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* 按钮 */
.btn {
    display: inline-block; padding: 8px 20px; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; cursor: pointer; border: none;
    transition: all .2s; text-align: center; line-height: 1.5;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 12px 32px; font-size: 16px; }

/* 头部 */
.site-header {
    background: var(--white); box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 70px;
}
.logo { font-size: 24px; font-weight: 700; color: var(--primary); }
.logo-text { letter-spacing: -0.5px; }
.logo img { display: block; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block; padding: 8px 14px; color: var(--text);
    font-size: 15px; border-radius: 6px; transition: all .2s;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active { color: var(--primary); background: var(--primary-light); }

/* --- 子菜单样式开始 --- */
.submenu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--white); box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-radius: var(--radius); padding: 8px 0; min-width: 180px; list-style: none;
    z-index: 100;
}

/* 电脑端（PC）：使用 !important 强制覆盖行内样式，确保鼠标移开绝对隐藏 */
@media (min-width: 769px) {
    .has-submenu .submenu {
        display: none !important; 
    }
    .has-submenu:hover .submenu {
        display: block !important;
    }
    /* 隐形桥梁，防止鼠标移入子菜单时因缝隙消失 */
    .submenu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        width: 100%;
        height: 10px;
    }
}

.submenu li a { display: block; padding: 8px 20px; color: var(--text); font-size: 14px; white-space: nowrap; }
.submenu li a:hover { background: var(--primary-light); color: var(--primary); }
/* --- 子菜单样式结束 --- */

.header-actions { display: flex; align-items: center; gap: 10px; }
.qq-contact { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.header-actions { flex-wrap: wrap; }
.qq-contact { width: 100%; text-align: right; margin-top: 2px; }

.mobile-toggle {
    display: none; background: none; border: none; font-size: 24px;
    color: var(--text); cursor: pointer;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 50%, #e0e7ff 100%);
    padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 42px; color: var(--text); margin-bottom: 16px; font-weight: 700; }
.hero p { font-size: 18px; color: var(--text-light); max-width: 700px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    display: flex; justify-content: center; gap: 60px; margin-top: 50px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 36px; font-weight: 700; color: var(--primary); }
.hero-stat .label { font-size: 14px; color: var(--text-light); }

/* Section */
.section { padding: 70px 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* 产品卡片 */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--white); border-radius: var(--radius); padding: 32px 28px;
    box-shadow: var(--shadow); transition: all .3s; border: 1px solid var(--border);
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.product-icon { font-size: 40px; margin-bottom: 16px; }
.product-card h3 { font-size: 20px; margin-bottom: 10px; }
.product-card p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.product-card ul { list-style: none; }
.product-card ul li {
    font-size: 13px; color: var(--text-light); padding: 4px 0;
    padding-left: 18px; position: relative;
}
.product-card ul li::before {
    content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700;
}

/* 内容页面 */
.page-hero {
    background: linear-gradient(135deg, #dbeafe, #f0f9ff);
    padding: 60px 0; text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 10px; }
.page-hero p { color: var(--text-light); font-size: 16px; }

.content-block {
    background: var(--white); border-radius: var(--radius);
    padding: 40px; box-shadow: var(--shadow); margin-bottom: 30px;
}
.content-block h2 { font-size: 24px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.content-block h3 { font-size: 18px; margin: 24px 0 12px; }
.content-block p { margin-bottom: 14px; color: var(--text); }
.content-block ul, .content-block ol { margin: 12px 0 18px 24px; }
.content-block li { margin-bottom: 6px; }

/* 文章列表 */
.article-list { display: grid; gap: 24px; }
.article-item {
    background: var(--white); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow); display: flex; gap: 24px;
    border: 1px solid var(--border);
}
.article-item img { width: 200px; height: 140px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.article-item .article-info { flex: 1; }
.article-item h3 { font-size: 18px; margin-bottom: 8px; }
.article-item h3 a { color: var(--text); }
.article-item h3 a:hover { color: var(--primary); }
.article-item .meta { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.article-item .desc { font-size: 14px; color: var(--text-light); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-block; padding: 8px 14px; border-radius: 6px;
    font-size: 14px; border: 1px solid var(--border); background: var(--white);
}
.pagination a:hover { background: var(--primary-light); border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.data-table tr:hover td { background: #f1f5f9; }

/* 底部 */
.site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h4 { font-size: 16px; margin-bottom: 16px; color: var(--text); }
.footer-col p, .footer-col li { font-size: 14px; color: var(--text-light); line-height: 2; }
.footer-col ul { list-style: none; }
.footer-col a { color: var(--text-light); }
.footer-col a:hover { color: var(--primary); }
.footer-qq { color: var(--primary) !important; font-weight: 500; }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; font-size: 13px; color: var(--text-light); }

/* 手机端底部固定按钮 */
.mobile-bottom-bar { display: none; }

/* 响应式 */
@media (max-width: 768px) {
    body { padding-bottom: 64px; }
    
    .header-inner { height: 60px; }
    .main-nav {
        display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
        background: var(--white); z-index: 999; overflow-y: auto; padding: 16px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav > ul > li > a { padding: 14px 16px; border-radius: 0; border-bottom: 1px solid var(--border); }
    
    /* 手机端：子菜单默认隐藏，由 JS 控制展开，不能加 !important，否则 JS 无法覆盖 */
    .submenu {
        position: static; 
        display: none; 
        box-shadow: none;
        padding-left: 20px; 
        border-left: 2px solid var(--primary-light); 
        margin-left: 16px;
    }
    
    .header-actions { display: none; }
    .mobile-toggle { display: block; }
    
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .hero-stats { gap: 30px; }
    .hero-stat .num { font-size: 26px; }
    
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 24px; }
    .product-grid { grid-template-columns: 1fr; }
    .content-block { padding: 24px; }
    .article-item { flex-direction: column; }
    .article-item img { width: 100%; height: 180px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .page-hero h1 { font-size: 26px; }
    
    .mobile-bottom-bar {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--white); box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
        z-index: 1001; padding: 8px 16px; gap: 12px;
    }
    .mobile-btn {
        flex: 1; text-align: center; padding: 12px; border-radius: var(--radius);
        font-size: 15px; font-weight: 600;
    }
    .mobile-btn-primary { background: var(--primary); color: #fff; }
    .mobile-btn-outline { background: var(--white); color: var(--primary); border: 1px solid var(--primary); }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}