* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ===== 顶部 ===== */
.header {
    background: #fff;
    padding: 26px 20px 18px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 18px;
}

.search-row {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-row input {
    flex: 1;
    padding: 14px 22px;
    border: 2px solid #dfe3e8;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.search-row input:focus {
    border-color: #0066cc;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0,102,204,.1);
}

.btn-primary,
.btn-secondary {
    padding: 14px 26px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
    border: none;
}

.btn-primary:hover { background: #0052a3; }

.btn-secondary {
    background: #fff;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-secondary:hover,
.btn-secondary.active {
    background: #0066cc;
    color: #fff;
}

/* 最近搜索 */
.recent-bar {
    max-width: 820px;
    margin: 12px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    font-size: 13px;
    min-height: 24px;
}

.recent-label {
    color: #999;
    line-height: 24px;
}

.recent-item {
    padding: 3px 12px;
    background: #f2f4f7;
    color: #555;
    border-radius: 14px;
    cursor: pointer;
    transition: all .2s;
}

.recent-item:hover {
    background: #0066cc;
    color: #fff;
}

/* ===== 主体 ===== */
.main {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 16px 80px;
}

/* 分类查找面板 */
.category-panel {
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.cf-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed #eef0f3;
}

.cf-row:last-child { border-bottom: none; }

.cf-label {
    flex-shrink: 0;
    width: 48px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    line-height: 32px;
}

.cf-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 16px;
    border: 1px solid #dfe3e8;
    border-radius: 18px;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.chip:hover {
    border-color: #0066cc;
    color: #0066cc;
}

.chip.active {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
    font-weight: 600;
}

/* 结果统计 */
.result-head {
    font-size: 13px;
    color: #888;
    padding: 4px 4px 12px;
}

/* 结果项 */
.result-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    border-left: 3px solid transparent;
}

.result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,.09);
    border-left-color: #0066cc;
}

.result-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.5;
    word-break: break-all;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    background: #f2f4f7;
    color: #666;
}

.tag.blue { background: #eef5ff; color: #0066cc; }
.tag.orange { background: #fff5e8; color: #d97706; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    background: #fff;
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}

.page-btn:hover:not(:disabled) {
    border-color: #0066cc;
    color: #0066cc;
}

.page-btn.active {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.page-info {
    font-size: 13px;
    color: #888;
    margin-left: 10px;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 70px 20px;
    color: #aaa;
}

.empty-icon { font-size: 52px; margin-bottom: 14px; }
.empty-text { font-size: 16px; margin-bottom: 6px; }
.empty-hint { font-size: 13px; }

/* 加载 */
.loading {
    text-align: center;
    padding: 40px;
    color: #0066cc;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 640px) {
    .logo { font-size: 20px; }
    .search-row { flex-wrap: wrap; }
    .search-row input { flex: 1 1 100%; }
    .btn-primary, .btn-secondary { flex: 1; }
    .cf-row { flex-direction: column; gap: 6px; }
    .cf-label { width: auto; line-height: 1.6; }
    .result-name { font-size: 14px; }
    .category-panel { padding: 14px 16px; }
}

/* ===== 预览弹窗 ===== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    animation: fadeIn .15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 860px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #eef0f3;
    flex-shrink: 0;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 12px;
}

.modal-close {
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover { color: #333; }

.modal-body {
    flex: 1;
    overflow: auto;
    background: #f0f2f5;
    min-height: 300px;
}

.modal-body iframe {
    width: 100%;
    height: 65vh;
    border: none;
    display: block;
}

.modal-body .preview-empty {
    padding: 70px 20px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

.modal-body .preview-empty .icon {
    font-size: 46px;
    margin-bottom: 12px;
}

.modal-foot {
    padding: 14px 20px;
    border-top: 1px solid #eef0f3;
    flex-shrink: 0;
    background: #fff;
    text-align: center;
}

.page-info {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.page-info strong { color: #0066cc; }

.free-tip {
    font-size: 14px;
    color: #07c160;
    font-weight: 600;
    margin-bottom: 10px;
}

.btn-download {
    padding: 12px 36px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.btn-download:hover { background: #06ad56; }

.pay-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pay-tip {
    font-size: 14px;
    color: #d97706;
    font-weight: 600;
}

.pay-qrcode {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.pay-sub {
    font-size: 12px;
    color: #999;
}

.page-ellipsis {
    min-width: 24px;
    text-align: center;
    color: #999;
    font-size: 14px;
    user-select: none;
}