@charset "utf-8";
/* ==========================================================================
   servers/responsive.css —— Bootstrap 响应式优化（首页列表页）
   桌面端：保持原有表格布局
   移动端（<=767px）：表格行转为卡片展示，避免横向滚动
   ========================================================================== */

:root {
    --cf-blue: #26528c;        /* 主色：表头 / 强调 */
    --cf-blue-dark: #1d4068;   /* 主色深色：悬停 */
    --cf-black: #000000;       /* 边框色 */
    --cf-yellow: #FFFF00;      /* 置顶区行底色 */
    --cf-yellow-soft: #FFFFCC; /* 常规区行底色 */
    --cf-cream: #FFF7EE;       /* 分页按钮底色 */
}

/* ---------- 通用：让 Bootstrap 组件继承原配色 ---------- */
.table thead th {
    background-color: var(--cf-blue) !important;
    color: #ffffff !important;
    border-color: var(--cf-black) !important;
    font-size: 12px;
    vertical-align: middle;
}
.table td, .table th { border-color: var(--cf-black) !important; }

.header-topbar { background-color: var(--cf-blue); }
.header-topbar a { color: #ffffff; }

.pinned-head {
    background-color: var(--cf-blue) !important;
    color: #ffffff !important;
    font-size: 13px;
    text-align: left;
    padding-left: 8px;
}

.result-count, .filter-tip { color: var(--cf-blue); }
.filter-tip strong { color: #D20000; }
.no-result { color: #D20000; font-weight: bold; }
.search-highlight { color: #D20000; font-weight: bold; }
.footer_info { color: #000000; }
.time { color: red !important; }

/* 表格列宽（桌面端沿用原来的 colgroup 比例） */
.table.server-table { min-width: 1000px; }
.table.server-table td { vertical-align: middle; }
.table.server-table tbody tr:hover > td { background-color: #ffffff; }

/* 详情版本列：桌面端左对齐并允许换行 */
.table.server-table td.tl {
    text-align: left !important;
    padding-left: 6px;
    white-space: normal;
    word-break: break-word;
}

/* 搜索按钮 */
.btn-search {
    background-color: var(--cf-blue);
    border-color: var(--cf-black);
}
.btn-search:hover, .btn-search:focus {
    background-color: var(--cf-blue-dark);
    border-color: var(--cf-black);
    color: #fff;
}

/* 置顶区 */
.pinned-table tbody tr td { background-color: var(--cf-yellow) !important; }
.pinned-table tbody tr td a { color: #A84200; font-weight: bold; }
.pinned-gap { height: 10px; }

/* 分页 */
.pagination { --bs-pagination-color: var(--cf-blue); }
.page-link {
    color: var(--cf-blue);
    background-color: var(--cf-cream);
    border: 1px solid var(--cf-black);
}
.page-item.active .page-link {
    background-color: var(--cf-blue);
    border-color: var(--cf-black);
    color: #ffffff;
    font-weight: bold;
}
.page-link:hover, .page-link:focus {
    background-color: var(--cf-blue);
    border-color: var(--cf-black);
    color: #ffffff;
}

/* 顶部说明条：桌面端两行提示，移动端折叠为一行 */
.tip-box {
    background-color: #f8f9fb;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--cf-blue);
    text-align: center;
}
.tip-box .tip-contact { color: var(--cf-blue); }
/* 精简版提示：仅移动端显示 */
.filter-brief { display: none; }

/* ==========================================================================
   移动端优化（<= 767px）
   ========================================================================== */
@media (max-width: 767.98px) {
    body { font-family: "Microsoft YaHei", "微软雅黑", "宋体", sans-serif; }

    /* 容器留白收紧 */
    .container { --bs-gutter-x: 1rem; }

    /* 顶栏：改为纵向堆叠并居中 */
    .header-topbar .row > div { text-align: center !important; }
    .header-topbar .topbar-title {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 2px;
    }
    .header-topbar .topbar-links { font-size: 12px; }

    /* 横幅自适应 */
    .banner-img { max-width: 100%; height: auto; }

    /* 搜索区：竖排堆叠，按钮撑满 */
    .search-card .card-body { padding: 10px 12px; }
    .search-label { font-size: 13px; margin-bottom: 4px; }
    .search-card .form-control, .search-card .form-select { font-size: 14px; }
    .search-btn-row { display: flex; gap: 8px; }
    .search-btn-row .btn { flex: 1; }

    /* 提示条 */
    .tip-box { font-size: 11px; line-height: 1.7; padding: 6px 8px; }
    .filter-detail { display: none; }   /* 移动端隐藏冗长的过滤统计 */
    .filter-brief { display: block; }  /* 移动端显示精简版 */

    /* ---------- 表格转卡片 ---------- */
    .table-responsive { overflow-x: visible; }

    .table.server-table {
        min-width: 0;
        display: block;
    }
    .table.server-table thead { display: none; }      /* 隐藏表头 */
    .table.server-table tbody { display: block; }
    .table.server-table tbody tr {
        display: block;
        background-color: var(--cf-yellow-soft);
        border: 1px solid var(--cf-black);
        border-radius: 6px;
        margin-bottom: 10px;
        padding: 6px 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    }
    .table.server-table tbody tr.pinned-row {
        background-color: var(--cf-yellow);
    }
    .table.server-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
        border: none !important;
        border-bottom: 1px dashed #d5d5d5 !important;
        padding: 5px 0 !important;
        text-align: left !important;
        font-size: 13px;
        line-height: 1.5;
        white-space: normal;
        word-break: break-word;
        height: auto;
    }
    .table.server-table tbody tr td:last-child { border-bottom: none !important; }
    /* 字段名：用 ::before 渲染，桌面端不显示 */
    .table.server-table tbody tr td::before {
        content: attr(data-label);
        flex: 0 0 68px;
        color: #666;
        font-weight: bold;
        font-size: 12px;
        text-align: left;
    }
    /* 名称行加粗突出（不显示"名称"字段标签） */
    .table.server-table tbody tr td.cell-name {
        font-size: 15px;
        font-weight: bold;
        border-bottom: 1px solid #bbb !important;
        padding-bottom: 7px !important;
        margin-bottom: 3px;
    }
    .table.server-table tbody tr td.cell-name::before { content: none; }
    /* 详细版本字段左对齐 */
    .table.server-table tbody tr td.tl { padding-left: 0 !important; }
    /* 「点击查看」按钮 */
    .table.server-table tbody tr td.cell-home a.rk {
        display: inline-block;
        background-color: var(--cf-blue);
        color: #fff;
        padding: 4px 14px;
        border-radius: 4px;
        border: 1px solid var(--cf-black);
        font-size: 12px;
        font-weight: bold;
    }
    .table.server-table tbody tr td.cell-home a.rk:hover {
        background-color: var(--cf-blue-dark);
        color: #fff;
        text-decoration: none;
    }
    /* 空结果提示 */
    .table.server-table tbody tr.no-result-row {
        background-color: #fff;
    }
    .table.server-table tbody tr.no-result-row td {
        display: block;
        text-align: center !important;
        border-bottom: none !important;
    }
    .table.server-table tbody tr.no-result-row td::before { content: none; }

    /* 置顶区标题：移动端也用表头形式展示 */
    .pinned-head-cell {
        display: block;
        background-color: var(--cf-blue);
        color: #fff;
        font-weight: bold;
        padding: 7px 10px;
        border-radius: 6px;
        font-size: 13px;
        margin-bottom: 8px;
    }
    /* 置顶区标题下方紧跟第一张卡片：去掉卡片圆角上边与额外间距 */
    .pinned-head-cell + .table-responsive .table.server-table tbody tr:first-child {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        margin-top: -8px;
    }
    .pinned-head-cell + .table-responsive {
        margin-bottom: 0;
    }

    /* 分页：小尺寸紧凑排列 */
    .pagination { gap: 3px; }
    .page-link { padding: .3rem .5rem; font-size: 13px; }

    /* 页脚 */
    .footer_info { font-size: 11px; line-height: 1.8; padding: 12px 8px; }
    .footer_info p { margin-bottom: 4px; }
}

/* ==========================================================================
   超小屏（<= 360px）进一步收紧
   ========================================================================== */
@media (max-width: 360px) {
    .table.server-table tbody tr td { font-size: 12px; }
    .table.server-table tbody tr td::before { flex-basis: 58px; font-size: 11px; }
    .table.server-table tbody tr td.cell-name { font-size: 14px; }
    .page-link { padding: .25rem .4rem; font-size: 12px; }
}
