/* 全局重置 - 基础 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "微软雅黑", Arial, sans-serif;
}

/* 关键修复：确保body和html能滚动 */
html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* 禁止横向滚动 */
  overflow-y: auto;    /* 允许纵向滚动 */
  -webkit-overflow-scrolling: touch; /* 移动端顺滑滚动 */
  background-color: #f7f8fa; /* 新增：柔和页面背景 */
}

/*全局容器：控制整个网页的最大宽度 */
.wrapper {
  width: 100%;
  max-width: 500px; /* 整个网页最大500px，包括开奖模块 */
  margin: 0 auto;   /* 网页居中 */
  padding: 0 3px; /* 左右留白，适配移动端 */
  /* 移除可能限制滚动的样式 */
  overflow: visible;
}

/* 轮播容器 - 核心：由图片撑高，圆点基于此定位 */
.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  background: #f5f5f5; /* 加载占位背景 */
  margin-bottom: 3px; /* 轮播图和公告栏间距 */
}

/* 加载动画 */
.slider::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 35px;
  height: 35px;
  margin-left: -17px;
  margin-top: -17px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #999;
  border-radius: 50%;
  animation: loading 1s linear infinite;
  z-index: 0;
}
@keyframes loading {
  to { transform: rotate(320deg); }
}

/* 图片包裹层 - 撑满轮播容器 */
.slider-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease; /* 轮播过渡更丝滑 */
}

/* 轮播图片 - 完整显示+顶部对齐 */
.slider-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 80px;
  display: block;
  object-fit: contain; /* 完整显示图片 */
  object-position: top center; /* 顶部对齐，无空白 */
  border-radius: 0 !important;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  position: relative;
  border: none;
  z-index: 1;
}

/* 底部指示器 - 核心：浮在图片底部上层 */
.slider-dots {
  position: absolute;
  bottom: 12px; /* 距离图片底部的间距，和示例一致 */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  font-size: 16px;
  z-index: 99; /* 强制在图片上层 */
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5); /* 半透明白点 */
  cursor: pointer;
}
.dot.active {
  background: #ff9f00; /* 高亮色：橙色 */
}

/* 广告轮播图--end */

/* 公告栏核心样式（适配图片版） */
.notice-bar {
  width: 100%;
  height: 32px;
  line-height: 32px;
  background-color: #fff;
  border: 1px solid #eee;
  overflow: hidden;
  position: relative;
  margin-bottom: 5px; /* 公告栏和开奖模块间距 */
}

/* 喇叭图标容器（适配图片，彻底遮挡文字） */
.notice-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;          /* 足够宽的遮挡区 */
  height: 32px;         /* 和公告栏同高 */
  background-color: #fff;/* 纯白背景挡文字 */
  z-index: 999;         /* 最高层级 */
  display: flex;
  align-items: center;
  justify-content: center; /* 图片水平居中 */
}

/* 喇叭图片样式（关键！适配透明背景/不变形） */
.notice-icon img {
  width: 18px;          /* 图片显示大小（可改） */
  height: 18px;         /* 和宽度一致，避免拉伸 */
  object-fit: contain;  /* 完整显示图片，不变形 */
}

/* 文字滚动包裹层（从图标右侧开始，永不重叠） */
.notice-scroll-wrap {
  position: absolute;
  left: 40px;           /* 直接避开图标区域 */
  top: 0;
  width: calc(100% - 40px); /* 仅在右侧显示文字 */
  height: 100%;
  overflow: hidden;
}

/* 滚动文字容器 */
.notice-content {
  position: absolute;
  white-space: nowrap;
  left: 100%;
  top: 0;
  font-size: 14px;
  color: #ff6c00;
  animation: noticeScroll 20s linear infinite;
}

@keyframes noticeScroll {
  0% { left: 100%; }
  100% { left: -100%; }
}

.notice-bar:hover .notice-content {
  animation-play-state: paused;
}

/* 站内公告滚动栏样式--end */

/* 开奖信息模块样式（适配500px宽度） */
.lottery-container {
  width: 100%;
  border: 0px solid #eee;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  margin-bottom: 5px;
}

/* 彩种标签栏 - 限制最多显示5个tab，超出自动适配 */
.lottery-tabs {
  display: flex;
  gap: 3px;
  background-color: #ffffff;
  border-bottom: 1px solid #2b5cbc; /* 主色：深蓝 */
  /* 最多5个tab适配 */
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* 隐藏tab栏滚动条 */
.lottery-tabs::-webkit-scrollbar {
  display: none;
}
.tab-item {
  flex: 1;
  min-width: 80px; /* 最小宽度，防止过窄 */
  text-align: center;
  padding: 8px 0; /* 缩小内边距，适配移动端 */
  font-size: 16px;
  font-weight: 550;
  cursor: pointer;
  position: relative;
  color: #333;
  background-color: #f5f5f5; /* tab自身的背景色（原父容器的背景色） */
}

/* 激活态标签（新新彩默认激活） */
.tab-item.active {
  color: #fff;
  background-color: #2b5cbc; /* 主色：深蓝 */
}

/* 开奖日期提示 */
.tab-date {
  display: block;
  font-size: 11px;
  font-weight: normal;
  margin-top: 1px;
}

/* 开奖信息主体 */
.lottery-content {
  border: 1px solid #2b5cbc;
  border-top: none; /* 隐藏上边框 */
  padding: 12px;
}

/* 期数+倒计时栏 */
.lottery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 5px;
}

.period-num {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.period-number {
  color: #2b5cbc;
}

.countdown {
  color: #e60000;
  font-size: 15px;
  font-weight: 500;
}

.history-btn {
  color: #2b5cbc;
  text-decoration: none;
  font-size: 14px;
}

/* 开奖号码区域 */
.lottery-numbers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center; /* 号码居中显示 */
}

/* 号码球通用样式（适配目标网站的图片球） */
.number-ball {
  font-size: 20px;    /* 对应目标网站的.36rem */
  width: 45px;        /* 对应目标网站的.8rem */
  height: 45px;       /* 对应目标网站的.8rem */
  font-weight: 500;   /* 超粗体，匹配目标样式 */
  line-height: 45px;  /* 数字垂直居中 */
  margin: 0;       /* 水平居中 */
  text-align: center; /* 文字水平居中 */
  color: #000;        /* 数字颜色（目标网站是黑色，如需白色改#fff） */
  background-repeat: no-repeat;
  background-size: 45px 45px; /* 图片铺满整个球 */
  border-radius: 0;   /* 取消圆角（图片本身是圆形） */
  position: relative; /* 保留生肖文字定位 */
}

/* 蓝色球（用下载的图片做背景） */
.ball-blue {
  background-image: url("../imgs/blue-ball.png"); /* 替换成你实际的图片路径 */
}

/* 绿色球 */
.ball-green {
  background-image: url("../imgs/green-ball.png");
}

/* 红色球 */
.ball-red {
  background-image: url("../imgs/red-ball.png");
}

/* 灰色摇珠中球 */
.ball-gray {
  background: #cccccc !important; /* 纯灰色背景 */
  border-radius: 50% !important;   /* 正圆形 */
  background-image: none !important; /* 取消原来的图片 */
  color: #333;
}

/* 生肖五行说明（保留原有样式，适配图片球） */
.ball-desc {
  position: absolute;
  bottom: -35px;
  left: 0;
  width: 100%;
  text-align: center; 
  font-size: 14px;
  color: #333;
  font-weight: normal;
}

/* +号分隔符 */
.plus-sign {
  font-size: 16px;
  color: #333;
  margin: 0 4px;
}

/* 下期开奖提示 */
.next-period {
  margin-top: 30px;
  font-size: 15px;
  color: #e71607;
  text-align: center;
  font-family: Source Han Sans CN;
}

/* 隐藏非激活彩种内容 */
.lottery-panel {
  display: none;
}
.lottery-panel.active {
  display: block;
}

/* 广告图容器 - 适配全局500px宽度 */
.ad-container {
  width: 100%;
  margin-bottom: 5px; /* 广告图和下方文字的间距，可自定义 */
  background: #f5f5f5; /* 加载占位背景，和轮播图一致 */
}

/* 广告图样式 - 核心：完整显示、不变形 */
.ad-img {
  width: 100%; /* 撑满容器宽度，适配全局500px限制 */
  display: block; /* 去除图片默认的行内间隙 */
  object-fit: contain; /* 完整显示图片，不拉伸、不裁剪 */
  object-position: center; /* 图片居中 */
  min-height: 30px; /* 防止图片加载前容器高度为0 */
  border: none; /* 去除默认边框 */
}

/* ========== 资料预测模块样式========== */
.predict-container {
  width: 100%;
  margin-bottom: 3px;
  border: 1px solid #2b5cbc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

/* 预测模块标题栏（和开奖模块风格统一） */
.predict-title {
  /*background-color: #2b5cbc;*/
  /* 线性渐变（从上到下） */
  background: linear-gradient(to right, #A1C5FF, #2b5cbc, #A1C5FF);
  color: #fff;
  font-size: 16px;
  font-weight: 550;
  padding: 8px 12px;
  border-bottom: 1px solid #2b5cbc;
  text-align: center;
}

/* 预测内容列表容器 */
.predict-list {
  padding: 10px 8px;
}

/* 单条预测内容项 */
.predict-item {
  margin-bottom: 8px;
  padding: 6px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border-left: 3px solid #2b5cbc;
}

/* 期数行（第一行） */
.predict-period {
  font-size: 15px;
  color: #333;
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 开奖结果标签（对错/开奖号） */
.predict-result {
  font-size: 14px;
  color: #f59e0b;
  font-weight: 500;
}

/* 预测内容行（核心内容） */
.predict-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.predict-zhodiac {
  color:  #3b7ddd; /* 蓝色突出生肖 */
  font-weight: 600;
}

.predict-number {
  color: #333;
   font-weight: 600;
  margin-left: 4px;
}
/* 吉美丑凶颜色定义 */
.ji-mei, .yin-xiao, .nan-xiao { color: #3b7ddd; font-weight: 600; }
.chou-xiong, .yang-xiao, .nv-xiao { color: #e60000; font-weight: 600; }

/* 风雨雷电分类颜色 */
.wind { color: #3b7ddd; font-weight: 600; }
.thunder { color: #e60000; font-weight: 600; }
.rain { color: #5a9fef; font-weight: 600; }
.lightning { color: #7c4dff; font-weight: 600; }

/* 春夏秋冬分类颜色（新增） */
.spring { color: #3b7ddd; font-weight: 600; }
.summer { color: #e60000; font-weight: 600; }
.autumn { color: #ff7d42; font-weight: 600; }
.winter { color: #5a9fef; font-weight: 600; }

/* 五行颜色定义（新增） */
.water { color: #5a9fef; font-weight: 600; }
.fire { color: #e60000; font-weight: 600; }
.earth { color: #ff7d42; font-weight: 600; }
.wood { color: #3b7ddd; font-weight: 600; }
.gold { color: #ffc107; font-weight: 600; }

/* 玄武六肖颜色定义（新增） */
.xuanwu { color: #6c5ce7; font-weight: 600; }

/* 天地三肖颜色定义（新增） */
.tian { color: #e60000; font-weight: 600; }
.di { color: #5a9fef; font-weight: 600; }

/* 独家三头颜色定义（新增） */
.exclusive-three { color: #ff7d42; font-weight: 600; }

/* 凤凰五尾颜色定义（新增） */
.phoenix-five { color: #ff6b35; font-weight: 600; }

/* 神机九肖颜色定义（新增） */
.shenji-nine { color: #8e44ad; font-weight: 600; }

/* 风雨雷电/双波中特/六合凤凰/家野各三肖/精准五行/平特一肖/准杀十码/玄武六肖/春夏秋冬/天地三肖/独家三头/凤凰五尾/彩霸王六肖/神机九肖列表通用样式 */
.weather-list, .wave-list, .phoenix-list, .animal-list, .five-elements-list, .pingte-list, .kill-number-list, .xuanwu-list, .season-list, .tian-di-list, .exclusive-three-list, .phoenix-five-list, .caibawang-list, .shenji-nine-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.weather-list-item, .wave-list-item, .phoenix-list-item, .animal-list-item, .five-elements-list-item, .pingte-list-item, .kill-number-list-item, .xuanwu-list-item, .season-list-item, .tian-di-list-item, .exclusive-three-list-item, .phoenix-five-list-item, .caibawang-list-item, .shenji-nine-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px; /* 减少内边距，节省空间 */
  border-bottom: 1px dashed #eee;
  font-size: 14px;
  white-space: nowrap; /* 强制单行显示，禁止子元素换行 */
}
/* 最后一行去掉下划线 */
.weather-list-item:last-child, .wave-list-item:last-child, .phoenix-list-item:last-child, .animal-list-item:last-child, .five-elements-list-item:last-child, .pingte-list-item:last-child, .kill-number-list-item:last-child, .xuanwu-list-item:last-child, .season-list-item:last-child, .tian-di-list-item:last-child, .exclusive-three-list-item:last-child, .phoenix-five-list-item:last-child, .caibawang-list-item:last-child, .shenji-nine-list-item:last-child {
  border-bottom: none;
}
/* 期数列 - 使用min-width替代固定宽度，保留弹性 */
.weather-period-col, .wave-period-col, .phoenix-period-col, .animal-period-col, .five-elements-period-col, .pingte-period-col, .kill-number-period-col, .xuanwu-period-col, .season-period-col, .tian-di-period-col, .exclusive-three-period-col, .phoenix-five-period-col, .caibawang-period-col, .shenji-nine-period-col {
  min-width: 65px; /* 基础最小宽度 */
  flex: 0 0 auto; /* 取消固定宽度，自适应内容 */
  color: #333;
  font-weight: 500;
  font-size: 15px;
}
/* 结果列 - 缩小宽度+自适应 */
.weather-result-col, .wave-result-col, .phoenix-result-col, .animal-result-col, .five-elements-result-col, .pingte-result-col, .kill-number-result-col, .xuanwu-result-col, .season-result-col, .tian-di-result-col, .exclusive-three-result-col, .phoenix-five-result-col, .caibawang-result-col, .shenji-nine-result-col {
  min-width: 70px; /* 基础最小宽度 */
  flex: 0 0 auto; /* 取消固定宽度，自适应内容 */
  color: #f59e0b; /* 你指定的颜色 */
  text-align: right;
}
/* 符号/内容列 - 占剩余空间，允许文字压缩 */
.weather-symbol-col, .wave-symbol-col, .phoenix-symbol-col, .animal-content-col, .five-elements-content-col, .pingte-content-col, .kill-number-content-col, .xuanwu-content-col, .season-symbol-col, .tian-di-content-col, .exclusive-three-content-col, .phoenix-five-content-col, .caibawang-content-col, .shenji-nine-content-col {
  flex: 1; /* 占满剩余空间 */
  text-align: center;
  color: #3b7ddd;
  font-weight: 600;
  overflow: hidden; /* 超出隐藏，防止撑破容器 */
  text-overflow: ellipsis; /* 超出显示省略号（可选） */
  white-space: nowrap; /* 强制单行 */
}

/* 风雨雷电/双波中特/六合凤凰/家野各三肖/精准五行/准杀十码/玄武六肖/春夏秋冬/天地三肖/独家三头/凤凰五尾/彩霸王六肖/神机九肖说明行样式 */
.weather-content, .wave-content, .phoenix-content, .animal-content, .five-elements-content, .kill-number-content, .pingte-content, .xuanwu-content, .season-content, .tian-di-content, .exclusive-three-content, .phoenix-five-content, .caibawang-content, .shenji-nine-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 8px;
  padding: 6px;
  background-color: #edf2fb;
  border-radius: 4px;
  text-align: center;
}

/* 三波颜色定义 —— 禁止修改 */
.red-wave { color: #e60000; font-weight: 600; }
.green-wave { color: #07c160; font-weight: 600; }
.blue-wave { color: #0088ff; font-weight: 600; }

/* 家野各三肖颜色定义 */
.jia { color: #e60000; font-weight: 600; }
.ye { color: #5a9fef; font-weight: 600; }

/* 六合凤凰/彩霸王六肖tab样式（复用开奖模块tab样式，保持统一） */
.phoenix-tabs, .caibawang-tabs, .tsp-tabs, .sjmn-tabs {
  display: flex;
  gap: 3px;
  background-color: #ffffff;
  border-bottom: 1px solid #2b5cbc;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}
.phoenix-tabs::-webkit-scrollbar, .caibawang-tabs::-webkit-scrollbar, .tsp-tabs::-webkit-scrollbar , .sjmn-tabs::-webkit-scrollbar{
  display: none;
}
.phoenix-tab-item, .caibawang-tab-item, .tsp-tab-item, .sjmn-tab-item {
  flex: 0 0 calc(20% - 2.4px); /* 适配5个tab均分 */
  min-width: 70px;
  text-align: center;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  color: #333;
  background-color: #f5f5f5;
}
.phoenix-tab-item.active, .caibawang-tab-item.active, .tsp-tab-item.active, .sjmn-tab-item.active {
  color: #fff;
  background-color: #2b5cbc;
}

/* 六合凤凰/彩霸王六肖图片容器 */
.phoenix-img-container, .caibawang-img-container, .tsp-img-container, .sjmn-img-container {
  width: 100%;
  background: #f5f5f5; /* 加载占位背景 */
  display: none; /* 默认隐藏所有图片容器 */
}
.phoenix-img-container.active, .caibawang-img-container.active, .tsp-img-container.active , .sjmn-img-container.active{
  display: block; /* 激活态显示 */
}
.phoenix-img, .caibawang-img, .tsp-img, .sjmn-img {
  width: 100%;
  display: block;
  object-fit: contain; /* 完整显示图片，不变形 */
  object-position: center;
  min-height: 100px; /* 防止图片加载前容器高度为0 */
  border: none;
}

/* 新增：生肖牌图片容器样式 */
.zodiac-card-container {
  width: 100%;
  margin: 5px 0; /* 和上下模块保持一致的间距 */
  background: #f5f5f5; /* 加载占位背景 */
}
.zodiac-card-img {
  width: 100%;
  display: block;
  object-fit: contain; /* 完整显示图片，不变形 */
  object-position: center;
  min-height: 50px; /* 防止图片加载前高度为0 */
  border: none;
}

/* 网站声明模块样式 */
.declaration-container {
  width: 100%;
  margin: 10px 0 20px 0; /* 上下间距，和其他模块保持一致 */
  padding: 15px 12px;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 8px; /* 和其他模块圆角统一 */
}

.declaration-content {
  font-size: 14px;
  line-height: 1.8; /* 行高适中，便于阅读 */
  color: #666; /* 灰色文字，符合声明类内容的视觉风格 */
}

.declaration-text {
  margin-bottom: 8px; /* 两段声明之间的间距 */
  text-align: justify; /* 两端对齐，排版更美观 */
}

.disclaimer-text {
  text-align: justify;
  color: #e60000; /* 免责声明用红色突出，提醒用户注意 */
  font-weight: 500;
}

.highlight-bg {
  background: #ffeb3b;    /* 禁止修改 */
  padding: 0 1px;
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.2;
}
 
.result-black {
  color: #000 !important;
}
/* ========== 历史记录弹窗样式（最终版：修复标题栏高度+关闭按钮固定+号码不换行） ========== */
.history-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}
.history-modal.show {
  display: flex;
}
.history-popup {
  width: 95%;
  max-width: 500px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

/* 标题栏：彻底固定高度 */
.history-header {
  padding: 0 40px;
  background: #edf2fb;
  border-bottom: 1px solid #d7e3fc;
  font-size: 18px;
  font-weight: bold;
  color: #2b5cbc;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px !important;
  min-height: 50px !important;
  line-height: 50px !important;
  z-index: 2;
  flex-shrink: 0;
  flex-grow: 0;
}

/* 关闭按钮 */
.history-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 24px;
  font-weight: bold;
  color: #2b5cbc;
  cursor: pointer;
  padding: 0;
  line-height: 30px;
  text-align: center;
  z-index: 999;
  border-radius: 50%;
  background-color: #fff;
}
.history-close:hover {
  color: #1e49a0;
  background-color: #f5f5f5;
}

/* 内容区域 */
.history-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  -webkit-overflow-scrolling: touch;
  z-index: 1;
  scrollbar-gutter: stable;
  padding-right: calc(15px + var(--scrollbar-width, 4px));
}

.history-item {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e0e0e0;
}
.history-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.history-period-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.history-period {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}
.history-date {
  font-size: 14px;
  color: #999;
}

/* 号码栏：不换行 + 横向滚动 */
.history-balls-wrap {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 8px;
  justify-content: center;
  overflow-x: auto;
  padding-bottom: 5px;
}
.history-balls-wrap::-webkit-scrollbar {
  height: 3px;
}
.history-balls-wrap::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

/* 号码球样式 */
.history-ball {
  width: 42px;
  height: 42px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 18px;
  font-weight: 500;
  position: relative;
  box-shadow: none;
  background-repeat: no-repeat;
  background-size: 42px 42px;
  flex-shrink: 0;
}
.history-ball.red { 
  background-image: url("../imgs/red-ball.png");
} 
.history-ball.green { 
  background-image: url("../imgs/green-ball.png");
} 
.history-ball.blue { 
  background-image: url("../imgs/blue-ball.png");
}
.history-ball.gray {
  background: #cccccc !important;
  border-radius: 50% !important;
  background-image: none !important; 
  color: #333;
}
.history-ball-plus {
  font-size: 16px;
  color: #999;
  margin: 0 2px;
  flex-shrink: 0;
}
.history-ball-desc {
  font-size: 11px;
  color: #666;
  text-align: center;
  margin-top: 4px;
  width: 42px;
}
.history-loading {
  text-align: center;
  padding: 15px;
  color: #666;
  font-size: 14px;
  display: none;
}
.history-loading.show {
  display: block;
}
.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}


/* 资料悬浮按钮 */
.data-float-btn {
  position: fixed !important;
  right: 15px !important;
  bottom: 15px !important;
  width: 50px !important;
  height: 50px !important;
  background-color: #2b5cbc !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
  z-index: 999999 !important;
  transition: all 0.3s ease !important;
  border: 2px solid #fff !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  touch-action: manipulation !important;
}
.data-float-btn:hover {
  background-color: #1e49a0 !important;
  transform: scale(1.05) !important;
}
.btn-text {
  user-select: none;
}


/* 回到顶部按钮 */
.back-to-top-btn {
  position: fixed !important;
  right: 15px !important;
  bottom: 75px !important;
  width: 50px !important;
  height: 50px !important;
  background-color: #555 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 24px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
  z-index: 9999999 !important;
  transition: all 0.3s ease !important;
  border: 2px solid #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  touch-action: manipulation !important;
}
.back-to-top-btn:hover {
  background-color: #444 !important;
  transform: scale(1.05) !important;
}
.back-to-top-icon {
  user-select: none !important;
}
/* 资料弹窗遮罩层 */
.data-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}
.data-modal.show {
  display: block;
}
.data-modal-mask {
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

/* 弹窗内容容器 */
.data-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 750px;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

/* 弹窗标题栏 */
.data-modal-header {
  padding: 8px 12px;
  height: 40px;
  background-color: #2b5cbc;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.data-modal-header h3 {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}
.data-modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 30px;
  text-align: center;
}
.data-modal-close:hover {
  color: #f5f5f5;
}

/* 弹窗列表容器 */
.data-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  -webkit-overflow-scrolling: touch;
}

/* 导航列表样式 */
.data-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  display: -ms-grid;
  -ms-grid-columns: 1fr 8px 1fr 8px 1fr;
  -ms-grid-rows: auto;
}

.data-nav-list > li:nth-child(3n+2) {
  -ms-grid-column: 3;
}
.data-nav-list > li:nth-child(3n+3) {
  -ms-grid-column: 5;
}

.data-nav-item {
  padding: 12px 8px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  border-bottom: none;
  background-color: #f9f9f9;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s ease;
  -ms-grid-row-span: 1;
}
.data-nav-item:last-child {
  border-bottom: none;
}
.data-nav-item:hover {
  background-color: #edf2fb;
  color: #2b5cbc;
}


.main-predict-nav {
 
  width: 100%;
  margin-bottom: 3px;
  border: 1px solid #2b5cbc;
  border-radius: 8px;
  
  #margin: 12px 10px 18px;
  ##padding: 12px 10px;
  background: #ffffff;
  #border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-title {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  color: #d42a2a;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* 🔥 只改这里：所有按钮 100% 等宽，一行 4 个，完美对齐 */
.nav-item {
  /* 核心等宽代码，替换你原来的所有样式 */
  flex: 0 1 calc(25% - 8px);
  padding: 6px 0;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-item:active {
  background: #d42a2a;
  color: #fff;
  transform: scale(0.95);
}

.nav-item:hover {
  background: #fff3f3;
  border-color: #d42a2a;
  color: #d42a2a;
}



/* 响应式适配：小屏幕仅调整字体/间距，不改变列数 */
@media (max-width: 600px) {
  .data-nav-item {
    font-size: 14px;
    padding: 10px 6px;
  }
  .data-nav-list {
    gap: 6px;
  }
  .data-float-btn,
  .back-to-top-btn {
    width: 45px !important;
    height: 45px !important;
    right: 10px !important;
  }

  .back-to-top-btn {
    bottom: 65px !important;
    font-size: 20px !important;
  }

  .data-float-btn {
    bottom: 10px !important;
    font-size: 14px !important;
  }
}

/* 响应式适配（移动端进一步缩小） */
@media (max-width: 400px) {
  .number-ball {
    width: 40px;
    height: 40px;
    font-size: 16px;
    line-height: 40px;
    background-size: 40px 40px;
  }
  .tab-item {
    font-size: 14px;
    flex: 1; 
    min-width: 70px;
  }
  .ball-desc {
    font-size: 12px;
    bottom: -30px;
  }
  
  .predict-title {
    font-size: 14px;
    padding: 6px 10px;
  }
  .predict-period, .weather-list-item, .wave-list-item, .phoenix-list-item, .animal-list-item, .five-elements-list-item, .pingte-list-item, .kill-number-list-item, .xuanwu-list-item, .season-list-item, .tian-di-list-item, .exclusive-three-list-item, .phoenix-five-list-item, .caibawang-list-item, .shenji-nine-list-item {
    font-size: 13px;
  }
  .predict-content, .weather-content, .wave-content, .phoenix-content, .animal-content, .five-elements-content, .kill-number-content, .pingte-content, .xuanwu-content, .season-content, .tian-di-content, .exclusive-three-content, .phoenix-five-content, .caibawang-content, .shenji-nine-content {
    font-size: 12px;
  }
  .weather-period-col, .wave-period-col, .phoenix-period-col, .animal-period-col, .five-elements-period-col, .pingte-period-col, .kill-number-period-col, .xuanwu-period-col, .season-period-col, .tian-di-period-col, .exclusive-three-period-col, .phoenix-five-period-col, .caibawang-period-col, .shenji-nine-period-col {
    min-width: 60px;
    font-size: 13px;
  }
  .weather-result-col, .wave-result-col, .phoenix-result-col, .animal-result-col, .five-elements-result-col, .pingte-result-col, .kill-number-result-col, .xuanwu-result-col, .season-result-col, .tian-di-result-col, .exclusive-three-result-col, .phoenix-five-result-col, .caibawang-result-col, .shenji-nine-result-col {
    min-width: 65px;
    font-size: 13px;
  }
  .phoenix-img, .caibawang-img {
    min-height: 80px;
  }
  .phoenix-tab-item, .caibawang-tab-item {
    font-size: 12px;
    flex: 0 0 calc(20% - 2px);
    min-width: 60px;
    padding: 4px 0;
  }
  .zodiac-card-img {
    min-height: 80px;
  }
  
  .declaration-container {
    padding: 10px 8px;
  }
  .declaration-content {
    font-size: 12px;
    line-height: 1.6;
  }

  .history-header {
    font-size: 16px;
    height: 45px !important;
    min-height: 45px !important;
    line-height: 45px !important;
    padding: 0 35px;
  }
  .history-close {
    width: 26px;
    height: 26px;
    font-size: 20px;
    line-height: 26px;
    top: 9px;
    right: 9px;
  }
  .history-ball {
    width: 38px;
    height: 38px;
    font-size: 16px;
    background-size: 38px 38px;
  }
  .history-ball-desc {
    width: 38px;
    font-size: 10px;
  }
  .history-period {
    font-size: 14px;
  }
  .history-date {
    font-size: 12px;
  }
  .history-balls-wrap {
    gap: 3px;
  }
  .history-body {
    padding-right: calc(15px + var(--scrollbar-width, 3px));
  }
  
  .data-float-btn {
    width: 45px;
    height: 45px;
    font-size: 14px;
    right: 10px;
    bottom: 10px;
  }
  
  .data-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  .data-modal-header {
    padding: 10px 12px;
  }
  .data-modal-header h3 {
    font-size: 16px;
  }
  
  .data-nav-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  .data-nav-item {
    font-size: 13px;
    padding: 8px 4px;
    border-radius: 4px;
    background-color: #f9f9f9;
    text-align: center;
  }
  
  .nav-item {
    min-width: 30%;
}

@media (max-width: 375px) {
  .lottery-numbers {
    gap: 4px;
  }
  .countdown {
   font-size: 13px;
  }
  .history-btn {
   font-size: 13px;
  }
  
  .data-nav-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }
  .data-nav-item {
    font-size: 12px;
    padding: 6px 2px;
  }
}