/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f6fa; color: #2d3436; line-height: 1.6;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Header ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee; z-index: 100;
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 700; color: #2d3436; }
.nav { display: flex; gap: 8px; }
.nav-link {
    padding: 6px 16px; border-radius: 20px; font-size: 14px;
    color: #636e72; transition: all 0.2s; cursor: pointer;
}
.nav-link:hover, .nav-link.active { background: #e8f4fd; color: #0984e3; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: #f0f0f0; display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: all 0.2s;
    color: #636e72;
}
.user-avatar:hover { background: #e8f4fd; color: #0984e3; }

/* ===== Sections ===== */
.section {
    max-width: 1200px; margin: 0 auto; padding: 80px 20px 60px;
}
.section:first-of-type { padding-top: 100px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; color: #2d3436; margin-bottom: 8px; }
.section-desc { color: #636e72; font-size: 15px; }

/* ===== Article List ===== */
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.article-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); cursor: pointer;
    transition: all 0.3s; display: flex; flex-direction: column;
}
.article-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}
.article-cover {
    width: 100%; height: 180px; object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.article-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-tag {
    display: inline-block; padding: 2px 10px; border-radius: 10px;
    font-size: 12px; font-weight: 500; margin-bottom: 8px; width: fit-content;
}
.article-card:nth-child(3n+1) .article-tag { background: #ffeaa7; color: #d68910; }
.article-card:nth-child(3n+2) .article-tag { background: #dfe6e9; color: #636e72; }
.article-card:nth-child(3n+3) .article-tag { background: #fab1a0; color: #c0392b; }
.article-title {
    font-size: 17px; font-weight: 600; color: #2d3436;
    margin-bottom: 8px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-summary {
    font-size: 14px; color: #636e72; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px;
}
.article-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: #b2bec3; padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.article-lock { color: #e74c3c; display: flex; align-items: center; gap: 4px; }
.article-open { color: #00b894; display: flex; align-items: center; gap: 4px; }

/* ===== Products Grid ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card {
    background: #fff; border-radius: 12px; padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s; text-align: center;
    display: flex; flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}
.product-icon { font-size: 40px; margin-bottom: 16px; }
.product-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #2d3436; }
.product-price { font-size: 28px; font-weight: 700; color: #e74c3c; margin-bottom: 4px; }
.product-price-unit { font-size: 14px; color: #636e72; font-weight: 400; }
.product-desc { font-size: 14px; color: #636e72; margin-bottom: 16px; flex: 1; }
.product-includes { text-align: left; }
.product-includes h5 {
    font-size: 13px; color: #2d3436; margin-bottom: 8px; font-weight: 600;
}
.product-includes ul { padding: 0; }
.product-includes li {
    font-size: 13px; color: #636e72; padding: 4px 0;
    display: flex; align-items: center; gap: 6px;
}
.product-includes li::before {
    content: ''; display: inline-block; width: 6px; height: 6px;
    background: #00b894; border-radius: 50%; flex-shrink: 0;
}
.product-card.featured {
    border: 2px solid #0984e3; position: relative;
}
.product-card.featured::after {
    content: '热门'; position: absolute; top: 12px; right: 12px;
    background: #e74c3c; color: #fff; font-size: 11px;
    padding: 2px 10px; border-radius: 10px; font-weight: 600;
}

/* ===== Service Content ===== */
.service-content { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.service-card {
    background: #fff; border-radius: 12px; padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.service-card h3 {
    font-size: 18px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.service-card h3 .icon { font-size: 24px; }
.service-card ul li {
    padding: 8px 0; font-size: 14px; color: #636e72;
    display: flex; align-items: flex-start; gap: 8px;
    border-bottom: 1px solid #f5f5f5;
}
.service-card ul li:last-child { border-bottom: none; }
.service-card ul li .dot {
    display: inline-block; width: 6px; height: 6px;
    background: #0984e3; border-radius: 50%; margin-top: 8px; flex-shrink: 0;
}
.service-card ul li .dot.green { background: #00b894; }
.service-card ul li .dot.orange { background: #fdcb6e; }

/* ===== Modal ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 200;
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: 16px; max-width: 680px;
    width: 90%; max-height: 85vh; overflow-y: auto;
    animation: modalIn 0.3s ease;
}
.modal-payment { max-width: 800px; }
.modal-profile { max-width: 400px; }
.modal-wechat { max-width: 400px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: sticky; top: 0; float: right; margin: 12px 12px 0 0;
    width: 32px; height: 32px; border: none; background: #f0f0f0;
    border-radius: 50%; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #636e72; transition: all 0.2s; z-index: 1;
}
.modal-close:hover { background: #e74c3c; color: #fff; }
.modal-body { padding: 24px; }

/* ===== Article Detail in Modal ===== */
.article-detail { line-height: 1.8; }
.article-detail h2 { font-size: 24px; margin-bottom: 12px; }
.article-detail .meta { color: #636e72; font-size: 14px; margin-bottom: 20px; }
.article-detail .content { color: #2d3436; font-size: 15px; }
.article-detail .content p { margin-bottom: 16px; }
.article-detail .content h3 { font-size: 18px; margin: 24px 0 12px; color: #2d3436; }
.article-detail .content ul { margin-bottom: 16px; padding-left: 20px; }
.article-detail .content ul li { list-style: disc; margin-bottom: 6px; color: #555; }

/* ===== Payment ===== */
.payment-header { text-align: center; margin-bottom: 28px; }
.payment-lock { margin-bottom: 12px; }
.payment-header h3 { font-size: 22px; margin-bottom: 6px; }
.payment-desc { color: #636e72; font-size: 14px; }
.payment-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-card {
    background: #fafafa; border: 1px solid #eee; border-radius: 12px;
    padding: 24px 16px; text-align: center; position: relative;
    transition: all 0.3s;
}
.plan-card:hover {
    border-color: #0984e3; box-shadow: 0 4px 16px rgba(9,132,227,0.15);
    transform: translateY(-2px);
}
.plan-recommended {
    border-color: #0984e3; background: #f0f7ff;
}
.plan-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #0984e3; color: #fff; font-size: 11px; font-weight: 600;
    padding: 2px 14px; border-radius: 10px;
}
.plan-card h4 { font-size: 16px; margin-bottom: 12px; color: #2d3436; }
.plan-price { font-size: 32px; font-weight: 700; color: #e74c3c; margin-bottom: 16px; }
.plan-currency { font-size: 20px; }
.plan-unit { font-size: 14px; color: #636e72; font-weight: 400; }
.plan-features { text-align: left; margin-bottom: 20px; }
.plan-features li {
    font-size: 13px; color: #636e72; padding: 5px 0;
    display: flex; align-items: center; gap: 6px;
}
.plan-features li::before {
    content: '✓'; color: #00b894; font-weight: 700;
}
.btn-pay {
    width: 100%; padding: 10px; border: none; border-radius: 8px;
    background: #07c160; color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-pay:hover { background: #06ad56; }
.wechat-pay-hint {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 20px; font-size: 13px; color: #636e72;
}

/* ===== WeChat QR Modal ===== */
.wechat-body { text-align: center; }
.wechat-body h3 { margin-bottom: 20px; font-size: 18px; }
.qr-inner { padding: 20px 0; }
.qr-inner p { color: #636e72; margin: 8px 0; font-size: 14px; }
.qr-amount { font-size: 28px; font-weight: 700; color: #e74c3c; }
.qr-code-box {
    width: 200px; height: 200px; margin: 16px auto;
    background: #fff; border: 2px solid #f0f0f0;
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; overflow: hidden;
}
.qr-code-box canvas, .qr-code-box img { width: 100%; height: 100%; }
.wechat-footer { margin-top: 16px; }

/* ===== Buttons ===== */
.btn {
    padding: 10px 24px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: inline-block;
}
.btn-primary { background: #0984e3; color: #fff; }
.btn-primary:hover { background: #0773c5; }
.btn-secondary { background: #f0f0f0; color: #2d3436; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-block { width: 100%; }

/* ===== Profile Modal ===== */
.profile-header { text-align: center; margin-bottom: 24px; }
.profile-avatar-large { margin-bottom: 12px; }
.profile-header h3 { font-size: 18px; margin-bottom: 4px; }
.profile-level { font-size: 13px; color: #0984e3; }
.profile-info { margin-bottom: 20px; }
.info-item {
    display: flex; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.info-item:last-child { border-bottom: none; }
.info-item span:first-child { color: #636e72; }
.info-item span:last-child { color: #2d3436; font-weight: 500; }

/* ===== Toast ===== */
.toast {
    display: none; position: fixed; bottom: 40px; left: 50%;
    transform: translateX(-50%); background: #00b894; color: #fff;
    padding: 14px 32px; border-radius: 10px; font-size: 15px; font-weight: 500;
    z-index: 300; box-shadow: 0 4px 16px rgba(0,184,148,0.4);
    animation: toastIn 0.3s ease;
}
.toast.show { display: block; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ccc; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav { display: none; }
    .article-list { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .service-content { grid-template-columns: 1fr; }
    .payment-plans { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 22px; }
    .plan-card { max-width: 320px; margin: 0 auto; }
}
