/* ==========================================================================
   490188.xyz / 491588.xyz - Elite UI Theme (轻奢尊贵全站美化增强套件)
   Version: 1.0.0
   Design: Imperial Crimson & Sovereign Gold / Modern Financial Dashboard
   ========================================================================== */

:root {
  --elite-red-deep: #7a0c14;
  --elite-red-primary: #b71c1c;
  --elite-red-bright: #d32f2f;
  --elite-red-gradient: linear-gradient(135deg, #7a0c14 0%, #b71c1c 50%, #c62828 100%);
  --elite-gold-primary: #d4af37;
  --elite-gold-bright: #ffd700;
  --elite-gold-gradient: linear-gradient(135deg, #ffe082 0%, #ffd700 50%, #ffb300 100%);
  --elite-gold-text: #fff3c4;
  --elite-card-bg: #ffffff;
  --elite-card-border: #e2e8f0;
  --elite-card-radius: 10px;
  --elite-card-shadow: 0 3px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --elite-card-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   1. 顶部防伪与官方背书条已停用 (Completely removed per user request)
   -------------------------------------------------------------------------- */
#eliteSecurityBar,
.elite-security-bar {
  display: none !important;
  height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   2. 开奖仪表盘质感升级 (Cockpit Live Dashboard & Lottery Cards)
   -------------------------------------------------------------------------- */
body[data-reference-ui="1"] section.c1588-home-draw-grid.ref-home-result-list {
  background: #ffffff !important;
  border: 1.5px solid #d0d7de !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06) !important;
  margin: 10px auto 14px !important;
  transition: all 0.3s ease !important;
}

/* 单个彩种卡片现代轻奢化 */
body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  border-radius: 8px !important;
  padding: 8px 6px !important;
}

body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card:hover {
  background: #fbfcfe !important;
  cursor: pointer !important;
}

/* 激活选中的彩种卡片 - 尊贵红金高光轮廓 */
body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card.is-active-lottery,
body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card.is-selected {
  background: linear-gradient(180deg, #ffffff 0%, #fff9f0 100%) !important;
  box-shadow: inset 0 0 0 2px #d4af37, 0 4px 16px rgba(212, 175, 55, 0.22) !important;
  border-radius: 8px !important;
}

/* 彩种标题高光升级 */
body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card h2 {
  font-family: "Microsoft YaHei", -apple-system, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.5px !important;
  color: #1a1a1a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

/* 倒计时高清晰度与高对比升级（彻底解决深色背景看不清的问题） */
body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card .c1588-home-countdown,
body[data-reference-ui="1"] .c1588-home-countdown,
.c1588-home-countdown {
  background: #ffffff !important;
  color: #e53935 !important;
  font-family: "Impact", "Arial Black", "SF Pro Display", -apple-system, sans-serif !important;
  font-size: clamp(16px, 2.6vw, 22px) !important;
  font-weight: 900 !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  border: 1.5px solid #e53935 !important;
  box-shadow: 0 2px 6px rgba(229, 57, 53, 0.18) !important;
  letter-spacing: 0.8px !important;
  display: inline-block !important;
  text-shadow: none !important;
  line-height: 1.3 !important;
}

body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card .c1588-home-countdown-module,
.c1588-home-countdown-module {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: transparent !important;
}

body[data-reference-ui="1"] .c1588-home-draw-grid .ref-home-result-card .c1588-home-draw-time,
.c1588-home-draw-time {
  display: none !important;
}

/* 20261122 每个位置开奖数字去除渐进慢升动画，改为直接瞬间显示 */
.ref-home-ball.is-home-revealing {
  animation: none !important;
}

.ref-home-ball.is-home-revealing .ref-home-ball__num,
.ref-home-ball .ref-home-ball__num {
  animation: none !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.ref-home-ball.is-home-revealing .ref-home-ball__label,
.ref-home-ball .ref-home-ball__label {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* 开奖球体 3D 拟真立体高光 */
body[data-reference-ui="1"] .ref-home-ball,
.shengxiao span {
  box-shadow: inset -1px -2px 3px rgba(0, 0, 0, 0.35), inset 1px 2px 2px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.25) !important;
  font-weight: 900 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35) !important;
}

/* --------------------------------------------------------------------------
   3. 资料卡片现代轻奢化 (Modern Card UI & Clean Hierarchy)
   -------------------------------------------------------------------------- */
.provider-widgets-zone .marge-dom,
.marge-dom {
  margin-bottom: 12px !important;
  background: #ffffff !important;
  border-radius: var(--elite-card-radius) !important;
  border: 1px solid var(--elite-card-border) !important;
  box-shadow: var(--elite-card-shadow) !important;
  overflow: hidden !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (min-width: 768px) {
  .provider-widgets-zone .marge-dom:hover,
  .marge-dom:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--elite-card-hover-shadow) !important;
  }
}

/* 卡片表头统一升级为帝王绯红立体渐变 */
.provider-widgets-zone .list-title,
.list-title,
.list-title34 {
  background: var(--elite-red-gradient) !important;
  color: #ffffff !important;
  border-bottom: 2px solid #8e0000 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  padding: 9px 8px !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.provider-widgets-zone .list-title .red001,
.list-title .red001 {
  color: #fff176 !important; /* 优雅明黄在红底上极醒目 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.provider-widgets-zone .list-title .blue001,
.list-title .blue001 {
  color: #81d4fa !important; /* 优雅冰蓝 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* 表格斑马纹与柔和分隔线 */
.provider-widgets-zone table,
.box.pad table,
table.duilianpt,
table.duilianpt1 {
  border-collapse: collapse !important;
  background: #ffffff !important;
  border-color: #e5e9f0 !important;
}

.provider-widgets-zone table tr:nth-child(even),
.box.pad table tr:nth-child(even),
table.duilianpt tr:nth-child(even),
table.duilianpt1 tr:nth-child(even) {
  background-color: #fafbfc !important;
}

.provider-widgets-zone table th,
.box.pad table th,
table.duilianpt th,
table.duilianpt1 th {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
  font-weight: 900 !important;
}

.provider-widgets-zone table td,
.box.pad table td,
table.duilianpt td,
table.duilianpt1 td {
  border-color: #e9eef4 !important;
  line-height: 1.65 !important;
}

/* --------------------------------------------------------------------------
   4. 战绩勋章系统 (Gold & Crimson Result Badges)
   -------------------------------------------------------------------------- */
/* 中、准、连中勋章 */
.elite-badge-win,
.badge-zhun {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%) !important;
  color: #7a0c14 !important;
  font-weight: 900 !important;
  font-size: 13px !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  border: 1px solid #ffb300 !important;
  box-shadow: 0 1px 3px rgba(255, 152, 0, 0.4) !important;
  margin-left: 3px !important;
  line-height: 1.2 !important;
  text-shadow: none !important;
}

/* --------------------------------------------------------------------------
   5. 横幅画廊化美化 (Gallery-Style Interstitial Banners)
   -------------------------------------------------------------------------- */
.c1588-interstitial-banner,
.marge-dom.c1588-interstitial-banner {
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  margin: 14px auto 16px !important;
  background: #ffffff !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.c1588-interstitial-banner img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  transition: transform 0.3s ease !important;
}

@media (min-width: 768px) {
  .c1588-interstitial-banner:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
  }
}

/* --------------------------------------------------------------------------
   6. 移动端毛玻璃吸顶切换导航条 (Mobile Glassmorphism Sticky Nav)
   -------------------------------------------------------------------------- */
.elite-sticky-nav,
#eliteStickyNav {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   7. 悬浮极速回顶火箭按钮 (Floating Back-to-Top Rocket)
   -------------------------------------------------------------------------- */
.elite-back-top {
  position: fixed;
  right: 14px;
  bottom: 68px; /* 避开移动端底部导航 */
  z-index: 99990;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #c62828 0%, #8e0000 100%);
  border: 2px solid #ffd700;
  border-radius: 50%;
  color: #ffd700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.elite-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.elite-back-top:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ff8f00 100%);
  color: #7a0c14;
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.4);
}

.elite-back-top svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.elite-back-top span {
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   8. 底部官方三大金牌保障背书勋章 (Official Trust Footer Badges)
   -------------------------------------------------------------------------- */
.elite-trust-footer {
  width: 100%;
  max-width: 760px;
  margin: 20px auto 14px;
  padding: 14px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  box-sizing: border-box;
}

.elite-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: left;
}

.elite-trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe082 100%);
  border: 1.5px solid #ffb300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 179, 0, 0.25);
}

.elite-trust-text h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 900;
  color: #1e293b;
  line-height: 1.25;
}

.elite-trust-text p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
}

@media (max-width: 580px) {
  .elite-trust-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  .elite-trust-item {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   9. 首页公式/资料表格移动端全自适应套件 (Mobile Responsive Formula & Table Auto-fit)
   针对：单双八码、暴富双波、成语平特、连中七尾、独家20码、绝杀专区等所有公式模块
   彻底解决手机端右侧被截断、数字看不全的问题
   ========================================================================== */

/* 容器与表格宽度锁定 100%，防止撑出屏幕 */
.marge-dom,
.pszs,
.pszs.p-all,
.provider-widgets-zone,
.c1588-provider-tab-content {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 核心：针对所有公式表格，强制 fixed 布局与 100% 宽度 */
table.ta1,
.ta1,
.marge-dom table,
.pszs table,
table.qxtable,
table.table3 {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

/* 单元格自动高度，支持换行，消除固定高度截断 */
tr.komuonlam001,
table.ta1 tr,
.ta1 tr {
  width: 100% !important;
}

tr.komuonlam001 td,
table.ta1 td,
.ta1 td {
  width: 100% !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 6px 4px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  vertical-align: middle !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

/* 核心灵魂：针对 pre 标签彻底解除 white-space: pre 的限制 */
tr.komuonlam001 pre,
table.ta1 pre,
.ta1 pre,
.marge-dom pre,
.pszs pre,
.provider-widgets-zone pre {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: clamp(12px, 3.4vw, 15px) !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

/* pre 内部所有字号与样式继承，防止行内 14pt 覆盖 */
tr.komuonlam001 pre *,
table.ta1 pre *,
.ta1 pre * {
  font-family: inherit !important;
  font-size: inherit !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
}

/* 针对移动端屏幕 (< 768px) 的精准自适应 */
@media screen and (max-width: 768px) {
  table.ta1,
  .ta1,
  table.ta1 tbody,
  .ta1 tbody {
    width: 100% !important;
  }

  table.ta1,
  .ta1,
  table.ta1 td,
  .ta1 td {
    font-size: 13.5px !important;
    padding: 5px 3px !important;
  }

  tr.komuonlam001 pre,
  table.ta1 pre,
  .ta1 pre {
    font-size: 13px !important;
    letter-spacing: -0.25px !important;
    line-height: 1.4 !important;
  }

  /* 【内部单双八码】三列表格专属自适应比例：期号 18% | 单双号码 58% | 开奖结果 24% */
  [data-wgt-id="newmacau_danshuang"] table,
  [data-wgt-name*="单双八码"] table,
  [data-wgt-name*="单双＋八码"] table {
    width: 100% !important;
    table-layout: fixed !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:first-child,
  [data-wgt-name*="单双八码"] tr td:first-child {
    width: 18% !important;
    padding: 5px 2px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:nth-child(2),
  [data-wgt-name*="单双八码"] tr td:nth-child(2) {
    width: 58% !important;
    padding: 5px 2px !important;
    font-size: 12px !important;
    word-break: break-all !important;
    letter-spacing: -0.2px !important;
    line-height: 1.5 !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:last-child,
  [data-wgt-name*="单双八码"] tr td:last-child {
    width: 24% !important;
    padding: 5px 2px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
}

/* 针对主流手机窄屏 (<= 414px / 390px / 375px) 的深度微调 */
@media screen and (max-width: 414px) {
  tr.komuonlam001 pre,
  table.ta1 pre,
  .ta1 pre {
    font-size: 12.2px !important;
    letter-spacing: -0.35px !important;
    line-height: 1.35 !important;
  }

  /* 针对长公式单行容纳优化 (单双八码、连中七尾、暴富双波、成语平特) */
  [data-wgt-name*="单双＋八码"] pre,
  [data-wgt-name*="单双八码"] pre,
  [data-wgt-name*="暴富双波"] pre,
  [data-wgt-name*="成语平特"] pre,
  [data-wgt-name*="连中七尾"] pre,
  [data-wgt-name*="绝杀"] pre,
  [data-wgt-name*="七肖"] pre {
    font-size: 12px !important;
    letter-spacing: -0.4px !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:first-child,
  [data-wgt-name*="单双八码"] tr td:first-child {
    width: 17% !important;
    font-size: 11.5px !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:nth-child(2),
  [data-wgt-name*="单双八码"] tr td:nth-child(2) {
    width: 60% !important;
    font-size: 11px !important;
    letter-spacing: -0.4px !important;
  }

  [data-wgt-id="newmacau_danshuang"] tr td:last-child,
  [data-wgt-name*="单双八码"] tr td:last-child {
    width: 23% !important;
    font-size: 11.5px !important;
  }
}

/* 极窄屏 (<= 340px) 终极保底 */
@media screen and (max-width: 340px) {
  tr.komuonlam001 pre,
  table.ta1 pre,
  .ta1 pre {
    font-size: 11px !important;
    letter-spacing: -0.5px !important;
  }
}

