/* =========================================================
   browse.php - 应用题用户浏览页
   时间: 2026-09-21
   设计: 与 /question/ (index.php) 风格统一
         年级 chips + 题型筛选 + 卡片网格 + 分页
   ========================================================= */

/* === 页面容器 === */
.br-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* === Hero 简版 === */
.br-hero {
    text-align: center;
    padding: 32px 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 24px 24px;
    color: #fff;
    margin: 0 -16px 24px;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.22);
}
.br-hero h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
}
.br-hero p {
    font-size: 14px;
    opacity: 0.92;
    margin: 0;
}

/* === 面包屑 === */
.br-crumbs {
    font-size: 13px;
    color: #6b7280;
    margin: 14px 0 10px;
}
.br-crumbs a {
    color: #2563eb;
    text-decoration: none;
}
.br-crumbs a:hover { text-decoration: underline; }
.br-crumbs .sep { margin: 0 6px; color: #cbd5e1; }

/* === 筛选条 === */
.br-filter {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.br-filter__label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    margin-right: 4px;
}
.br-chip {
    display: inline-block;
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.br-chip:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.br-chip.is-active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}
.br-stype-chip[data-stype="应用题"].is-active {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-color: #f59e0b;
}
.br-stype-chip[data-stype="计算题"].is-active {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    border-color: #06b6d4;
}

/* === 顶部统计条 === */
.br-stats {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.br-stats b { color: #1d4ed8; font-weight: 700; }

/* === 题目卡片网格 === */
.br-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.br-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}
.br-card:hover {
    border-color: #6366f1;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}
.br-card__gbadge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    color: #fff;
}
.br-card__name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}
.br-card__name a {
    color: inherit;
    text-decoration: none;
}
.br-card__name a:hover { color: #2563eb; }
.br-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
}
.br-card__btn {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff !important;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.br-card__btn:hover { opacity: 0.9; }

/* === 卡片知识点标签 (2026-09-21) === */
.br-card__kp {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}
.br-card__kp-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1.5;
    transition: all 0.15s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.br-card__kp-tag:hover {
    background: #4338ca;
    color: #fff;
    border-color: #4338ca;
}
.br-card__kp-more {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 999px;
    line-height: 1.5;
}

/* === 空状态 === */
.br-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #d1d5db;
}
.br-empty .icon { font-size: 36px; margin-bottom: 8px; }

/* === 分页 === */
.br-pager {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.br-pager a, .br-pager span {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    background: #fff;
}
.br-pager a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.br-pager .is-current {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    font-weight: 600;
}
.br-pager .is-disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: #f9fafb;
}

/* === 响应式 === */
@media (max-width: 640px) {
    .br-hero h1 { font-size: 22px; }
    .br-grid { grid-template-columns: 1fr; }
    .br-filter { padding: 12px; }
}