/* ====================
   Global Reset & Base
   ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f5f7fa;
  min-height: 100vh;
  width: 100%;
  max-width: 700px; /* 调整最大宽度为 700px */
  margin: 0 auto;
  word-break: break-all;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

/* ====================
   Header
   ==================== */
.header {
  width: 100%;
  max-width: 700px;
  background: #2391C3;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 10px;
  position: relative;
}

.logo {
  height: 60px;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

/* Spinner */
.spinner {
  width: 60px;
  height: 60px;
  position: absolute;
  left: 70%;
  top: 0;
  transform: translateX(-50%);
  z-index: 101;
}

.spinner-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  animation: spin 5s linear infinite;
}

@keyframes spin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* Bank Icon */
.bank-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  text-align: center;
}

.bank-img {
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
}

.bank-text {
  color: #ffffff;
  font-size: 12px;
}

/* Nav Menu */
.nav-menu {
  width: 100%;
  background-color: #2391C3;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 3px 0;
}

.nav-menu-inner {
  display: flex;
  justify-content: space-around;
  list-style: none;
}

.nav-item {
  flex: 1;
  text-align: center;
}

.nav-item a {
  display: block;
  height: 40px;
  line-height: 40px; /* Adjusted line-height */
  color: #ffffff !important;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s;
}

.nav-item a:hover {
  background-color: #ffffff;
  color: #2391C3 !important;
}

/* Spacing for fixed header */
.header-blank {
  height: 110px; /* Header (60) + Nav (approx 50) */
}

/* ====================
   Icon Bar
   ==================== */
.icon-bar {
  display: flex;
  justify-content: space-around;
  padding: 10px 5px;
  background: #fff;
  margin-bottom: 10px;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18%;
  text-align: center;
  opacity: 0; /* Initially hidden for animation */
}

.icon-img {
  width: 80px; /* 增大图标 */
  height: 80px;
  margin-bottom: 5px;
}

.icon-text {
  font-size: 12px;
  color: #333;
}

/* Animations */
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInTop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-left { animation: slideInLeft 1s ease-out forwards; }
.slide-in-top { animation: slideInTop 1s ease-out forwards; animation-delay: 0.4s; }
.slide-in-right { animation: slideInRight 1s ease-out forwards; animation-delay: 0.8s; }

/* ====================
   Announcement Bar
   ==================== */
.announcement-bar {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  background-color: #2391C3;
  overflow: hidden;
  margin-bottom: 10px;
}

.announcement-icon {
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.announcement-img {
  width: 24px;
  height: 24px;
}

.announcement-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
}

.announcement-text {
  display: inline-block;
  color: #FFFFFF;
  font-weight: bold;
  padding-right: 50px;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ====================
   Lottery Tabs
   ==================== */
.block-lottery {
  width: 100%;
  background: #fff;
  margin-bottom: 10px;
}

.tab-menu-wrapper {
  background: #f5f5f5;
  padding: 5px 0;
}

.tab-menu {
  display: flex;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  cursor: pointer;
  font-size: 16px;
  color: #666;
}

.tab-item.active {
  color: #2391C3;
  font-weight: bold;
  border-bottom: 2px solid #2391C3;
}

/* ====================
   AMX Special Styles (New Structure)
   ==================== */
.border-box {
  background: #fff;
  padding: 10px; /* 调整内边距 */
  height: 220px; /* 固定高度为 220px */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box; /* 确保 padding 包含在 height 内 */
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0; /* 移除内边距 */
  margin: 0;
  /* border-bottom: 1px solid #f0f0f0; 移除边框以匹配 123.html */
}

.head li {
  font-size: 24px; /* 增大字体 */
  color: #333;
  width: 50%; /* 匹配 123.html */
  display: inline-block;
}

.head li:last-child {
  text-align: right; /* 匹配 123.html */
}

.head li a {
  color: #07C160;
  font-weight: normal;
  font-size: 24px; /* 增大字体 */
}

.green-text {
  color: #07C160;
  font-weight: normal;
  margin: 0 5px;
  font-size: 24px; /* 增大字体 */
}

.kj-box {
  padding: 5px 0; /* 调整内边距 */
  flex: 1; /* 撑开中间区域 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.kj-box ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  width: 100%; /* 占满宽度 */
}

.kj-box li {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 2px; /* 调整间距 */
  width: 13.5%; /* 匹配 123.html 比例 */
}

.kj-box li.plus-li {
  font-size: 50px; /* 增大加号 */
  width: auto;
  justify-content: center;
  padding-bottom: 30px; /* 调整对齐 */
  flex: 0.5; /* 加号稍微窄一点 */
  color: #000;
}

.m0 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 76px; /* 调整大小 */
  height: 76px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  font-size: 36px; /* 调整字体 */
  font-weight: normal;
  color: #555;
  line-height: 1;
  font-family: Arial, sans-serif;
  border-radius: 50%; /* 确保圆形 */
}

.m0.red { background-image: url('../images/49red.png'); }
.m0.green { background-image: url('../images/49green.png'); }
.m0.blue { background-image: url('../images/49blue.png'); }

.kj-box em {
  font-style: normal;
  font-size: 20px; /* 调整字体 */
  color: #555;
  margin-top: 8px;
}

.kj-foot {
  text-align: center;
  color: #e74c3c;
  font-size: 22px; /* 调整字体 */
  padding: 10px 0;
  /* border-top: 1px solid #f0f0f0; 移除边框以匹配 123.html */
  margin-top: 0;
}

/* ====================
   Iframe Styles
   ==================== */
.lottery-iframe {
  width: 100%;
  height: 165px; /* 默认 PC 端高度 */
  border: none;
  display: block;
}

/* 移动端适配 */
@media (max-width: 479px) {
  .border-box {
    height: 125px; /* 高度进一步缩小为 125px */
    min-height: 125px;
    padding: 0 2px; /* 进一步减少内边距 */
  }
  
  .head li {
    font-size: 14px; /* 微调字体大小 */
  }
  
  .head li a {
    font-size: 14px;
  }
  
  .green-text {
    font-size: 14px;
  }

  .kj-box {
    padding: 0; 
  }

  .kj-box ul {
    gap: 0;
  }
  
  .kj-box li {
    margin: 0; /* 去掉左右间距 */
  }
  
  .m0 {
    width: 12.8vw; /* 再次增大号码球大小 */
    height: 12.8vw;
    font-size: 6.5vw; /* 增大字体 */
  }
  
  .kj-box em {
    font-size: 14px;
    margin-top: 0;
  }
  
  .kj-box li.plus-li {
    font-size: 30px; 
    padding-bottom: 10px;
    margin-top: -10px; /* 向上调整 */
  }
  
  .kj-foot {
    font-size: 14px;
    padding: 0; /* 极小的内边距 */
  }

  .lottery-iframe {
    height: 140px; /* 移动端高度调整 */
  }

  .lottery-content {
     padding: 0 !important; /* 强制移除 padding */
  }
}


/* ====================
   Legacy Styles (Keeping for compatibility or other tabs)
   ==================== */
.lottery-content {
  background: #fff;
  padding: 10px;
  min-height: 130px;
}

.lottery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.lottery-period {
  font-size: 17px;
  color: #333; /* 默认深色，图片中文字看起来是深灰/黑 */
}

.highlight-number {
  color: #e74c3c;
  font-weight: bold;
  margin: 0 3px;
}

.highlight-number.green-text {
  color: #07C160; /* 绿色期数 */
  font-weight: bold;
}

.countdown-time {
  color: #e74c3c;
  font-weight: bold;
  margin-left: 3px;
}

.lottery-history {
  color: #07C160;
  cursor: pointer;
  font-weight: bold; /* 图片看起来是加粗的 */
  font-size: 16px;
}

.lottery-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.lottery-ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px; /* Space for attributes */
}

.lottery-ball .number {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  color: #555; /* 图片中数字看起来是深灰色，不是纯黑 */
  z-index: 2;
  white-space: nowrap;
}

.lottery-ball .attributes {
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  font-size: 13px; /* 稍微大一点，图片中比较清晰 */
  text-align: center;
  white-space: nowrap;
  color: #666; /* 灰色文字 */
}

/* Ball Colors */
.lottery-ball.red { background-image: url('../images/49red.png'); }
.lottery-ball.green { background-image: url('../images/49green.png'); }
.lottery-ball.blue { background-image: url('../images/49blue.png'); }
.lottery-ball.preparing { background-image: url('../images/kj.png'); }

.plus-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 5px;
  padding-bottom: 20px;
  color: #000;
}

.next-draw-info {
  font-size: 16px;
  color: #e74c3c; /* 红色 */
  text-align: center;
  margin: 10px 0 5px; /* 增加一点顶部间距 */
  padding: 0 5px;
  font-family: "Microsoft YaHei";
  font-weight: normal;
}

/* 响应式调整 */
@media (max-width: 479px) {
  .lottery-content {
    padding: 5px;
  }

  .lottery-numbers {
    gap: 1px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  /* 使用vw单位实现移动端自适应 */
  .lottery-ball {
    width: 10.5vw;
    height: 10.5vw;
    min-width: 10.5vw;
    margin: 0 0.5vw 4vw;
  }
  
  .lottery-ball .number {
    font-size: 4.2vw;
  }
  
  .lottery-ball .attributes {
    font-size: 3vw;
    bottom: -3.5vw;
  }
  
  .lottery-period {
    font-size: 3.5vw;
  }
  
  .plus-sign {
    font-size: 5vw;
    width: 5vw;
    margin: 0 0.5vw 4vw;
  }
  
  .next-draw-info {
    font-size: 3.5vw;
    margin: 1vw 0;
    padding: 0 1vw;
  }
}

/* PC端样式（480px以上） */
@media (min-width: 480px) {
  .lottery-ball {
    width: 60px;
    height: 60px;
    min-width: 60px;
    margin: 0 1px 15px;
  }
  
  .lottery-ball .number {
    font-size: 24px;
  }
  
  .lottery-ball .attributes {
    font-size: 14px;
    bottom: -18px;
  }
  
  .lottery-period {
    font-size: 17px;
  }
  
  .plus-sign {
    font-size: 40px;
    width: 40px;
    margin: 0 0 15px;
  }
  
  .next-draw-info {
    font-size: 16px;
    margin: 5px 0 5px;
    padding: 0 5px;
  }
}

/* ====================
   Content Lists (Gaoshou)
   ==================== */
.gaoshou-container {
  width: 100%;
  background-color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gaoshou-header {
  background-color: #2391C3;
  color: #fff;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.gaoshou-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.gaoshou-item:hover {
  background-color: #f9f9f9;
}

.tag-label {
  background: #f00;
  color: #fff;
  padding: 2px 5px;
  font-size: 12px;
  border-radius: 3px;
  margin-right: 5px;
}

.item-title {
  font-size: 14px;
  font-weight: bold;
}

.arrow-icon {
  font-style: normal;
  color: #999;
  font-size: 12px;
}

/* Color Sets for List Items */
.color-set-1 { color: #000; }
.color-set-2 { color: #00f; }
.color-set-3 { color: #f00; }
/* ... can add more */

/* ====================
   Detail Page
   ==================== */
.detail-header {
  display: flex;
  align-items: center;
  height: 50px;
  background: #2391C3;
  color: #fff;
  padding: 0 10px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.back-button {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
}

.detail-content {
  padding: 15px;
  background: #fff;
}

.notice-box {
  background: #fff3cd;
  color: #856404;
  padding: 10px;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 12px;
}

.detail-item {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
}

.zhun-bg {
  background-color: #0f8b20;
  color: #ffffff;
  border-radius: 3px;
  padding: 0 4px;
  margin: 0 2px;
}

.cuo-bg {
  background-color: #c4090c;
  color: #ffffff;
  border-radius: 3px;
  padding: 0 4px;
  margin: 0 2px;
}

/* ====================
   Back to Top
   ==================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  display: none; /* Hidden by default */
}

.back-to-top.show {
  display: flex;
}

/* ====================
   History Page
   ==================== */
.history-page {
  font-family: "微软雅黑", sans-serif;
  max-width: 100%;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 0.125rem 0.25rem rgba(20, 1, 1, 0.1);
}

.page-header-container {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  padding: 10px 0;
  font-size: 20px;
  font-weight: 500;
  color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  border-bottom: 1px solid #eee;
}

.back-arrow {
  position: absolute;
  left: 10px;
  font-size: 24px;
  color: #080000;
  cursor: pointer;
  font-weight: 500;
}

.history-content-container {
  width: 100%;
  margin: 0 auto;
  background-color: #e8eaec;
  padding: 5px;
}

.draw-item {
  border-bottom: 1px solid #eee;
  padding: 10px;
  margin-bottom: 5px;
  background-color: #ffffff;
  border-radius: 8px;
}

.draw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.draw-number {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.draw-date {
  font-size: 14px;
  color: #666;
}

.history-lottery-numbers {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  padding: 5px 0;
  width: 100%;
}

.history-ball-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 2px;
  flex-shrink: 0;
}

.history-lottery-ball {
  width: 50px; /* 稍微增大 */
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #555; /* 匹配 m0 颜色 */
  font-weight: normal; /* 匹配 m0 粗细 */
  font-size: 20px; /* 调整字体 */
  background-size: 100% 100%;
  background-position: center;
  font-family: Arial, sans-serif;
}

.ball-attributes {
  font-size: 13px;
  color: #555; /* 匹配 index.html */
  margin-top: 5px;
  font-family: '微软雅黑', sans-serif;
  font-weight: normal;
}

.history-plus-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 30px; /* 增大 */
  font-weight: normal;
  margin: 0 5px;
  height: 50px; /* 匹配球的高度 */
  padding-bottom: 20px; /* 向上对齐 */
}

/* History Ball Colors */
.history-ball-red { background-image: url('../images/49red.png'); }
.history-ball-blue { background-image: url('../images/49blue.png'); }
.history-ball-green { background-image: url('../images/49green.png'); }

.load-more {
  text-align: center;
  padding: 15px;
  color: #666;
  font-size: 14px;
}

/* History Page Mobile Responsive */
@media (max-width: 479px) {
  .history-lottery-numbers {
    justify-content: center; /* 尝试居中 */
    padding: 5px 0;
  }
  
  .history-ball-container {
    margin: 0 1px; /* 减小间距 */
  }

  .history-lottery-ball {
    width: 11vw; /* 稍微缩小以适应一行 */
    height: 11vw;
    font-size: 5.5vw;
  }
  
  .ball-attributes {
    font-size: 3vw;
  }
  
  .history-plus-sign {
    font-size: 5vw;
    height: 11vw;
    width: 5vw;
    margin: 0;
    padding-bottom: 10px;
  }
}

.zodiac-table-wrapper {
  width: 100%;
  padding: 0 4px;
  box-sizing: border-box;
  margin: 10px 0;
  font-family: Arial, sans-serif;
}

.section-title {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  padding: 8px 10px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2px;
  font-size: 16px;
}

/* Zodiac Table */
.zodiac-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-top: none;
  background-color: #fff;
}

.zodiac-row {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  margin-bottom: 2px;
}

.zodiac-item {
  flex: 1;
  padding: 5px;
  text-align: center;
  border: 1px solid #eee;
}

.zodiac-animal {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.animal-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 5px;
}

.animal-name {
  font-size: 14px;
}

.number-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

/* Number Colors */
.number.red { background-color: #ff4d4f; }
.number.blue { background-color: #1890ff; }
.number.green { background-color: #52c41a; }

/* Attribute Table */
.attribute-table {
  border: 1px solid #ddd;
  border-top: none;
  margin-bottom: 10px;
  background-color: #fff;
}

.attribute-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.attribute-row:last-child {
  border-bottom: none;
}

.attribute-label {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background-color: #f9f9f9;
  border-right: 1px solid #eee;
  padding: 8px 5px;
}

.attribute-content {
  flex: 1;
  padding: 8px 10px;
  line-height: 1.5;
  font-size: 18px;
  font-weight: 500;
  color: #000;
}

/* Colored Attribute Text */
.attr-red { color: #ff4d4f; font-weight: bold; }
.attr-blue { color: #1890ff; font-weight: bold; }
.attr-green { color: #52c41a; font-weight: bold; }
.attr-purple { color: #722ed1; font-weight: bold; }
.attr-gold { color: #faad14; font-weight: bold; }

/* Elements Table */
.elements-table {
  border: 1px solid #ddd;
  border-top: none;
  margin-bottom: 10px;
  background-color: #fff;
}

.element-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.element-row:last-child {
  border-bottom: none;
}

.element-label {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background-color: #f9f9f9;
  border-right: 1px solid #eee;
}

.element-numbers {
  flex: 1;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Color Table */
.color-table {
  border: 1px solid #ddd;
  border-top: none;
  margin-bottom: 10px;
  background-color: #fff;
}

.color-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.color-row:last-child {
  border-bottom: none;
}

.color-label {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  border-right: 1px solid #eee;
}

.red-label { background-color: #ff4d4f; }
.blue-label { background-color: #1890ff; }
.green-label { background-color: #52c41a; }

.color-numbers {
  flex: 1;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Attribute Labels Colors */
.label-red { background-color: #ff4d4f; color: white; }
.label-blue { background-color: #1890ff; color: white; }
.label-green { background-color: #52c41a; color: white; }
.label-orange { background-color: #fa8c16; color: white; }
.label-purple { background-color: #722ed1; color: white; }
.label-cyan { background-color: #13c2c2; color: white; }
.label-magenta { background-color: #eb2f96; color: white; }
.label-teal { background-color: #20c997; color: white; }
.label-brown { background-color: #8b572a; color: white; }
.label-black { background-color: #000000; color: white; }
.label-gray { background-color: #8c8c8c; color: white; }
.label-pink { background-color: #ff85c0; color: white; }
.label-gold { background-color: #faad14; color: white; }

/* Sums Table */
.sums-table {
  border: 1px solid #ddd;
  border-top: none;
  background-color: #fff;
}

.sum-row {
  display: flex;
  border-bottom: 1px solid #eee;
}

.sum-row:last-child {
  border-bottom: none;
}

.sum-label {
  width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background-color: #f9f9f9;
  border-right: 1px solid #eee;
}

.sum-numbers {
  flex: 1;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .zodiac-table-wrapper { padding: 0 2px; }
  .section-title { font-size: 14px; padding: 6px 8px; }
  .animal-img { width: 30px; height: 30px; }
  .animal-name { font-size: 12px; }
  .number { width: 22px; height: 22px; font-size: 11px; }
  .element-label, .color-label, .sum-label, .attribute-label { font-size: 12px; }
  .attribute-content { font-size: 16px; padding: 6px 8px; font-weight: 500; color: #000; }
  .attribute-label { width: 70px; }
}

@media screen and (max-width: 480px) {
  .zodiac-table-wrapper { padding: 0; }
  .section-title { font-size: 15px; padding: 8px 5px; margin-bottom: 0; }
  .zodiac-grid { display: flex; flex-direction: column; gap: 0; border: none; }
  .zodiac-row { display: flex; justify-content: space-between; gap: 1px; margin-bottom: 1px; }
  .zodiac-item { flex: 0 0 calc(50% - 1px); padding: 5px; box-sizing: border-box; border: 1px solid #eee; background-color: #fff; }
  .zodiac-animal { justify-content: flex-start; margin-bottom: 3px; }
  .animal-img { width: 32px; height: 32px; margin-right: 4px; }
  .animal-name { font-size: 15px; font-weight: bold; }
  .number-row { gap: 3px; justify-content: flex-start; }
  .number { width: 25px; height: 25px; font-size: 13px; margin: 1px; }
  .element-label { width: 30px; }
  .color-label { width: 40px; }
  .sum-label { width: 60px; }
  .attribute-label { width: 60px; padding: 6px 2px; }
  .attribute-content { font-size: 14px; padding: 6px 5px; font-weight: 500; color: #000; }
}

/* ====================
   XuanJiCaiTu (玄机彩图)
   ==================== */
.xuanji-container {
  width: 100%;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dynamic-image-header {
  background-color: #2391C3;
  color: #fff;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 10px;
  width: 100%;
}

.grid-item {
  background-color: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-item:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grid-item-title {
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

/* Image Modal */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.image-modal.show {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.large-image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.close-button {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
}

/* ====================
   ZuoYouZhongTe (左右中特)
   ==================== */
.liuxiazhongte-container {
  width: 100%;
  background-color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.liuxiazhongte-header {
  background-color: #2391C3;
  color: #fff;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.sijishengxiao-content {
  padding: 5px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e0e0e0;
}

.season-grid {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.season-item {
  flex: 1;
  text-align: center;
  padding: 5px;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.season-title {
  font-weight: 800;
  color: #274D3D;
  margin-bottom: 2px;
  font-size: 16px;
}

.animal-group {
  color: #000;
  font-weight: 500;
  font-size: 14px;
}

.liuxiazhongte-list {
  background-color: #fff;
}

.liuxiazhongte-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: bold;
}

