/* =========================================================================
   澳门快三 · 开奖中心 —— 排版优化版
   · 开奖结果（骰子）居中 + 大号圆环倒计时
   · 骰子用真实点数（圆角白块 + 点），点色按单双：双=红、单=蓝
   · 走势图改"每期一行"的排列（走势表），图表自适应宽度、不再左右滚动
   ========================================================================= */

/* ---------------- 最新开奖：整体居中 ---------------- */
.live-head { justify-content: center; gap: 26px; }
.draw {
  flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 18px 6px 8px;
}
.draw-r { align-items: center; }
.sum-box { justify-content: center; }
.badges { justify-content: center; flex-wrap: wrap; }
.open-time { text-align: center; }
.live-foot { justify-content: center; }

/* ---------------- 骰子：圆角白块 + 真实点位 ---------------- */
.dice { gap: 14px; }
.die {
  position: relative; background: linear-gradient(160deg, #fff, #e8eefb);
  border-radius: 18px; padding: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .38), inset 0 -4px 0 rgba(0, 0, 0, .07);
}
.die .dots {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 15%; gap: 2px; box-sizing: border-box;
}
.die .dots i {
  border-radius: 50%; display: block;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, .18);
}
.die .dots i.even { background: radial-gradient(circle at 35% 30%, #ff6a70, #e01f27); }
.die .dots i.odd { background: radial-gradient(circle at 35% 30%, #5b7bff, #1b3fd8); }
.die.big { width: 86px; height: 86px; border-radius: 20px; }
.die.sm { width: 34px; height: 34px; border-radius: 9px; }
.die.sm .dots { padding: 14%; }
.die.sm i { box-shadow: none; }
.die.hit { animation: pop .5s ease; }

/* ---------------- 圆环倒计时 ---------------- */
.cd-ring-wrap { position: relative; width: 132px; height: 132px; margin: 2px 0; }
.cd-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.cd-ring .ring-track {
  fill: none; stroke: rgba(255, 255, 255, .10); stroke-width: 9;
}
.cd-ring .ring-bar {
  fill: none; stroke: url(#g) var(--gold); stroke: var(--gold);
  stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .5s linear;
  filter: drop-shadow(0 0 6px rgba(246, 198, 91, .45));
}
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.ring-center b {
  font-size: 34px; color: #fff; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring-center span { font-size: 11.5px; color: var(--muted); }

/* ---------------- 走势表（每期一行） ---------------- */
.trend-wrap { max-height: 440px; overflow-y: auto; overflow-x: auto; }
.trend-tbl { font-size: 13px; }
.trend-tbl thead th { position: sticky; top: 0; z-index: 2; backdrop-filter: blur(4px); }
.trend-tbl td { padding: 6px 8px; }

/* ---------------------------------------------------------------
   表格里的骰子必须**横着排**：
   骰子是 <div>（块级），不处理的话会竖着叠起来 ✗
   （原来这条规则只写给了走势表 .trend-tbl，漏了开奖历史的 .tbl ✗）
   --------------------------------------------------------------- */
.tbl .cell-dice { white-space: nowrap; }
.tbl .cell-dice .die {
  display: inline-flex; margin: 0 4px; vertical-align: middle;
}
.tbl .cell-dice .die:first-child { margin-left: 0; }
.tbl .cell-dice .die:last-child { margin-right: 0; }
/* 表格里的小骰子，尺寸统一再小一点更清爽 */
.tbl .cell-dice .die.sm {
  width: 30px; height: 30px; border-radius: 8px;
}
.tbl .cell-dice .die.sm .dots { padding: 13%; }
.tbl .cell-dice .die.sm .dots i { box-shadow: none; }
.trend-tbl .row-new { animation: rowIn .5s ease; }
@keyframes rowIn { from { background: rgba(246, 198, 91, .16); } to { background: transparent; } }
.trend-tbl .num { color: var(--gold); }

/* 走势表里的连线感：相邻期同一位置同号时给个淡色块 */
.trend-tbl td.v-same { background: rgba(246, 198, 91, .10); }

/* ---------------- 图表：自适应宽度，不左右滚动 ---------------- */
/* 走势图改成**一行一张卡片**（整行铺满），图更大、看得更清楚 */
.grid2 { align-items: start; grid-template-columns: 1fr; gap: 14px; }
.cv-wrap { overflow: hidden; }
.cv-wrap canvas { min-width: 0; width: 100%; }

/* ---------------- 预测计划表 ---------------- */
.plan-stats {
  font-size: 12.5px; color: var(--muted); line-height: 1.9;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 12px; margin-bottom: 10px;
}
.plan-stats b { color: var(--gold); }
.plan-stats i { font-style: normal; font-weight: 700; }
.plan-stats i.ok { color: #4fd39a; }
.plan-stats i.mid { color: #f6c65b; }
.plan-stats i.no { color: #ff7b87; }
.plan-wrap { max-height: 560px; overflow-y: auto; }
.plan-tbl thead th { position: sticky; top: 0; z-index: 2; backdrop-filter: blur(4px); }
.plan-tbl td { padding: 7px 8px; }
.plan-tbl .plan-cell {
  font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap;
}
.plan-tbl .plan-cell i { color: var(--muted); font-style: normal; font-weight: 400; margin: 0 3px; }
.plan-tbl .row-pending {
  background: rgba(246, 198, 91, .10);
  box-shadow: inset 3px 0 0 var(--gold);
}
.plan-tbl .row-pending .plan-cell { color: var(--gold); }
.mk { font-size: 16px; font-weight: 800; }
.mk.ok { color: #35d18f; }
.mk.mid { color: #f6c65b; }
.mk.no { color: #ff5b6b; }
.mk.wait { font-size: 12.5px; font-weight: 500; color: var(--muted); }

/* ---------------- 手机 ---------------- */
@media (max-width: 860px) {
  .live-head { gap: 16px; }
  .die.big { width: 70px; height: 70px; border-radius: 16px; }
  .cd-ring-wrap { width: 112px; height: 112px; }
  .ring-center b { font-size: 28px; }
  .trend-wrap { max-height: 360px; }
  .trend-tbl td { padding: 5px 6px; font-size: 12.5px; }
}
@media (max-width: 420px) {
  .die.big { width: 62px; height: 62px; }
  .die.sm { width: 28px; height: 28px; }
}

/* =========================================================================
   手机端紧凑版（用户反馈：开奖结果卡片、号码走势卡片太高，不好看）
   —— 骰子/圆环/字号/间距/表格一起收，整屏信息量更合适；图表高度在 JS 里等比缩
   ========================================================================= */
@media (max-width: 860px) {
  .wrap { padding: 0 10px; }
  .card { padding: 12px; margin: 10px 0; border-radius: 14px; }
  .card h3 { font-size: 14px; margin-bottom: 8px; }
  .card h3 small { font-size: 11px; }

  /* —— 最新开奖：压成"三行小卡"（用户：再矮一半）——
     ⚠ 关键一条：`.draw` 在手机端改**横排**（原来 .draw 是竖排 4 层：
     骰子 / 和值徽章 / 大圆环 / 开奖时间 -> 光这一块就有 240px 高）。
     横排后 骰子·和值·徽章·圆环·时间 挤在一行（窄屏自动折行），高度从
     ~240px 掉到 ~45px ✓ 这一条就省掉一半 ✓ */
  .card.live { padding: 10px 12px; }
  .live-head { gap: 10px; }
  .issue .label { font-size: 11.5px; }
  .issue b { font-size: 16px; letter-spacing: 1px; }
  .cd-label, .cd-unit { font-size: 11.5px; }
  .cd b { font-size: 18px; min-width: 26px; }
  .cd-track { height: 3px; margin: 6px 0 2px; }
  .draw { flex-direction: row; gap: 8px 10px; padding: 4px 0 0; }
  .dice { gap: 6px; }
  .die.big { width: 40px; height: 40px; border-radius: 10px; }
  .die.big .dots { padding: 14%; gap: 1px; }
  .draw-r { flex-direction: row; align-items: baseline; gap: 8px; }
  .sum-box { gap: 4px; }
  .sum-box span { font-size: 11.5px; }
  .sum-box b { font-size: 20px; }
  .badges { gap: 4px; }
  .bd { font-size: 11px; padding: 1px 8px; }
  .cd-ring-wrap { width: 40px; height: 40px; margin: 0; }
  .ring-center b { font-size: 14px; }
  .ring-center span { font-size: 8.5px; }
  .open-time { font-size: 11.5px; line-height: 1.2; }
  .live-foot { font-size: 11.5px; gap: 8px; padding-top: 5px; margin-top: 5px; }

  /* —— 走势表 / 历史表 —— */
  .trend-wrap { max-height: 248px; }
  .plan-wrap { max-height: 340px; }
  .tbl td { padding: 3px 5px; font-size: 12px; }
  .tbl th { padding: 6px 5px; font-size: 12px; }
  .tbl .cell-dice .die.sm { width: 22px; height: 22px; border-radius: 6px; margin: 0 2px; }
  .tbl .cell-dice .die.sm .dots { padding: 12%; }
  .tabs { gap: 6px; }
  .tab { padding: 7px 13px; font-size: 13px; }
  .grid2 { gap: 10px; }
  .bar { gap: 7px; }
  .bar input, .bar select { padding: 5px 7px; font-size: 12.5px; }
  .btn { padding: 6px 13px; font-size: 12.5px; }
  .plan-stats { font-size: 12px; padding: 8px 10px; line-height: 1.75; }
  .plan-tbl .plan-cell { font-size: 14px; }
  .hero-in { padding: 12px 10px; }
  .titles h1 { font-size: 17px; }
  .titles h1 span { font-size: 13px; margin-left: 6px; }
  .titles p { font-size: 12px; }
  .logo { width: 40px; height: 40px; border-radius: 11px; font-size: 16px; }
  .hero-stat b { font-size: 17px; }
  .hero-stat span { font-size: 11px; }
  .foot { padding: 12px 10px 22px; }
}

@media (max-width: 420px) {
  .die.big { width: 36px; height: 36px; border-radius: 9px; }
  .cd-ring-wrap { width: 36px; height: 36px; }
  .ring-center b { font-size: 13px; }
  .ring-center span { font-size: 8px; }
  .issue b { font-size: 14px; }
  .sum-box b { font-size: 18px; }
  .bd { font-size: 10.5px; padding: 1px 6px; }
  .tbl .cell-dice .die.sm { width: 20px; height: 20px; }
  .trend-wrap { max-height: 220px; }
}
