:root {
    --red: #9c0000;
    --red-dark: #7a0000;
    --bg: #ffe3b4;
    --line: #e6c795;
    --panel: #fffdf6;
    --link: #123fae;
    --text: #333;
    --muted: #8a5a00;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /* 首页背景图（assets/cq.jpg）：内容面板均为不透明底色，背景仅露出页面边缘与空白区，不影响可读性 */
    background: var(--bg) url("cq.jpg") no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    font: 12px/20px SimSun, "宋体", Arial, Helvetica, sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 1200px; max-width: 100%; margin: 0 auto; }

/* 顶部公告 */
.notice-bar {
    background: #fff8e7;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    padding: 6px 10px;
    text-align: center;
}

/* 站点头部 */
.site-head { background: linear-gradient(#b30000, #8a0000); }
.head-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
.logo { color: #ffdf8a; font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.logo:hover { text-decoration: none; }
/* H1 融入 logo：视觉与纯文本一致 */
.logo h1 { font-size: inherit; font-weight: inherit; margin: 0; display: inline; color: inherit; }
.head-meta { font-size: 12px; }
.head-meta span { margin-left: 14px; color: #ffe9c9; }
.head-meta b { color: #ffdf8a; }
.refresh-tip b { font-variant-numeric: tabular-nums; }

.main { padding: 12px 0 20px; }

/* 工具条 */
.toolbar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    background: #fff6e2; border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 8px;
}
.search { display: flex; align-items: center; gap: 6px; }
.search input {
    width: 240px; padding: 4px 6px; border: 1px solid var(--line); background: #fff; font-size: 12px;
}
.search button {
    padding: 4px 14px; background: var(--red); color: #fff; border: none; cursor: pointer; font-size: 12px;
}
.search button:hover { background: var(--red-dark); }
.search .clear { margin-left: 4px; color: var(--muted); }
.count b { color: var(--red); }

/* 分区 Tab */
.tabs { margin-bottom: 8px; }
.tab {
    display: inline-block; padding: 4px 14px; margin: 0 6px 6px 0;
    background: #fff6e2; border: 1px solid var(--line); color: var(--muted);
}
.tab.on { background: var(--red); border-color: var(--red); color: #fff; }
.tab:hover { text-decoration: none; }

/* 开区日期导航条（今日/明日/后天…） */
.days {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-bottom: 8px; padding: 5px 8px; background: var(--panel); border: 1px solid var(--line);
}
.days-label { font-size: 12px; font-weight: 700; color: var(--red); margin-right: 2px; }
.days .day {
    display: inline-block; padding: 3px 9px; font-size: 12px; border-radius: 2px;
    background: #fffdf6; border: 1px solid #e0c9a0; color: #7a4b12;
}
.days .day i { font-style: normal; margin-left: 4px; font-size: 11px; color: #a35b00; }
.days .day.on { background: var(--red); border-color: var(--red); color: #fff; }
.days .day.on i { color: #ffd9a0; }
.days .day.zero { color: #b3a68f; }
.days .day.zero i { color: #c6baa4; }
.days .day:hover { border-color: var(--red); text-decoration: none; }

/* 列表表格（对照原站 list2.css 真实样式：#FF4500 表头 / #9C0000 边框 / 单行截断 / 等级行色） */
table.gamelist { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--panel); border: 1px solid #9C0000; }
.gamelist th {
    background-color: #FF4500; color: #fff; font-weight: 800; font-size: 12px;
    height: 27px; line-height: 27px; padding: 0 4px; text-align: center;
    border: 1px solid #FF4500;
}
.gamelist td {
    height: 24px; line-height: 24px; padding: 0 4px; text-align: center;
    border: 1px solid #9C0000; vertical-align: middle;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gamelist td a { color: #030303; }
.gamelist td a.btn, .gamelist td a.btn:hover { color: #fff; }

/* 开区时间：纯红（原站 td:nth-child(3){color:#FF0000}） */
.gamelist td.c-time { color: #FF0000; font-weight: 700; }

/* 线路类型：橙红高亮（对照原站「盛大客户端」橙红字） */
.gamelist td.c-engine { color: #FF4500; font-weight: 700; }

/* 「下载专用登录器」链接：橙红（对照原站 bd.520cs.com） */
.gamelist td.c-ip a.dl { color: #FF4500; font-weight: 700; }

/* 行等级色（原站 gd/txgd/wl 黄系 → 按 status 映射：今日将开浅黄 / 已开淡黄 / 其余白，hover 变白同原站） */
.gamelist tr { background: #fff; }
.gamelist tr.st-0 { background: #ffff99; }
.gamelist tr.st-1 { background: #FFFFCC; }
.gamelist tr.st-2, .gamelist tr.st-3 { background: #fff; color: #8a7a66; }
.gamelist tr:hover { background: #FFFFFF; }

/* 列宽（容器 1200px）：介绍 26%≈312px 放 26 字，QQ 11%≈132px 完整放 10 位 QQ 号与 8 字文字标签 */
.gamelist th.c-name { width: 19%; }
.gamelist th.c-ip { width: 10%; }
.gamelist th.c-time { width: 18%; }
.gamelist th.c-ver { width: 26%; }
.gamelist th.c-engine { width: 9%; }
.gamelist th.c-num { width: 11%; }
.gamelist th.c-detail { width: 7%; }
.empty-row td { text-align: center; padding: 20px; color: var(--muted); height: auto; line-height: 20px; white-space: normal; }


/* 底部 SEO 文案区（低调灰字，收录用语境 + 内链入口） */
.seo-text { margin-top: 12px; padding: 8px 10px; background: #fff8e7; border: 1px solid var(--line); }
.seo-text p { margin: 0; color: #8a7a66; font-size: 12px; line-height: 20px; }
.seo-text .seo-links a { color: var(--link); }

/* 版本介绍列：tags / intro 同行拼接（td 单行截断，全文见 title 悬停） */
.c-ver .v-intro { color: #9b8d7a; font-size: 11px; }

/* 开服状态徽标 */
.badge {
    display: inline-block; margin-left: 4px; padding: 0 4px; font-size: 11px; line-height: 16px;
    border-radius: 2px; white-space: nowrap; vertical-align: 1px;
}
.badge.b-0 { background: #fff1c9; color: #a35b00; border: 1px solid #e8c071; }
.badge.b-1 { background: #e8f6e2; color: #237a13; border: 1px solid #b6dda8; }
.badge.b-2 { background: #ececec; color: #666; border: 1px solid #d2d2d2; }
.badge.b-3 { background: #f3e2e2; color: #8a3a3a; border: 1px solid #dcb4b4; }

.rec { color: #d00000; }
.btn { display: inline-block; padding: 2px 6px; background: var(--red); color: #fff; border-radius: 2px; white-space: nowrap; }
.btn:hover { background: var(--red-dark); text-decoration: none; color: #fff; }

/* 分页 */
.pager { margin-top: 10px; text-align: center; }
.pager a {
    display: inline-block; padding: 3px 9px; margin: 0 2px; background: #fff6e2;
    border: 1px solid var(--line); color: var(--muted);
}
.pager a.on { background: var(--red); color: #fff; border-color: var(--red); }
.pager a:hover { text-decoration: none; }

/* 页脚 */
.site-foot { background: #8a0000; color: #ffe9c9; padding: 12px 0; margin-top: 20px; text-align: center; }
.site-foot p { margin: 4px 0; }
.site-foot .health { color: #fff; }

/* 错误页 */
.error-box { background: var(--panel); border: 1px solid var(--line); padding: 30px; margin: 40px auto; text-align: center; }
.debug { text-align: left; background: #fff; border: 1px solid var(--line); padding: 10px; overflow: auto; }

/* 移动端：表格转卡片（iOS 不支持 fixed 背景，回退为滚动） */
@media (max-width: 768px) {
    body { background-attachment: scroll; }
    .gamelist, .gamelist tbody, .gamelist tr, .gamelist td { display: block; width: 100%; }
    .gamelist thead { display: none; }
    .gamelist { border: none; background: transparent; }
    .gamelist tr {
        border: 1px solid var(--line); background: var(--panel); margin-bottom: 8px; padding: 4px 0;
    }
    .gamelist td {
        border: none; border-bottom: 1px dashed #f0dcb8; display: flex; gap: 8px;
        height: auto; line-height: 1.6; white-space: normal; overflow: visible; text-overflow: clip;
    }
    .gamelist td:last-child { border-bottom: none; }
    .gamelist td::before {
        content: attr(data-label); flex: 0 0 76px; color: var(--muted);
    }
    .search input { width: 160px; }
    .head-meta span { margin-left: 8px; }
}
