/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.6;
    font-size: 14px;
}
a { color: #667eea; text-decoration: none; }
a:hover { color: #764ba2; }
img { max-width: 100%; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}
.btn:hover { opacity: 0.9; color: #fff; transform: translateY(-1px); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn-outline {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
}
.btn-outline:hover { background: #667eea; color: #fff; }

/* ===== 头部 ===== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}
.logo-icon { font-size: 26px; }
.main-nav { display: flex; gap: 32px; }
.main-nav a {
    color: #555;
    font-size: 15px;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.main-nav a:hover, .main-nav a.active {
    color: #667eea;
    border-bottom-color: #667eea;
}
.header-right { display: flex; align-items: center; gap: 12px; }
.user-balance {
    background: #f0f2ff;
    color: #667eea;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ===== Hero区 ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.hero h1 { font-size: 42px; margin-bottom: 16px; }
.hero-sub { font-size: 18px; opacity: 0.9; margin-bottom: 40px; }
.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}
.hf-icon { font-size: 24px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; }
.hero-btns .btn-outline { border-color: #fff; color: #fff; }
.hero-btns .btn-outline:hover { background: #fff; color: #667eea; }

/* ===== 通用区块 ===== */
.section { padding: 60px 0; }
.section-gray { background: #f0f2f5; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.section-header h2 { font-size: 28px; color: #222; }
.more-link { color: #667eea; font-size: 14px; }

/* ===== 产品卡片 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.15);
}
.product-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}
.product-name { font-size: 20px; margin-bottom: 12px; color: #222; }
.product-price { margin-bottom: 16px; }
.price-num { font-size: 32px; font-weight: 700; color: #f56565; }
.price-unit { color: #999; font-size: 14px; }
.product-specs {
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.product-specs li {
    padding: 4px 0;
    color: #666;
    font-size: 13px;
}
.product-desc {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 40px;
}

/* ===== 特性网格 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-item h3 { font-size: 18px; margin-bottom: 10px; color: #222; }
.feature-item p { color: #777; font-size: 14px; }

/* ===== 场景 ===== */
.scene-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.scene-item {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.scene-item:hover { transform: translateY(-2px); }
.scene-icon { font-size: 32px; display: block; margin-bottom: 8px; }

/* ===== 文章列表 ===== */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 18px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s;
}
.article-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.article-cat {
    background: #f0f2ff;
    color: #667eea;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    flex-shrink: 0;
}
.article-title { flex: 1; color: #333; font-size: 15px; }
.article-date { color: #999; font-size: 13px; flex-shrink: 0; }

/* ===== 页脚 ===== */
.site-footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 50px 0 20px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 16px; }
.footer-col p { font-size: 13px; line-height: 1.8; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 13px; }
.footer-col ul li a:hover { color: #667eea; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}
.footer-bottom a { color: #aaa; }

/* ===== 页面Banner ===== */
.page-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
.page-banner h1 { font-size: 32px; margin-bottom: 8px; }
.page-banner p { opacity: 0.85; }
.page-banner a { color: #fff; }

/* ===== 筛选栏 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-tag {
    padding: 6px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
}
.filter-tag:hover { border-color: #667eea; color: #667eea; }
.filter-tag.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
}

/* ===== 产品详情 ===== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}
.pd-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 16px;
}
.pd-name { font-size: 28px; margin-bottom: 16px; color: #222; }
.pd-price { margin-bottom: 24px; }
.pd-price-num { font-size: 42px; font-weight: 700; color: #f56565; }
.pd-price-unit { color: #999; font-size: 16px; }
.pd-specs {
    background: #f9f9fb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}
.pd-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.pd-spec-row:last-child { border-bottom: none; }
.pd-spec-row span { color: #888; }
.pd-spec-row strong { color: #333; }
.pd-features { margin-bottom: 24px; }
.pd-features h3, .pd-desc h3 { font-size: 18px; margin-bottom: 12px; color: #222; }
.pd-feature-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-feature-tag {
    background: #f0f2ff;
    color: #667eea;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.pd-desc-content { color: #555; line-height: 1.8; }
.buy-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 90px;
}
.buy-box h3 { margin-bottom: 20px; font-size: 20px; }
.qty-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.qty-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
}
.qty-input input {
    flex: 1;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
}
.total-price {
    font-size: 28px;
    font-weight: 700;
    color: #f56565;
}
.pay-methods { margin: 16px 0; }
.pay-method {
    display: block;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
}
.buy-tip { text-align: center; color: #999; font-size: 12px; margin-top: 12px; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.form-group textarea { resize: vertical; }
.form-group small { color: #999; font-size: 12px; }
.required { color: #f56565; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ===== 认证页面 ===== */
.auth-section {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 420px;
}
.auth-box h2 { text-align: center; margin-bottom: 24px; color: #222; }
.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

/* ===== 提示框 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #f0fff4; color: #38a169; border: 1px solid #c6f6d5; }
.alert-error { background: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 15px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}
.pagination a {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
}
.pagination a.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* ===== 文章页 ===== */
.article-page-list { display: flex; flex-direction: column; gap: 16px; }
.article-page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}
.article-page-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.api-left { flex: 1; }
.api-cat {
    display: inline-block;
    background: #f0f2ff;
    color: #667eea;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
}
.api-title { font-size: 18px; color: #222; margin-bottom: 6px; }
.api-excerpt { color: #888; font-size: 13px; }
.api-right { text-align: right; flex-shrink: 0; margin-left: 20px; }
.api-date { display: block; color: #999; font-size: 13px; margin-bottom: 4px; }
.api-views { color: #bbb; font-size: 12px; }

/* ===== 文章详情 ===== */
.article-detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}
.ad-title { font-size: 28px; margin-bottom: 16px; color: #222; }
.ad-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.ad-cat {
    background: #f0f2ff;
    color: #667eea;
    padding: 2px 10px;
    border-radius: 4px;
}
.ad-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    line-height: 2;
    color: #444;
}
.ad-content p { margin-bottom: 16px; }
.ad-sidebar { position: sticky; top: 90px; }
.ad-sidebar h3 { font-size: 16px; margin-bottom: 12px; color: #222; }
.related-list {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.related-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.related-list li:last-child { border-bottom: none; }
.related-list a { color: #555; font-size: 14px; }
.sidebar-contact {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
}
.sidebar-contact h3 { color: #fff; }
.sidebar-contact p { font-size: 13px; margin-bottom: 6px; opacity: 0.9; }

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: #f7f8fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}
.data-table tr:hover { background: #fafbfc; }
.mono { font-family: "Courier New", monospace; font-size: 12px; }

/* ===== 状态标签 ===== */
.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}
.status-paid { background: #f0fff4; color: #38a169; }
.status-pending { background: #fffbeb; color: #d69e2e; }
.status-expired { background: #fff5f5; color: #e53e3e; }

.badge {
    display: inline-block;
    background: #f0f2ff;
    color: #667eea;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== 面板 ===== */
.panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}
.panel-header h3 { font-size: 16px; color: #222; }
.panel-body { padding: 20px 24px; }
.panel-row { margin-bottom: 20px; }

/* ===== 搜索框 ===== */
.search-form { display: flex; gap: 8px; }
.search-form input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .product-grid, .feature-grid { grid-template-columns: 1fr; }
    .scene-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .product-detail, .article-detail-layout { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .hero h1 { font-size: 28px; }
}
