/* ============================================================
   rhex-page.css — 独立页统一风格（/gold、/vip、/rank、/search）
   只覆盖视觉，不动各页自身结构
   ============================================================ */

body {
  background: #f6f7f9 !important;
  color: #1f2328 !important;
  font: 14px/1.7 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 920px !important;
  margin: 0 auto !important;
  padding: 24px 16px 80px !important;
}

/* ---------- 页头 ---------- */
.hd {
  margin-bottom: 22px !important;
  gap: 10px !important;
}

.logo {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  box-shadow: 0 5px 12px -7px rgba(242, 99, 34, .85);
}

.hd a {
  font-size: 16.5px !important;
  font-weight: 700 !important;
  letter-spacing: -.2px;
  color: #17171a !important;
}

.hd .back {
  margin-left: auto;
  font-size: 12.5px !important;
  color: #8a919b !important;
  font-weight: 400 !important;
  padding: 6px 13px !important;
  border: 1px solid #e9ebef;
  border-radius: 999px;
  background: #fff;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.hd .back:hover {
  color: #e3540f !important;
  border-color: #ffd5bd;
  background: #fff7f2;
}

/* ---------- 标题 ---------- */
h1,
h1.page {
  font-size: 23px !important;
  font-weight: 700 !important;
  letter-spacing: -.3px;
  margin: 0 0 6px !important;
  color: #17171a !important;
}

.sub {
  font-size: 13px !important;
  color: #8a919b !important;
  margin: 0 0 22px !important;
  line-height: 1.65 !important;
}

h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  margin: 28px 0 10px !important;
  color: #17171a !important;
}

/* ---------- 卡片 ---------- */
.card,
.panel {
  background: #fff !important;
  border: 1px solid #e9ebef !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
}

.card {
  padding: 20px 22px !important;
}

.panel {
  padding: 16px 20px !important;
}

/* ---------- 表格（排行榜 / 金币流水） ---------- */
.panel table,
.card table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
}

.panel th,
.card th {
  padding: 10px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #8a919b !important;
  background: #fafbfc !important;
  border-bottom: 1px solid #eef0f3 !important;
  white-space: nowrap;
}

.panel td,
.card td {
  padding: 11px 12px !important;
  border-bottom: 1px solid #f2f4f6 !important;
  color: #1f2328;
}

.panel tr:last-child td,
.card tr:last-child td {
  border-bottom: 0 !important;
}

.panel table tr:hover td,
.card table tr:hover td {
  background: #fbfcfd !important;
}

.panel td.rk,
.card td.rk {
  width: 46px !important;
  text-align: center !important;
  font-weight: 700 !important;
  color: #c2c7ce !important;
  font-variant-numeric: tabular-nums;
}

/* 三甲名次色阶（表格首行是表头，数据从第 2 行开始） */
.panel table tr:nth-child(2) td.rk {
  color: #e3540f !important;
}

.panel table tr:nth-child(3) td.rk {
  color: #a9713a !important;
}

.panel table tr:nth-child(4) td.rk {
  color: #8a9099 !important;
}

.panel td.plus,
.card td.plus {
  color: #e3540f !important;
  font-weight: 600 !important;
}

/* ---------- 搜索页 ---------- */
form[action="/search"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 4px !important;
}

.meta {
  font-size: 12.5px !important;
  color: #8a919b !important;
  margin: 14px 0 !important;
}

input[type="search"] {
  height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid #e3e6ea !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  background: #fff !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="search"]:focus {
  border-color: #f26322 !important;
  box-shadow: 0 0 0 3px rgba(242, 99, 34, .12) !important;
  outline: 0 !important;
}

button[type="submit"] {
  height: 44px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f26322 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  box-shadow: 0 6px 16px -10px rgba(242, 99, 34, .9);
}

button[type="submit"]:hover {
  filter: brightness(.95);
}

.item {
  background: #fff !important;
  border: 1px solid #e9ebef !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  margin: 0 0 10px !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.item:hover {
  border-color: #ffd5bd !important;
  box-shadow: 0 12px 28px -20px rgba(242, 99, 34, .55) !important;
}

.item h2 {
  font-size: 15.5px !important;
  font-weight: 600 !important;
  margin: 0 0 8px !important;
  line-height: 1.5 !important;
}

.item h2 a {
  color: #17171a !important;
  text-decoration: none !important;
}

.item h2 a:hover {
  color: #e3540f !important;
}

.item .tag {
  display: inline-flex !important;
  align-items: center !important;
  height: 20px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  background: #f4f5f7 !important;
  border: 0 !important;
  color: #6b7280 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
}

.item p {
  margin: 8px 0 0 !important;
  font-size: 13px !important;
  color: #5f6670 !important;
  line-height: 1.7 !important;
}

/* ---------- 按钮 ---------- */
a.primary,
button.primary {
  height: 38px !important;
  padding: 0 20px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 16px -10px rgba(242, 99, 34, .9);
}

a.ghost,
button.ghost {
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
}

/* ---------- 提示块 ---------- */
.tip {
  font-size: 12.5px !important;
  color: #8a919b !important;
  line-height: 1.7 !important;
}

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
  .wrap {
    padding: 18px 14px 60px !important;
  }

  h1,
  h1.page {
    font-size: 20px !important;
  }

  .sub {
    margin-bottom: 16px !important;
  }

  h2 {
    margin: 22px 0 8px !important;
  }

  .card {
    padding: 16px !important;
  }

  .panel {
    padding: 4px !important;
  }

  .panel table,
  .card table {
    font-size: 12.5px !important;
  }

  .panel th,
  .panel td,
  .card th,
  .card td {
    padding: 9px 7px !important;
  }

  .panel td.rk,
  .card td.rk {
    width: 34px !important;
  }

  .item {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .item h2 {
    font-size: 14.5px !important;
  }

  .hd .back {
    padding: 5px 10px !important;
    font-size: 12px !important;
  }

  /* 会员权益对比表：固定三列，防止最后一列被挤出卡片 */
  .cmp {
    padding: 14px 12px 6px !important;
    overflow: hidden !important;
  }

  .cmp table {
    table-layout: fixed !important;
    width: 100% !important;
  }

  .cmp th,
  .cmp td {
    padding: 9px 4px !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .cmp th:first-child,
  .cmp td:first-child {
    width: 30% !important;
  }

  .cmp th:nth-child(2),
  .cmp td:nth-child(2) {
    width: 32% !important;
  }

  .cmp th:nth-child(3),
  .cmp td:nth-child(3) {
    width: 38% !important;
  }
}
