/* ============================================
   Usersafe · 软件百科页样式
   ============================================ */

/* ---------- 百科头部 ---------- */
.baike-header {
    margin-bottom: 32px;
}

.baike-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.baike-header h1 i {
    color: #0b1a2f;
    margin-right: 10px;
}

.baike-header p {
    font-size: 15px;
    color: #5e6f8d;
}

/* ---------- 搜索与筛选栏 ---------- */
.baike-toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.baike-toolbar .search-wrapper {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.baike-toolbar .search-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 18px;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
    font-size: 14px;
    background: #fff;
    transition: 0.2s;
    outline: none;
}

.baike-toolbar .search-wrapper input:focus {
    border-color: #0b1a2f;
    box-shadow: 0 4px 14px rgba(11, 26, 47, 0.06);
}

.baike-toolbar .search-wrapper .search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%235e6f8d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>');
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border: none;
    background-color: transparent;
    opacity: 0.7;
    transition: 0.15s;
}

.baike-toolbar .search-wrapper .search-btn:hover {
    opacity: 1;
}

.baike-toolbar .filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.baike-toolbar .filter-tabs .filter-tab {
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #5e6f8d;
    background: #f1f4f9;
    cursor: default;
    transition: 0.15s;
    border: 1px solid transparent;
}

.baike-toolbar .filter-tabs .filter-tab:hover {
    background: #e4e9f0;
}

.baike-toolbar .filter-tabs .filter-tab.active {
    background: #0b1a2f;
    color: #fff;
}

.baike-toolbar .result-count {
    font-size: 14px;
    color: #8596b0;
    margin-left: auto;
    white-space: nowrap;
}

/* ---------- 问答列表 ---------- */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.qa-item {
    background: #fafcff;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 18px 24px;
    transition: 0.2s;
}

.qa-item:hover {
    border-color: #d0d9e6;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.qa-link {
    display: block;
    cursor: pointer;
}

.qa-link:hover .qa-question .q-text {
    color: #0b1a2f;
}

.qa-item .qa-question {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.qa-item .qa-question .q-icon {
    color: #0b1a2f;
    font-weight: 700;
    font-size: 15px;
    background: #f1f4f9;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.qa-item .qa-question .q-text {
    font-size: 15px;
    font-weight: 600;
    color: #0b1a2f;
    line-height: 1.5;
    transition: color 0.15s;
}

.qa-item .qa-answer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #edf2f7;
}

.qa-item .qa-answer .a-icon {
    color: #5e6f8d;
    font-weight: 500;
    font-size: 13px;
    background: #f1f4f9;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.qa-item .qa-answer .a-text {
    font-size: 14px;
    color: #1f2a44;
    line-height: 1.7;
}

.qa-item .qa-answer .a-text .highlight {
    background: #f0f3f8;
    padding: 1px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #0b1a2f;
}

.qa-item .qa-meta {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #8596b0;
}

.qa-item .qa-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qa-item .qa-meta i {
    font-size: 12px;
}

.qa-item .qa-tags {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.qa-item .qa-tags .tag {
    font-size: 11px;
    color: #5e6f8d;
    background: #f1f4f9;
    padding: 2px 12px;
    border-radius: 30px;
}

/* ---------- 空状态 ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #8596b0;
}

.empty-state i {
    font-size: 44px;
    color: #d0d9e6;
    margin-bottom: 14px;
    display: block;
}

.empty-state h3 {
    font-size: 18px;
    color: #1f2a44;
    margin-bottom: 4px;
}

/* ---------- 分页 ---------- */
#qa_pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

#qa_pagination .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f1f4f9;
    font-size: 14px;
    font-weight: 500;
    color: #1f2a44;
    cursor: default;
    transition: 0.15s;
}

#qa_pagination .page-item:hover {
    background: #e4e9f0;
}

#qa_pagination .page-item.active {
    background: #0b1a2f;
    color: #fff;
}

#qa_pagination .page-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .baike-header h1 {
        font-size: 22px;
    }

    .baike-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .baike-toolbar .search-wrapper {
        min-width: auto;
    }

    .baike-toolbar .result-count {
        margin-left: 0;
    }

    .qa-item {
        padding: 14px 16px;
    }

    .qa-item .qa-question .q-text {
        font-size: 14px;
    }

    .qa-item .qa-answer .a-text {
        font-size: 13px;
    }
}