/* =========================================================
   澳门六合彩开奖记录 · H5 前台样式
   深色红金主题 / 移动优先
   ========================================================= */

:root {
  --bg: #0b0807;
  --bg-2: #150f0d;
  --surface: #1a1210;
  --surface-2: #231815;
  --line: rgba(233, 201, 140, 0.14);
  --gold: #e9c98c;
  --gold-2: #c99a4e;
  --red: #d94b45;
  --blue: #3f7bd6;
  --green: #2f9e63;
  --text: #f4ece2;
  --muted: #a2907f;
  --muted-2: #7d6c5e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --header-h: 60px;
  --tabbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(201, 154, 78, 0.16), transparent 60%),
    radial-gradient(800px 400px at 90% 10%, rgba(217, 75, 69, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 700; }
em, i { font-style: normal; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(11, 8, 7, 0.96), rgba(11, 8, 7, 0.72) 70%, rgba(11, 8, 7, 0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top, 0px);
}

.hd-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  color: #2a1a0d;
  background: linear-gradient(160deg, #f6dcaa, #c99a4e);
  box-shadow: 0 4px 12px rgba(201, 154, 78, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: 0.3px; }
.brand-text small { font-size: 11px; color: var(--muted); }

.notice-bar {
  max-width: 680px;
  margin: 6px auto 0;
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--gold);
  background: rgba(201, 154, 78, 0.10);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------------- 容器 ---------------- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 16px 0;
}

.block { margin-top: 18px; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sec-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 10px;
}

.sec-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}

.sec-sub { font-size: 12px; color: var(--muted); }
.more { font-size: 12.5px; color: var(--gold); opacity: 0.9; }
.back { font-size: 13px; color: var(--muted); }

/* ---------------- 倒计时 ---------------- */
.countdown-card {
  margin-top: 6px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(201, 154, 78, 0.18), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.countdown-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120px;
  background: radial-gradient(closest-side, rgba(233, 201, 140, 0.16), transparent);
  pointer-events: none;
}

.cd-label { font-size: 13px; color: var(--muted); letter-spacing: 0.5px; }
.cd-label b { color: var(--gold); font-size: 15px; }

.cd-clock {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
}

.cd-unit { display: flex; flex-direction: column; align-items: center; }

.cd-unit em {
  min-width: 52px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(233, 201, 140, 0.18);
  text-shadow: 0 0 18px rgba(233, 201, 140, 0.35);
}

.cd-unit small { margin-top: 4px; font-size: 11px; color: var(--muted-2); }

.cd-meta { font-size: 12.5px; color: var(--muted); }

/* ---------------- 号码球 ---------------- */
.balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 10px;
}

.ball {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  position: relative;
  flex: 0 0 auto;
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.28),
    inset 0 3px 6px rgba(255, 255, 255, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ball.red { background: radial-gradient(circle at 32% 26%, #f0685f, #a8271f 70%); }
.ball.blue { background: radial-gradient(circle at 32% 26%, #5b90e0, #23478c 70%); }
.ball.green { background: radial-gradient(circle at 32% 26%, #4fbf83, #1c6a44 70%); }
.ball.gray { background: radial-gradient(circle at 32% 26%, #9a8a7c, #55483e 70%); }

.ball.is-special {
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.28),
    inset 0 3px 6px rgba(255, 255, 255, 0.22),
    0 0 0 2px rgba(11, 8, 7, 1),
    0 0 0 4px var(--gold),
    0 8px 18px rgba(233, 201, 140, 0.35);
}

.ball-sep { color: var(--muted-2); font-size: 14px; margin: 0; flex: 0 0 auto; }

/* 小号球 */
.mini {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.mini.red { background: linear-gradient(160deg, #e0524d, #a8271f); }
.mini.blue { background: linear-gradient(160deg, #4b7fd2, #23478c); }
.mini.green { background: linear-gradient(160deg, #3faf76, #1c6a44); }
.mini.on { box-shadow: 0 0 0 1.5px var(--gold), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }

/* ---------------- 开奖卡 ---------------- */
.draw-card {
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.draw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  flex-wrap: wrap;
}

.issue-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #2a1a0d;
  background: linear-gradient(160deg, #f6dcaa, #c99a4e);
}

.draw-date { font-size: 11.5px; color: var(--muted); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.tag-special {
  color: #2a1a0d;
  background: linear-gradient(160deg, #f6dcaa, #c99a4e);
  border-color: transparent;
  font-weight: 700;
}

.sum-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.sum-row b { color: var(--gold); }

/* ---------------- 列表 ---------------- */
.row-list li + li { margin-top: 8px; }

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(233, 201, 140, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}

.row:active { background: rgba(233, 201, 140, 0.08); transform: scale(0.995); }

.row-l { display: flex; flex-direction: column; min-width: 62px; }
.row-issue { font-size: 14px; color: var(--gold); font-weight: 700; }
.row-date { font-size: 11px; color: var(--muted-2); }

.row-m { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; min-width: 0; }
.row-r { padding-left: 6px; border-left: 1px dashed var(--line); flex: 0 0 auto; }

/* ---------------- 快捷入口 ---------------- */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.quick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
}

.quick strong { font-size: 14px; color: var(--gold); }
.quick span { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------------- 历史表 ---------------- */
.year-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.year-tabs::-webkit-scrollbar { display: none; }

.year-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.year-tab.on {
  color: #2a1a0d;
  font-weight: 700;
  background: linear-gradient(160deg, #f6dcaa, #c99a4e);
  border-color: transparent;
}

.hist-table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.hist-head,
.hist-row {
  display: grid;
  grid-template-columns: 54px 74px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.hist-head {
  font-size: 11.5px;
  color: var(--muted-2);
  background: rgba(0, 0, 0, 0.25);
}

.hist-row { border-top: 1px solid rgba(233, 201, 140, 0.07); }
.hist-row:active { background: rgba(233, 201, 140, 0.06); }

.hist-issue { font-size: 13px; font-weight: 700; color: var(--gold); }
.hist-date { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; }
.hist-date i { font-size: 10.5px; color: var(--muted-2); }
.hist-balls { display: flex; gap: 3px; flex-wrap: wrap; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 13px;
}

.pg {
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.pg.disabled { color: var(--muted-2); opacity: 0.5; }
.pg-info { color: var(--muted); font-size: 12px; }

/* ---------------- 详情属性表 ---------------- */
.detail .balls .ball { width: 40px; height: 40px; font-size: 17px; }

.attr-table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.attr-tr {
  display: grid;
  grid-template-columns: 56px repeat(6, 1fr);
  align-items: center;
  padding: 8px 6px;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid rgba(233, 201, 140, 0.07);
}

.attr-th { border-top: 0; background: rgba(0, 0, 0, 0.25); color: var(--muted-2); font-size: 11px; }
.attr-tr.is-special-row { background: rgba(233, 201, 140, 0.06); }

.pn-nav { display: flex; gap: 10px; margin-top: 18px; }

.pn {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.pn small { font-size: 11px; color: var(--muted-2); }
.pn b { font-size: 13.5px; color: var(--gold); font-weight: 600; }
.pn.right { align-items: flex-end; text-align: right; }
.pn.disabled { opacity: 0.45; }

/* ---------------- 统计 ---------------- */
.stat-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.chip b { color: var(--gold); }

.sub-title {
  margin: 18px 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.4px;
}

.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.heat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 0 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 201, 140, 0.08);
}

.heat-cell b { font-size: 13px; }
.heat-cell em { font-size: 10.5px; color: var(--muted); }
.heat-cell b.red { color: #f17c76; }
.heat-cell b.blue { color: #7fa9e8; }
.heat-cell b.green { color: #5fc794; }
.heat-cell.lv0 { opacity: 0.42; }
.heat-cell.lv1 { background: rgba(233, 201, 140, 0.06); }
.heat-cell.lv2 { background: rgba(233, 201, 140, 0.12); }
.heat-cell.lv3 { background: rgba(233, 201, 140, 0.20); border-color: rgba(233, 201, 140, 0.3); }
.heat-cell.lv4 { background: rgba(233, 201, 140, 0.32); border-color: rgba(233, 201, 140, 0.45); }
.heat-cell.lv4 em, .heat-cell.lv3 em { color: var(--text); }

.heat-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--muted-2);
}
.heat-legend i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
.heat-legend .lg0 { background: rgba(255, 255, 255, 0.06); }
.heat-legend .lg1 { background: rgba(233, 201, 140, 0.10); }
.heat-legend .lg2 { background: rgba(233, 201, 140, 0.20); }
.heat-legend .lg3 { background: rgba(233, 201, 140, 0.32); }
.heat-legend .lg4 { background: rgba(233, 201, 140, 0.50); }

.bars { display: flex; flex-direction: column; gap: 8px; }

.bar-row { display: grid; grid-template-columns: 44px 1fr 62px; align-items: center; gap: 8px; }
.bar-label { font-size: 12px; color: var(--muted); }
.bar-track { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.10); overflow: hidden; }
.bar-track i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  box-shadow: 0 0 10px rgba(233, 201, 140, 0.25);
}
.bar-val { font-size: 12px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.bar-val small { color: var(--muted-2); font-size: 10.5px; }

.donut-row { display: flex; justify-content: space-around; gap: 8px; }

.donut-item { text-align: center; }
.donut-item p { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.donut-item p b { color: var(--text); }

.donut {
  --pct: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.07) 0);
}

.donut::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--bg-2);
}

.donut span { position: relative; font-size: 13px; font-weight: 700; color: var(--text); }
.donut.c红 { --c: #d94b45; }
.donut.c蓝 { --c: #3f7bd6; }
.donut.c绿 { --c: #2f9e63; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split { padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.split-t { font-size: 11.5px; color: var(--muted-2); margin-bottom: 8px; }
.split .bar-row { grid-template-columns: 34px 1fr 30px; }

.tail-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tail-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(233, 201, 140, 0.08);
}
.tail-cell span { font-size: 11px; color: var(--muted); }
.tail-cell b { font-size: 14px; color: var(--gold); }

/* ---------------- 文本块 ---------------- */
.prose { font-size: 13.5px; color: #d9cbbb; line-height: 1.75; }
.prose p + p { margin-top: 8px; }
.prose b { color: var(--gold); }
.prose strong { color: var(--gold); }

.muted-note { margin-top: 10px; font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }

.table-wrap { margin-top: 12px; overflow-x: auto; }

.rule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.rule-table th, .rule-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(233, 201, 140, 0.07);
}

.rule-table th { background: rgba(0, 0, 0, 0.25); color: var(--muted); font-weight: 500; }
.rule-table td:first-child { color: var(--gold); width: 64px; }

/* ---------------- 空状态 ---------------- */
.empty-state { padding: 28px 16px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--line); }
.empty-state p { color: var(--muted); font-size: 13px; }
.empty-state.big { padding: 48px 16px; }
.err-code { font-size: 44px; font-weight: 800; color: rgba(233, 201, 140, 0.35); line-height: 1; margin-bottom: 8px; }

.btn-ghost {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--gold);
  border: 1px solid rgba(233, 201, 140, 0.35);
}

/* ---------------- 页脚 & 底部导航 ---------------- */
.site-footer {
  max-width: 680px;
  margin: 30px auto 0;
  padding: 18px 16px 20px;
  text-align: center;
  border-top: 1px solid rgba(233, 201, 140, 0.08);
}

.foot-brand { font-size: 12px; color: var(--muted); }
.foot-tip { margin-top: 6px; font-size: 11px; color: var(--muted-2); line-height: 1.7; }
.foot-copy { margin-top: 8px; font-size: 10.5px; color: rgba(125, 108, 94, 0.8); }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 11, 10, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(233, 201, 140, 0.12);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  font-size: 10.5px;
  color: var(--muted-2);
}

.tab-ico { font-size: 16px; line-height: 1.1; }
.tab.on { color: var(--gold); }
.tab.on .tab-ico { text-shadow: 0 0 12px rgba(233, 201, 140, 0.6); }

/* ---------------- 小屏适配 ---------------- */
@media (max-width: 360px) {
  .ball { width: 34px; height: 34px; font-size: 14px; }
  .balls { gap: 4px; }
  .cd-unit em { min-width: 44px; font-size: 22px; }
  .attr-tr { grid-template-columns: 48px repeat(6, 1fr); font-size: 11px; }
  .heat-grid { grid-template-columns: repeat(6, 1fr); }
}
