@charset "utf-8";
/**
 * 赚客吧搜索引擎 (zuanke8) - 现代化简洁风格与移动端全适配样式表
 * 2026 升级版
 */

:root {
    --brand-primary: #ff5a1f;
    --brand-primary-rgb: 255, 90, 31;
    --brand-hover: #ea4a11;
    --brand-light: #fff5f0;
    --brand-border: #fed7c7;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fcfdfe;
    --bg-subtle: #f1f5f9;

    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --border-focus: rgba(255, 90, 31, 0.25);

    --success-bg: #ecfdf5;
    --success-text: #059669;
    --success-border: #a7f3d0;

    --warning-bg: #fffbeb;
    --warning-text: #d97706;
    --warning-border: #fde68a;

    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-full: 4px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
}

/* 基础重置与现代化字体 */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0 !important;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-break: break-word;
    overflow-x: hidden;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover, a:focus {
    color: var(--brand-primary);
    text-decoration: none;
}

/* 容器布局 */
.container {
    width: 100% !important;
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 16px !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.span12 {
    width: 100% !important;
    margin-left: 0 !important;
    float: none !important;
}

/* 顶部 Header */
.site-header {
    padding: 16px 0 14px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.logo-title, .logo-badge {
    display: inline-flex;
    align-items: center;
    color: var(--brand-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.brand-logo:hover .logo-title, .brand-logo:hover .logo-badge {
    color: var(--brand-hover);
}

.header-tags {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 100%;
    margin-left: auto;
    gap: 6px;
}

.head-quick-link {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 500;
    white-space: nowrap;
}

.x-search-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.new-badge {
    padding: 0 4px;
    border-radius: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}

.head-quick-link:hover, .head-quick-link.active {
    color: var(--brand-primary);
    background: var(--brand-light);
    border-color: var(--brand-border);
}

/* 搜索卡片区域 */
.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px 14px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* 搜索输入框组合 */
.search-input-box {
    display: flex;
    align-items: center;
    position: relative;
    background: #ffffff;
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 90, 31, 0.1);
}

.search-input-box:focus-within {
    box-shadow: 0 0 0 4px var(--border-focus), 0 2px 10px rgba(255, 90, 31, 0.15);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 14px;
    color: var(--text-light);
}

.search-input-box input.search-query,
input.search-query.span6 {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 12px !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 15px;
    color: var(--text-primary);
    margin: 0 !important;
}

.search-input-box input.search-query::placeholder {
    color: var(--text-light);
    font-size: 14px;
}

.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 6px;
    font-size: 18px;
    line-height: 1;
    color: var(--text-light);
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-subtle);
}

.search-clear-btn:hover {
    color: var(--text-primary);
    background: #e2e8f0;
}

.btn-search {
    flex-shrink: 0 !important;
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%) !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    letter-spacing: 2px;
    transition: filter 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    text-shadow: none !important;
}

.btn-search:hover {
    filter: brightness(1.08);
}

.btn-search:active {
    filter: brightness(0.95);
}

/* 热门搜索词 */
.hot-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}

.hot-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hot-tags-scroll {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.hot-tags-scroll::-webkit-scrollbar {
    display: none;
}

.hot-tag {
    display: inline-block;
    padding: 3px 9px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.4;
}

.hot-tag:hover {
    color: var(--brand-primary);
    background: var(--brand-light);
    border-color: var(--brand-border);
}

/* 搜索过滤栏 Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
}

.filter-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 !important;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    user-select: none;
    transition: all 0.15s ease;
}

.filter-chip input {
    margin: 0 !important;
    cursor: pointer;
}

.filter-chip:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--brand-light);
    border-color: var(--brand-border);
    color: var(--brand-primary);
    font-weight: 500;
}

.filter-sort {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sort-label {
    color: var(--text-muted);
    font-size: 13px;
}

.search_sort {
    height: 30px;
    padding: 2px 24px 2px 8px !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-primary) !important;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ff5a1f' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    outline: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.search_sort:focus {
    border-color: var(--brand-primary) !important;
}

/* 热门推荐与公告卡片 */
.promo-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.promo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    background: var(--brand-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.promo-tip {
    font-size: 12px;
    color: var(--text-light);
}

.promo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 6px 12px;
}

.promo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.promo-item:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    transform: translateX(2px);
}

.promo-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-primary);
    background: #ffffff;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.promo-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promo-arrow {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1;
}

/* 列表页选项卡 (Tabs) */
.home-center-nav {
    margin-bottom: 16px;
}

.tabs-header-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.nav-tabs-modern {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-tabs-modern::-webkit-scrollbar {
    display: none;
}

.nav-tabs-modern li {
    flex-shrink: 0;
}

.nav-tabs-modern li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-tabs-modern li a:hover {
    color: var(--brand-primary);
    background: var(--bg-subtle);
}

.nav-tabs-modern li.active a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ff6b35, #ff4500) !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 90, 31, 0.3);
}

.nav-tabs-modern li a.permission-tab-link {
    color: var(--warning-text);
}

/* 广告位自适应容器 (防止写死 728px / 600px 撑破屏幕) */
.ad-banner-responsive {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    margin: 10px 0;
    text-align: left;
    border-radius: var(--radius-md);
}

.ad-banner-responsive iframe,
.ad-banner-responsive > div,
.ad-banner-responsive > ins {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* 新帖 / 热帖 / 权限帖：平铺紧凑行，不为每条记录增加容器内边距。 */
.thread-feed-list {
    margin-bottom: 20px;
}

.thread-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.12s ease;
    white-space: nowrap;
    overflow: hidden;
}

.thread-feed-item:last-child {
    border-bottom: none;
}

.thread-feed-item:hover {
    background-color: #f8fafc;
}

.thread-main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.thread-source-logo {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.thread-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
}

.thread-title:hover {
    color: var(--brand-primary);
}

.thread-title:visited {
    color: #94a3b8;
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--warning-text);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    line-height: 1.3;
    flex-shrink: 0;
}

.thread-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

.thread-time {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.thread-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 操作微按钮 (快照、原帖) */
.action-btn, .snapshot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    line-height: 1.3;
    transition: all 0.15s ease;
    cursor: pointer;
    min-height: 22px;
}

.snapshot-btn {
    color: var(--success-text) !important;
    background: var(--success-bg) !important;
    border: 1px solid var(--success-border) !important;
    text-decoration: none !important;
}

.snapshot-btn:hover {
    background: #d1fae5 !important;
    color: #047857 !important;
}

.origin-link-mini {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    font-size: 11.5px;
    color: var(--text-muted) !important;
    background: var(--bg-subtle) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    min-height: 22px;
    line-height: 1.3;
}

.origin-link-mini:hover {
    color: var(--brand-primary) !important;
    border-color: var(--brand-border) !important;
}

/* 热搜词排行榜 (3列网格) */
.hot-ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.ranking-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.ranking-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.ranking-icon {
    font-size: 16px;
}

.ranking-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease;
}

.ranking-item:hover {
    background: var(--bg-subtle);
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    flex-shrink: 0;
}

.ranking-item.rank-1 .rank-index {
    background: #ef4444;
    color: #ffffff;
}

.ranking-item.rank-2 .rank-index {
    background: #f97316;
    color: #ffffff;
}

.ranking-item.rank-3 .rank-index {
    background: #f59e0b;
    color: #ffffff;
}

.rank-word {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--text-secondary);
}

.rank-word:hover {
    color: var(--brand-primary);
}

/* 搜索结果页 (Search Results) */
.search-results-wrapper {
    margin-bottom: 24px;
}

.search-neck-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.result-count-info {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.result-count-info b {
    color: var(--brand-primary);
    font-weight: 600;
    margin: 0 4px;
}

/* 与首页悬浮卡片使用同一张加群二维码，按原图比例显示。 */
.search-group-qr {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
}

/* 纠错建议 */
.corrected-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff7ed;
    border: 1px solid #ffedd5;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
}

.corrected-title {
    color: #c2410c;
    font-weight: 600;
    margin: 0;
    font-size: 13px;
}

.corrected-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    color: #ea580c;
    font-weight: 500;
}

.corrected-tag:hover {
    background: #ea580c;
    color: #ffffff;
}

/* 空搜索结果 */
.empty-result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 16px;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-msg {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.empty-msg em {
    color: var(--brand-primary);
    font-style: normal;
    font-weight: 600;
}

.empty-tips-box {
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.empty-tips-box ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

/* 搜索结果卡片 - 紧凑现代卡片 */
.result-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.result-card:hover {
    border-color: var(--brand-border);
    box-shadow: var(--shadow-md);
}

.result-card-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.result-rank-num {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 400;
}

.result-card-title a {
    color: #1d4ed8;
}

.result-card-title a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.result-match-score {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-subtle);
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
}

.result-snippet {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* 搜索关键词高亮 */
.result-card em, .result-snippet em, .thread-title em {
    color: #e11d48;
    background: rgba(225, 29, 72, 0.08);
    font-style: normal;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
}

.result-footer-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.meta-time-badge {
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.meta-source-badge {
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.result-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.origin-btn {
    color: #2563eb !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 500;
}

.origin-btn:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

/* 现代化分页 Pagination */
.pagination-modern-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
}

.pagination {
    margin: 0 !important;
}

.pagination ul {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    float: none !important;
}

.pagination ul > li {
    display: inline-block !important;
}

.pagination ul > li > a,
.pagination ul > li > span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    line-height: normal !important;
    float: none !important;
    transition: all 0.15s ease !important;
}

.pagination ul > li > a:hover {
    color: var(--brand-primary) !important;
    border-color: var(--brand-border) !important;
    background: var(--brand-light) !important;
}

.pagination ul > li.disabled > a,
.pagination ul > li.disabled > span,
.pagination ul > li.active > a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ff6b35, #ff4500) !important;
    border-color: var(--brand-primary) !important;
    cursor: default !important;
    box-shadow: 0 2px 6px rgba(255, 90, 31, 0.25) !important;
}

/* 打赏赞助面板 */
.support-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.support-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.support-qr-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.support-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.support-qr-img {
    height: 160px;
    width: auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.support-qr-img:hover {
    transform: scale(1.03);
}

.support-qr-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 相关搜索推荐 */
.related-search-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.related-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 10px 0;
}

.related-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-chip {
    display: inline-block;
    padding: 3px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.related-chip:hover {
    color: var(--brand-primary);
    background: var(--brand-light);
    border-color: var(--brand-border);
}

/* 页脚 Footer */
.site-footer {
    padding: 24px 0 32px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border-light);
    margin-top: 24px;
}

.site-footer p {
    margin: 0;
}

/* jQuery UI Autocomplete 现代化弹窗 */
.ui-autocomplete {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px !important;
    font-family: inherit !important;
    z-index: 9999 !important;
    max-height: 320px;
    overflow-y: auto;
}

.ui-autocomplete .ui-menu-item {
    list-style: none !important;
    padding: 0 !important;
}

.ui-autocomplete .ui-menu-item a,
.ui-autocomplete .ui-menu-item-wrapper {
    display: block !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.1s ease;
}

.ui-autocomplete .ui-state-focus,
.ui-autocomplete .ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active {
    background: var(--brand-light) !important;
    color: var(--brand-primary) !important;
    font-weight: 500 !important;
    border: none !important;
    margin: 0 !important;
}

/* 与 gf_api 线报列表一致的时间相对展示样式 */
.thread-time.red, .meta-time-badge.red {
    color: rgba(255, 0, 0, 0.98);
    font-weight: 600;
}
.thread-time.orange, .meta-time-badge.orange {
    color: rgba(251, 103, 47, 0.98);
    font-weight: 500;
}
.thread-time.yellow, .meta-time-badge.yellow {
    color: rgba(248, 177, 50, 0.98);
    font-weight: 500;
}
.thread-time.time-older, .meta-time-badge.time-older {
    color: #64748b;
    font-weight: normal;
}

/* 二维码固定在右下角，宽屏预留侧边空间，窄屏隐藏以免遮挡正文。 */
.floating-qr-card {
    position: fixed;
    right: 12px;
    right: max(12px, env(safe-area-inset-right));
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 252px;
    padding: 5px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 990;
    text-align: center;
}

.floating-qr-card[hidden] {
    display: none;
}

.qr-close-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    background: #64748b;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.qr-close-btn:hover {
    background: #0f172a;
}

.floating-qr-img {
    width: 240px;
    height: auto;
    display: block;
    object-fit: contain;
    margin-top: 4px;
}

.floating-qr-text {
    display: block;
    list-style: none;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 20px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.floating-qr-text::-webkit-details-marker {
    display: none;
}

@media (min-width: 1180px) {
    .container {
        max-width: min(980px, calc(100% - 528px)) !important;
    }
}

@media (max-width: 1179px) {
    .floating-qr-card {
        display: none;
    }
}

/* ========================================================
   移动端响应式专项优化 (Responsive & Mobile Viewport)
   ======================================================== */

@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .container {
        padding: 0 10px !important;
    }

    .site-header {
        padding: 12px 0 8px;
    }

    .header-inner {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo-img {
        height: 38px;
        max-width: 160px;
    }

    .logo-title, .logo-badge {
        font-size: 18px;
    }

    .header-tags {
        gap: 4px;
    }

    .header-tags .head-quick-link:not(.x-search-link) {
        display: none;
    }

    .head-quick-link {
        padding: 3px 8px;
        font-size: 12px;
    }

    .search-card {
        padding: 12px 12px 10px;
        border-radius: var(--radius-md);
        margin-bottom: 12px;
    }

    .search-input-box input.search-query {
        height: 40px !important;
        line-height: 40px !important;
        font-size: 14px;
        padding: 0 8px !important;
    }

    .btn-search {
        height: 40px;
        padding: 0 16px;
        font-size: 14px;
        letter-spacing: 1px;
    }

    .hot-label {
        flex-shrink: 0;
    }

    .hot-tags-scroll {
        flex: 1 1 0;
        min-width: 0;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .hot-tag {
        flex-shrink: 0;
    }

    .filter-bar {
        flex-wrap: nowrap;
        gap: 4px;
        margin-top: 10px;
        padding-top: 8px;
    }

    .filter-group {
        flex-shrink: 0;
        gap: 4px;
    }

    .filter-chip {
        gap: 2px;
        padding: 4px 0;
        border: 0;
        background: transparent;
        font-size: 12px;
        white-space: nowrap;
    }

    .filter-chip input {
        flex: 0 0 12px;
        width: 12px;
        height: 12px;
    }

    .filter-sort {
        margin-left: auto;
        width: auto;
        padding-top: 0;
        border-top: 0;
    }

    .sort-label {
        font-size: 11px;
    }

    .search_sort {
        width: 70px !important;
        height: 28px;
        margin: 0 !important;
        padding: 2px 16px 2px 4px !important;
        font-size: 12px;
        background-position: right 4px center !important;
    }

    .promo-list {
        grid-template-columns: 1fr;
    }

    .hot-ranking-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 列表条目移动端严格单行展示，不换行 (参考 gf_api) */
    .thread-feed-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        min-height: 28px !important;
        padding: 6px 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }

    .thread-main {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    .thread-title {
        font-size: 13.5px !important;
        line-height: 1.35 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        flex: 0 1 auto !important;
    }

    .permission-badge {
        font-size: 10px !important;
        padding: 1px 3px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .thread-meta {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        margin-left: auto !important;
    }

    .thread-time {
        font-size: 11px !important;
        line-height: 1.3 !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-variant-numeric: tabular-nums !important;
    }

    .thread-actions {
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .action-btn, .snapshot-btn, .origin-link-mini {
        padding: 1px 5px !important;
        font-size: 10.5px !important;
        min-height: 20px !important;
        line-height: 18px !important;
    }

    /* 移动端彻底隐藏悬浮二维码，仅在 PC 桌面端展示，不遮挡正文 */
    .floating-qr-card {
        display: none !important;
    }

    .result-card {
        padding: 12px 14px;
    }

    .result-card-title {
        font-size: 15px;
    }

    .result-snippet {
        font-size: 13px;
        line-height: 1.55;
    }

    .result-footer {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        white-space: nowrap;
    }

    .result-footer-left {
        flex-shrink: 0;
        gap: 4px;
    }

    .meta-source-badge {
        padding: 2px 4px;
        font-size: 10.5px;
    }

    .result-footer-actions {
        flex-shrink: 0;
        gap: 3px;
        margin-left: auto;
    }

    .result-footer-actions .action-btn {
        padding: 1px 4px !important;
        white-space: nowrap;
    }

    .pagination ul > li > a,
    .pagination ul > li > span {
        min-width: 32px !important;
        height: 32px !important;
        padding: 0 6px !important;
        font-size: 12px !important;
    }

    .support-qr-img {
        height: 130px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        gap: 6px;
    }

    .logo-img {
        height: 34px;
        max-width: 140px;
    }

    .logo-title, .logo-badge {
        font-size: 16px;
    }

    .btn-search {
        padding: 0 12px;
    }

    .search-neck-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    /* 手机端隐藏多余的“赚吧 ›”按钮，点击标题即可直达赚吧原帖，保障单行标题显示空间 */
    .origin-link-mini {
        display: none !important;
    }

    .thread-feed-item {
        padding: 5px 6px !important;
        gap: 4px !important;
    }

    .thread-meta {
        gap: 4px !important;
    }
}

/* 隐藏旧版废弃类与固定二维码 (防移动端遮挡) */
.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .hidden-phone {
        display: none !important;
    }
    
    /* 强力消除旧式定宽广告或外层 span 撑爆屏幕 */
    div[style*="width: 728px"],
    div[style*="width: 600px"],
    div[style*="width:728px"],
    div[style*="width:600px"] {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
    }
}

@media (max-width: 360px) {
    .filter-sort .sort-label {
        display: none;
    }
}