:root {
  --bg: #fffbe8;
  --card: #ffffff;
  --border: #cc9900;
  --primary: #ddaa00;
  --primary-dark: #b88900;
  --text: #664400;
  --text-light: #886622;
  --muted: #aa8855;
  --shadow: 0 6px 20px rgba(180, 120, 0, 0.18);
  --shadow-sm: 0 2px 8px rgba(180, 120, 0, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
}

/* ========== 轮播图样式 ========== */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 180px;
  overflow: hidden;
  margin: 0 auto;
  background: #ffeebb;
  border-bottom: 1px solid #cc9900;
  box-shadow: 0 2px 8px rgba(180,120,0,0.2);
}

.carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background: #fff;
  border-color: #ddaa00;
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(221,170,0,0.6);
}

/* ========== 顶部导航栏 ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 720px;
  height: 50px;
  background: linear-gradient(180deg, #ddaa00 0%, #eebb22 38%, #ffeebb 78%, #fffef5 100%);
  border-bottom: 1px solid #cc9900;
  box-shadow: 0 2px 8px rgba(180,120,0,0.2);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-logo img {
  height: 36px;
  width: auto;
}

.header-logo-text {
  font-size: 18px;
  font-weight: 900;
  color: #664400;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: rgba(255,255,255,0.7);
  border: 1px solid #cc9900;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #664400;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.header-btn:hover { background: rgba(255,255,255,1); }

/* ========== 滚动公告条 ========== */
.notice-bar {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 36px;
  margin: 0 auto;
  background: linear-gradient(90deg, #fff8e0, #ffeecc, #fff8e0);
  border-bottom: 1px solid #cc9900;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 5;
}

.notice-bar-icon {
  flex-shrink: 0;
  font-size: 16px;
  padding: 0 10px;
  height: 36px;
  line-height: 36px;
  background: #ddaa00;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-bar-content {
  flex: 1;
  overflow: hidden;
  height: 36px;
  line-height: 36px;
  position: relative;
  white-space: nowrap;
}

.notice-bar-content .notice-text {
  display: inline-block;
  padding-left: 100%;
  font-size: 14px;
  color: #cc3300;
  font-weight: 700;
  animation: noticeMarquee 12s linear infinite;
  white-space: nowrap;
}

@keyframes noticeMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ========== 广告图片样式 ========== */
.ad-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff8e0;
  border-bottom: 1px solid #cc9900;
}

.ad-container img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-container a {
  display: block;
}

/* ========== 主内容区 ========== */
.main-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 66px 10px 20px;
}

/* ========== 模块按钮列表 ========== */
.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cc9900;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.module-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, #fdf5d0, #fff8e0);
  border: 1px solid #ddaa00;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #664400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.module-tab:hover {
  background: linear-gradient(135deg, #ffe080, #ffd700);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(180,120,0,0.25);
}

.module-tab.active {
  background: linear-gradient(135deg, #ddaa00, #eebb22);
  color: #fff;
  border-color: #b88900;
  box-shadow: 0 3px 8px rgba(180,120,0,0.3);
}

/* ========== 模块卡片 ========== */
.module-card {
  background: #fff;
  border: 1px solid #ffe080;
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: visible;
}

.module-title {
  background: linear-gradient(180deg, #ddaa00 0%, #eebb22 38%, #ffeebb 78%, #fffef5 100%);
  color: #664400;
  height: 42px;
  line-height: 42px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.module-content {
  padding: 12px;
  overflow-x: auto;
}

.module-content table {
  width: 100%;
  table-layout: auto;
  white-space: nowrap;
}

.module-content table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  text-align: center;
}

.placeholder {
  color: #aa8855;
  font-size: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.title-bar {
  background: linear-gradient(180deg, #ddaa00 0%, #eebb22 38%, #ffeebb 78%, #fffef5 100%);
  color: #664400;
  height: 42px;
  line-height: 42px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  border-radius: 14px 14px 0 0;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.card-body {
  padding: 12px;
}

/* ========== 内容区域 ========== */
.content-area {
  background: #fff;
  border: 1px solid #cc9900;
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

.content-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: #aa8855;
  font-size: 15px;
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ffe080;
  border-top-color: #ddaa00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 彩票开奖 - 三按钮切换iframe ========== */
.lottery-section {
  max-width: 720px;
  margin: 10px auto 12px;
  border: 2px solid #d4a017;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(126,56,0,0.08);
}

.lottery-tabs {
  display: flex;
  border-bottom: 2px solid #d4a017;
  background: linear-gradient(135deg, #b8860b, #d4a017);
}

.lottery-tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}

.lottery-tab:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.lottery-tab.active {
  background: #fff;
  color: #b8860b;
  border-radius: 0 0 8px 8px;
}

.lottery-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #fff;
}

.lottery-frame-wrap {
  position: relative;
  width: 100%;
  background: #fafafa;
}

.lottery-frame {
  display: block;
  width: 100%;
  height: 190px;
  border: none;
  overflow: hidden;
}

@media (max-width: 480px) {
  .lottery-tab {
    font-size: 12px;
    padding: 8px 4px;
  }
  .lottery-frame {
    height: 150px;
  }
}

@media (max-width: 360px) {
  .lottery-frame {
    height: 130px;
  }
}



/* ========== 底部三张图片 ========== */
.bottom-images-container {
  width: 100%;
  max-width: 720px;
  margin: 10px auto 2px;
  padding: 0 12px;
}

.bottom-images-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bottom-images-list img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 16px 12px;
  color: #aa8855;
  font-size: 12px;
}

/* ========== 结果增强显示（波色·五行） ========== */
.result-info {
  display: inline-block;
  font-size: 11px;
  color: #888;
  margin-left: 2px;
}

.result-info .wave-red {
  color: #cc0000;
}

.result-info .wave-blue {
  color: #0066cc;
}

.result-info .wave-green {
  color: #008800;
}

.result-info .element {
  color: #664400;
}

/* ========== 响应式 ========== */
/* ========== 对奖结果 - 细粒度标记 ========== */
.hit-zodiac { color: #cc0000; font-weight: bold; }
.hit-zodiac-hit { color: #cc0000; font-weight: bold; }
.hit-num { color: #0066cc; font-weight: bold; }
.hit-num-hit { color: #cc0000; font-weight: bold; }
.hit-tag { color: #cc0000 !important; font-weight: bold; font-size: 16px; }
.hit-highlight { background: #ffe500 !important; color: #cc0000 !important; font-weight: bold; border-radius: 3px; padding: 0 2px; }
.yellow-box { background: #ff0; padding: 2px 6px; font-weight: bold; border-radius: 2px; }
.result-col { color: #ff6600; font-weight: bold; min-width: 140px; text-align: center; }

/* 各模块表格基础样式 */
.xst01-table, .xst02-table, .xst03-table, .xst04-table, .xst05-table,
.xst06-table, .xst07-table, .xst08-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.xst01-table td, .xst02-table td, .xst03-table td, .xst04-table td,
.xst05-table td, .xst06-table td, .xst07-table td, .xst08-table td { padding: 8px 12px; border-bottom: 1px solid #ddd; text-align: center; }
.xst01-table .period { color: #8b4513; font-weight: bold; }
.xst01-table .result,
.xst02-table .result,
.xst03-table .result,
.xst04-table .result,
.xst05-table .result,
.xst06-table .result { color: #ff6600; font-weight: bold; }
.xst03-table .yellow-box { background: #ff0; padding: 2px 6px; font-weight: bold; border-radius: 2px; }
.xst07-table tr:nth-child(even) { background: #fff8dc; }
.xst07-table tr:nth-child(odd) { background: #ffffff; }
.xst07-period { color: #8b4513; font-weight: bold; font-size: 15px; }
.xst07-name { color: #996600; font-size: 13px; }
.xst07-type { color: #8b4513; font-weight: bold; font-size: 14px; }
.xst07-result { color: #ff6600; font-weight: bold; }

@media (max-width: 480px) {
  .header-logo-text { font-size: 15px; }
  .module-tab { padding: 6px 10px; font-size: 13px; }
  .title-bar { height: 38px; line-height: 38px; font-size: 16px; }
}

/* ========== 修复底部图片和大小中特模块间距 ========== */
.bottom-images-container + .main-container {
  padding-top: 6px;
}

/* ========== 中间插入图片（四码中特与①肖②码之间） ========== */
.mid-image-container {
  width: 100%;
  margin: 0 auto 16px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.mid-image-container img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

