/* 六合彩：开奖倒计时条、开奖直播、走势统计（WAP + PC 共用，白底红主色） */
.lhc-page, .lhc-bar {
  --lhc-red: #d14124;
  --lhc-grad: linear-gradient(309deg, #d14124 24%, #f59c08 88%);
  --lhc-line: #f0e6e3;
  --lhc-text: #222;
  --lhc-sub: #8a8a8a;
  --lhc-ball-red: #e03b3b;
  --lhc-ball-blue: #2f6fdb;
  --lhc-ball-green: #1d9b52;
}
.lhc-page {
  margin: 0; background: #f6f6f8; color: var(--lhc-text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.lhc-page *, .lhc-page *::before, .lhc-page *::after, .lhc-bar, .lhc-bar * { box-sizing: border-box; }
.lhc-page a, .lhc-bar a { color: inherit; text-decoration: none; }
.lhc-page button { font-family: inherit; }

/* ---------- 号码球 ---------- */
.lhc-balls { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
.lhc-ball { display: inline-flex; flex-direction: column; align-items: center; width: 38px; }
.lhc-ball i {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--lhc-ball-red); background: #fff; color: #222; font-style: normal; font-weight: 700; font-size: 15px;
}
.lhc-ball.w-blue i { border-color: var(--lhc-ball-blue); }
.lhc-ball.w-green i { border-color: var(--lhc-ball-green); }
.lhc-ball i {
  --uvc: #e23a3a; border: 0; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .85) 0, rgba(255, 255, 255, .25) 22%, rgba(255, 255, 255, 0) 45%),
              radial-gradient(circle at 50% 120%, rgba(0, 0, 0, .35) 0, rgba(0, 0, 0, 0) 60%), var(--uvc);
  box-shadow: 0 3px 8px rgba(16, 24, 40, .3), inset 0 -4px 7px rgba(0, 0, 0, .32), inset 0 3px 5px rgba(255, 255, 255, .62);
}
.lhc-ball.w-blue i { --uvc: #2f6fe0; }
.lhc-ball.w-green i { --uvc: #37a24a; }
.lhc-ball em { margin-top: 3px; font-style: normal; font-size: 11px; color: #666; white-space: nowrap; }
.lhc-plus { align-self: center; margin: 0 2px 16px; color: #bbb; font-size: 18px; font-weight: 700; }
.lhc-ball.is-hidden i { border-color: #e6e6e6; color: transparent; background: #f4f4f4; box-shadow: inset 0 0 0 2px #e6e6e6; text-shadow: none; }
.lhc-ball.is-hidden em { visibility: hidden; }
.lhc-ball.is-pop i { animation: lhc-pop .6s ease-out; }
@keyframes lhc-pop { 0% { transform: scale(.2) rotate(-180deg); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.lhc-balls.sm .lhc-ball { width: 28px; }
.lhc-balls.sm .lhc-ball i { width: 26px; height: 26px; border-width: 2px; font-size: 12px; }
.lhc-balls.sm .lhc-ball em { font-size: 10px; }
.lhc-balls.sm .lhc-plus { margin-bottom: 12px; font-size: 14px; }

/* ---------- 倒计时条（开奖页 / 图库页） ---------- */
.lhc-bar {
  display: block; margin: 8px 10px; padding: 0; border-radius: 8px; background: #fff;
  box-shadow: 0 1px 6px rgba(209, 65, 36, .1); border: 1px solid #f6dcd5; overflow: hidden;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: #222; font-size: 13px; line-height: 1.4;
}
.lhc-bar-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.lhc-bar-row + .lhc-bar-row { border-top: 1px dashed #f3e1dc; }
.lhc-bar-main { flex: 1; min-width: 0; }
.lhc-bar-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhc-bar-name small { margin-left: 4px; font-weight: 400; color: #888; font-size: 12px; }
.lhc-bar-cd { margin-top: 2px; color: #666; font-size: 12px; white-space: nowrap; }
.lhc-bar-cd b { color: var(--lhc-red); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.lhc-bar-cd .is-live { color: var(--lhc-red); font-weight: 700; }
.lhc-bar-cd .is-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%;
  background: var(--lhc-red); vertical-align: 1px; animation: lhc-blink 1s infinite;
}
@keyframes lhc-blink { 50% { opacity: .2; } }
.lhc-bar-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.lhc-bar-btn {
  display: inline-block; padding: 4px 10px; border-radius: 14px; border: 1px solid #f0c2b6; color: var(--lhc-red) !important;
  font-size: 12px; white-space: nowrap; background: #fff;
}
.lhc-bar-btn.is-primary { background: var(--lhc-grad); border-color: transparent; color: #fff !important; }
.lhc-bar.lhc-bar-pc { margin: 12px 0; font-size: 14px; }
.lhc-bar.lhc-bar-pc .lhc-bar-row { padding: 10px 16px; }
.lhc-bar.lhc-bar-pc .lhc-bar-main { display: flex; align-items: baseline; gap: 18px; }
.lhc-bar.lhc-bar-pc .lhc-bar-cd { margin: 0; font-size: 13px; }

/* ---------- 页面骨架 ---------- */
.lhc-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; height: 46px; padding: 0 12px;
  background: var(--lhc-grad); color: #fff;
}
.lhc-top h1 { flex: 1; margin: 0; text-align: center; font-size: 17px; font-weight: 600; }
.lhc-top-back, .lhc-top-side { width: 64px; font-size: 14px; color: #fff !important; }
.lhc-top-side { text-align: right; }
.lhc-tabs { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--lhc-line); overflow-x: auto; }
.lhc-tab {
  flex: 0 0 auto; padding: 7px 16px; border-radius: 18px; border: 1px solid #eadad6; background: #fff; color: #555;
  font-size: 14px; cursor: pointer;
}
.lhc-tab.is-active { background: var(--lhc-grad); border-color: transparent; color: #fff; font-weight: 600; }
.lhc-main { padding: 10px 10px calc(20px + env(safe-area-inset-bottom, 0)); }
.lhc-card { margin-bottom: 10px; padding: 12px; border-radius: 8px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .04); }
.lhc-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.lhc-card h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--lhc-red); }
.lhc-card h3 small { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--lhc-sub); }
.lhc-muted { color: var(--lhc-sub); font-size: 12px; }
.lhc-links { display: flex; gap: 8px; flex-wrap: wrap; }
.lhc-link {
  flex: 1; min-width: 90px; padding: 9px 0; border-radius: 6px; border: 1px solid #f0c2b6; text-align: center;
  color: var(--lhc-red) !important; font-size: 14px; background: #fff;
}

/* ---------- 直播 ---------- */
.lhc-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #1b1b1f; }
.lhc-video video { width: 100%; height: 100%; display: block; background: #000; }
.lhc-video-tag {
  position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 8px; border-radius: 3px; background: rgba(209, 65, 36, .92);
  color: #fff; font-size: 12px;
}
.lhc-video-tag.is-replay { background: rgba(0, 0, 0, .55); }
.lhc-stage {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 40%, #fff6f2 0, #ffe3d8 45%, #f7c2ad 100%); color: #7a2a17; text-align: center; padding: 10px;
}
.lhc-stage-title { font-size: 16px; font-weight: 700; }
.lhc-stage-sub { font-size: 12px; color: #9a5a48; }
.lhc-stage .lhc-balls { justify-content: center; }
.lhc-drum { position: relative; width: 120px; height: 120px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 18px rgba(209, 65, 36, .25); overflow: hidden; }
.lhc-drum span {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--lhc-ball-red); background: #fff;
  font-size: 10px; line-height: 18px; text-align: center; font-weight: 700; animation: lhc-roll 1.6s linear infinite;
}
.lhc-drum span.w-blue { border-color: var(--lhc-ball-blue); }
.lhc-drum span.w-green { border-color: var(--lhc-ball-green); }
@keyframes lhc-roll {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(40px, -30px) rotate(90deg); }
  50% { transform: translate(10px, 40px) rotate(180deg); }
  75% { transform: translate(-40px, -10px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
.lhc-cd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.lhc-cd-grid div { padding: 8px 4px; border-radius: 6px; background: #fdf3f0; }
.lhc-cd-grid span { display: block; font-size: 12px; color: var(--lhc-sub); }
.lhc-cd-grid b { display: block; margin-top: 2px; font-size: 15px; color: var(--lhc-red); font-variant-numeric: tabular-nums; }
.lhc-result-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.lhc-result-head b { font-size: 15px; }
.lhc-attr-line { margin-top: 8px; font-size: 12px; color: #666; }
.lhc-attr-line b { color: var(--lhc-red); font-weight: 600; }

/* ---------- 走势 ---------- */
.lhc-sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.lhc-size { padding: 4px 12px; border-radius: 14px; border: 1px solid #eadad6; background: #fff; color: #666; font-size: 13px; cursor: pointer; }
.lhc-size.is-active { background: #fdeeea; border-color: #f3b9aa; color: var(--lhc-red); font-weight: 600; }
.lhc-sorts { display: flex; gap: 6px; margin-bottom: 8px; }
.lhc-num-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lhc-num { padding: 6px 0 4px; border-radius: 6px; background: #faf7f6; text-align: center; }
.lhc-num .lhc-ball { width: auto; }
.lhc-num .lhc-ball i { width: 30px; height: 30px; font-size: 13px; }
.lhc-num p { margin: 2px 0 0; font-size: 11px; color: #666; line-height: 1.3; }
.lhc-num p b { color: var(--lhc-red); }
.lhc-num.is-hot { background: #fbf1d9; box-shadow: inset 0 0 0 1px #ecd9a6; }
.lhc-num.is-cold { background: #eeeff2; }
.lhc-bars { display: grid; gap: 6px; }
.lhc-barrow { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.lhc-barrow > span:first-child { text-align: right; color: #444; }
.lhc-barrow .lhc-track { height: 12px; border-radius: 6px; background: #f4eeec; overflow: hidden; }
.lhc-barrow .lhc-fill { height: 100%; border-radius: 6px; background: var(--lhc-grad); }
.lhc-barrow .lhc-fill.w-red { background: var(--lhc-ball-red); }
.lhc-barrow .lhc-fill.w-blue { background: var(--lhc-ball-blue); }
.lhc-barrow .lhc-fill.w-green { background: var(--lhc-ball-green); }
.lhc-barrow > span:last-child { min-width: 82px; color: #888; font-size: 12px; white-space: nowrap; }
.lhc-stat-cols { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lhc-table-wrap { overflow-x: auto; }
.lhc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.lhc-table th, .lhc-table td { padding: 7px 4px; border-bottom: 1px solid #f2ecea; text-align: center; white-space: nowrap; }
.lhc-table th { background: #fdf3f0; color: #7a2a17; font-weight: 600; }
.lhc-table td.lhc-left { text-align: left; }
.lhc-table .lhc-balls { flex-wrap: nowrap; gap: 2px; }
.lhc-page:not(.lhc-pc) .lhc-table th, .lhc-page:not(.lhc-pc) .lhc-table td { padding: 6px 3px; }
.lhc-page:not(.lhc-pc) .lhc-table .lhc-balls.sm .lhc-ball { width: 24px; }
.lhc-page:not(.lhc-pc) .lhc-table .lhc-balls.sm .lhc-ball i { width: 22px; height: 22px; font-size: 11px; }
.lhc-tag { display: inline-block; min-width: 20px; padding: 0 4px; border-radius: 3px; color: #fff; line-height: 18px; }
.lhc-tag.w-red { background: var(--lhc-ball-red); }
.lhc-tag.w-blue { background: var(--lhc-ball-blue); }
.lhc-tag.w-green { background: var(--lhc-ball-green); }
.lhc-map { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 13px; }
.lhc-map div { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; background: #faf7f6; }
.lhc-map b { flex: 0 0 auto; width: 22px; color: var(--lhc-red); }
.lhc-map span { color: #444; word-break: break-all; }
.lhc-status { padding: 30px 0; text-align: center; color: var(--lhc-sub); font-size: 13px; }

/* ---------- PC ---------- */
.lhc-pc .lhc-wrap { width: 1200px; margin: 0 auto; padding: 16px 0 40px; }
.lhc-pc .lhc-tabs { border-radius: 8px; border: 0; margin-bottom: 12px; padding: 12px 16px; }
.lhc-pc .lhc-main { padding: 0; }
.lhc-pc .lhc-card { padding: 16px 18px; margin-bottom: 14px; }
.lhc-pc .lhc-live-grid { display: grid; grid-template-columns: 760px 1fr; gap: 14px; align-items: start; }
.lhc-pc .lhc-num-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.lhc-pc .lhc-stat-cols { grid-template-columns: repeat(4, 1fr); }
.lhc-pc .lhc-map { grid-template-columns: repeat(2, 1fr); }
.lhc-pc .lhc-table { font-size: 13px; }
.lhc-pc .lhc-ball { width: 42px; }
.lhc-pc .lhc-ball i { width: 38px; height: 38px; font-size: 16px; }
@media (min-width: 700px) {
  .lhc-page:not(.lhc-pc) .lhc-main { max-width: 760px; margin: 0 auto; }
}

/* 图库页：开奖直播与走势独立分类 */
.lhc-gallery-sections { margin: 8px 0; }
.lhc-gallery-heading {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px 4px; font-size: 14px; font-weight: 600; color: #333;
}
.lhc-gallery-heading span {
    position: relative; padding-left: 12px;
}
.lhc-gallery-heading span::before {
    content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
    width: 3px; border-radius: 2px; background: #e74c3c;
}
.lhc-pc .lhc-gallery-heading { padding: 12px 16px 6px; font-size: 15px; }
.lhc-gallery-sections .lhc-bar { margin-bottom: 4px; }

/* Tab筛选：选中某彩种时隐藏其他彩种的bar row */



/* Gallery tab filtering: hide non-selected lottery content */
/* Tab lot code xa6=新澳门 hk6=香港, bar row data-lot uses AMLHC3/LHC */
.lhc-gallery-sections.show-xa6 .lhc-bar-row[data-lot="LHC"],
.lhc-gallery-sections.show-xa6 [data-lhc-lot="LHC"] {
  display: none !important;
}
.lhc-gallery-sections.show-hk6 .lhc-bar-row[data-lot="AMLHC3"],
.lhc-gallery-sections.show-hk6 [data-lhc-lot="AMLHC3"] {
  display: none !important;
}
