:root {
    --bg: #f7f9fc;
    --white: #ffffff;
    --text: #1f2d3d;
    --muted: #5b6b7c;
    --line: #e4e9f0;
    --primary: #1a6dff;
    --primary-dark: #0f55cc;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* 头部 */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo img { height: 38px; }
.logo-text { font-size: 22px; font-weight: 700; color: var(--primary); }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav > a, .nav-dropdown > a { padding: 8px 14px; border-radius: 8px; font-size: 15px; white-space: nowrap; }
.main-nav > a:hover, .nav-dropdown > a:hover { background: #eef4ff; color: var(--primary); }
.nav-dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 160px; box-shadow: 0 10px 30px rgba(20,40,80,.08); }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.dropdown-menu a:hover { background: #eef4ff; color: var(--primary); }
.header-actions { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 8px; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--line); background: var(--white); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.header-qq { background: #f0f5ff; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); padding: 6px 0; }
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; }

/* 主体 */
main { min-height: 60vh; }
.hero { background: linear-gradient(135deg, #eef5ff, #f9fbff); padding: 80px 0; text-align: center; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); margin-bottom: 14px; }
.hero p { color: var(--muted); max-width: 700px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.section { padding: 56px 0; }
.section h2 { font-size: 26px; margin-bottom: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }
.product-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.product-preview-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center; font-weight: 600; }
.product-preview-item:hover { border-color: var(--primary); color: var(--primary); }
.news-list { list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.news-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* 页面横幅 */
.page-banner { background: linear-gradient(135deg, #eef5ff, #f9fbff); padding: 48px 0; }
.page-banner h1 { font-size: 30px; }

/* 内容页 */
.content-page { max-width: 900px; }
.content-page h2 { margin: 28px 0 10px; font-size: 22px; }
.content-page p, .content-page li { color: #344455; margin-bottom: 10px; }
.content-page ul { padding-left: 22px; }
.product-section { max-width: 900px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.product-section:last-of-type { border-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.contact-grid > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* 文章 */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.article-card img { height: 180px; object-fit: cover; width: 100%; }
.article-card-body { padding: 16px; }
.article-card h3 { font-size: 17px; margin-bottom: 8px; }
.article-card time { color: var(--muted); font-size: 13px; }
.article-detail h1 { font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 10px; }
.article-time { color: var(--muted); font-size: 14px; display: block; margin-bottom: 18px; }
.article-cover { border-radius: var(--radius); margin-bottom: 22px; max-height: 440px; object-fit: cover; width: 100%; }
.article-content { font-size: 16px; line-height: 1.9; color: #2d3d4f; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--white); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 页脚 */
.site-footer { background: var(--white); border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 32px; padding-bottom: 32px; }
.footer-col h4 { margin-bottom: 12px; font-size: 16px; }
.footer-col p, .footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; font-size: 13px; color: var(--muted); text-align: center; }
.mobile-bottom-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--line); padding: 8px 12px; gap: 10px; z-index: 200; }
.mobile-bottom-bar .btn { flex: 1; }

/* 404 */
.error-page { text-align: center; padding: 100px 0; }
.error-page h1 { font-size: 72px; color: var(--primary); margin-bottom: 10px; }

/* 后台 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; width: min(380px, 90%); }
.login-box h1 { font-size: 22px; margin-bottom: 20px; }
.login-box label { display: block; margin-bottom: 14px; font-size: 14px; }
.login-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.login-box .btn { width: 100%; }
.error { color: #c0392b; font-size: 14px; margin-bottom: 12px; }
.admin-body { background: var(--bg); }
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--white); border-right: 1px solid var(--line); padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar h2 { font-size: 17px; margin-bottom: 20px; color: var(--primary); }
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.admin-sidebar a:hover { background: #eef4ff; color: var(--primary); }
.admin-main { flex: 1; padding: 32px; min-width: 0; }
.admin-main h1 { font-size: 24px; margin-bottom: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.admin-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.admin-card strong { font-size: 28px; }
.admin-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 860px; }
.admin-form h3 { margin: 22px 0 12px; font-size: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-form h3:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.admin-form label { display: block; margin-bottom: 14px; font-size: 14px; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form select, .admin-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; font-family: inherit; font-size: 14px; }
.admin-form textarea { resize: vertical; }
.admin-form .btn { margin-top: 10px; }
.admin-table { width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 14px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { background: #f5f8fd; font-weight: 600; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .push-status { max-width: 220px; word-break: break-all; color: var(--muted); font-size: 12px; }
.success, .notice { background: #e9f7ef; color: #1e7e45; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }

/* 手机端 */
@media (max-width: 900px) {
    .header-inner { height: 62px; gap: 12px; }
    .main-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 4%; gap: 2px; box-shadow: 0 16px 30px rgba(20,40,80,.08); }
    .main-nav.open { display: flex; }
    .nav-dropdown .dropdown-menu { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 16px; background: transparent; }
    .nav-toggle { display: block; margin-left: auto; }
    .header-actions { display: none; }
    .header-qq { display: none; }
    .hero { padding: 52px 0; }
    .section { padding: 36px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .mobile-bottom-bar { display: flex; }
    body { padding-bottom: 64px; }
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-sidebar h2 { width: 100%; margin-bottom: 8px; }
    .admin-sidebar a { padding: 8px 10px; }
    .admin-main { padding: 20px 4%; }
    .article-grid { grid-template-columns: 1fr; }
}