* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #12080c url("images/index1.jpg") center top / cover no-repeat fixed;
  color: #fff;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.sheet-wrap { width: 100%; }
.sheet { width: 100%; max-width: 1000px; margin: 0 auto; }

.banner { position: relative; }
.banner img { display: block; width: 100%; height: 180px; object-fit: cover; }
.site-name {
  position: absolute;
  left: 48px;
  top: 36px;
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 2px;
  background-image: linear-gradient(to right, #ff6f02, #fffb00, #ff6f02);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ff8a00;
}

.menu {
  display: flex;
  height: 50px;
  line-height: 50px;
  background: #1b1919;
  font-size: 22px;
}
.menu a { padding: 0 22px; color: #fff; white-space: nowrap; }
.menu a.is-active,
.menu a:hover { background: linear-gradient(120deg, #ff8263, #ee1b24); }

.notice {
  display: flex;
  height: 40px;
  line-height: 40px;
  background: #441c1a;
  color: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}
.notice-title {
  width: 140px;
  text-align: center;
  font-size: 20px;
  flex: none;
}
.notice-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.notice-track span {
  display: inline-block;
  padding-left: 100%;
  animation: rolling 28s linear infinite;
  font-size: 16px;
}
@keyframes rolling {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.site-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
}
.site-logo { width: 180px; flex: none; }
.site-logo img { width: 100%; border-radius: 50%; display: block; }
.bet-open { flex: 1; font-size: 26px; line-height: 1.2; }
.issue-row, .next-row { display: flex; align-items: center; }
.now-issue { width: 180px; }
#issueNo, .bet-now, .bet-next { color: #ee1b24; font-weight: 700; }
.now-title { width: 200px; }
.bet-main {
  margin: 12px 0;
  padding: 10px 12px;
  background: rgba(174, 174, 174, 0.1);
  border-radius: 10px;
}
.bet-line { display: flex; align-items: center; margin: 8px 0; }
.bet-label { width: 72px; text-align: center; flex: none; }
.ball-row, .zodiac-row {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.plus { width: 20px; text-align: center; font-size: 28px; }

.ball {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex: none;
}
.ball.red { background: #c90300; }
.ball.green { background: #4a8f0b; }
.ball.blue { background: #0077c9; }
.ball.empty { background: #666; }
.ball .spin {
  position: absolute;
  inset: 0;
}
.ball.is-live .spin { animation: spin 2s linear infinite; }
.ball .cap {
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.ball .cap.up { width: 56%; height: 56%; left: 22%; top: -44%; }
.ball .cap.down { width: 56%; height: 56%; left: 22%; bottom: -44%; }
.ball .cap.left { width: 74%; height: 74%; left: 4%; top: 11%; }
.ball .cap.right { width: 56%; height: 56%; right: -37%; top: 20%; }
.ball .rim {
  position: absolute;
  inset: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 2;
}
.ball b {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-size: 22px;
}
.ball.is-live b {
  animation: orbit 2s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes orbit {
  0% { transform: translate(-16%, 4%); }
  25% { transform: translate(0, -16%); }
  50% { transform: translate(16%, 4%); }
  75% { transform: translate(0, 16%); }
  100% { transform: translate(-16%, 4%); }
}

.zodiac-chip {
  width: 54px;
  height: 54px;
  background: #fff;
  color: #111;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex: none;
}
.zodiac-chip.plus {
  background: none;
  color: #fff;
  width: 20px;
}

.next-row { font-size: 22px; }
.next-label { width: 180px; text-align: right; margin-right: 8px; }

.bet-info { background: rgba(69, 10, 10, 0.1); padding: 10px 10px 40px; }
.info-title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0 10px;
}
.info-title span {
  width: 160px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 30px;
  background: linear-gradient(to right, #ff8263, #fe3c32);
}
.wing {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 25px 25px 25px 0;
  border-color: transparent #ff8263 transparent transparent;
}
.wing.right { transform: rotate(180deg); border-color: transparent #fe3c32 transparent transparent; }

.zodiac-grid {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0 10px 20px;
}
.zodiac-grid li { width: 25%; padding: 10px; }
.zodiac-card {
  height: 218px;
  background: url("images/circle.png") center center no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.zodiac-card .sprite {
  width: 126px;
  height: 81px;
  background-image: url("images/zodiac.png");
  background-size: 756px auto;
  background-repeat: no-repeat;
}
.zodiac-card p { margin: 8px 0 0; font-size: 20px; text-align: center; }

.doc-page { background: rgba(69, 10, 10, 0.1); min-height: 520px; padding: 8px 20px 36px; }
.crumb { padding: 16px 4px; font-size: 18px; color: #ddcfe2; }
.crumb a { color: #fff; }
.doc-page h2 { margin: 8px 0 18px; text-align: center; font-size: 36px; font-weight: 500; }
.doc-page h3 { margin: 22px 0 8px; color: #ff8162; font-size: 22px; }
.doc-body p, .doc-panel p, .plain-list { font-size: 18px; line-height: 1.8; color: #f3e6e6; }
.plain-list { margin: 0; padding-left: 22px; }
.doc-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.doc-tabs button {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  padding: 8px 22px;
  cursor: pointer;
}
.doc-tabs button.is-active { background: linear-gradient(120deg, #ff8263, #ee1b24); }
.prize-table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 18px; }
.prize-table th, .prize-table td { border: 1px solid rgba(255, 255, 255, 0.2); padding: 10px 14px; text-align: left; }
.prize-table th { background: rgba(238, 27, 36, 0.35); }
.prize-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.04); }
.org-tree { text-align: center; margin: 20px 0; }
.org-node {
  display: inline-block;
  min-width: 120px;
  margin: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
}
.org-line { width: 1px; height: 24px; margin: 0 auto; background: rgba(255, 255, 255, 0.4); }
.split { display: flex; gap: 16px; align-items: flex-start; }
.side-nav { width: 210px; flex: none; }
.side-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 12px 12px 46px;
  border: 0;
  border-bottom: 1px solid #3a2e2e;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  position: relative;
}
.side-nav button.is-active, .side-nav button:hover { color: #ee1b24; }
.side-nav button::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 13px;
  height: 13px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 3px 3px, #f3dede, #a80000);
}
.split-main { flex: 1; min-width: 0; }
.attr-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 16px; }
.attr-table th, .attr-table td { border: 1px solid rgba(255, 255, 255, 0.18); padding: 8px; text-align: center; }
.attr-table th { background: #efe7c8; color: #222; }
.attr-table td.label { background: #e7f0df; color: #222; }
.chart-block { margin: 0 0 18px; }
.chart-block h3 { margin-bottom: 8px; }
.num-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.num-line .name { width: 48px; font-size: 20px; }
.history-item { margin: 0 20px 18px; padding: 16px 18px 8px; background: rgba(37, 2, 2, 0.25); }
.history-item h3 { margin: 0 0 8px; font-size: 22px; color: #ff8162; font-weight: 500; }
.history-balls { display: flex; gap: 16px; list-style: none; margin: 0; padding: 8px 0 16px; }
.history-balls .cell { width: 54px; text-align: center; }
.history-balls .cell .sx { display: block; margin-top: 6px; font-size: 18px; }
.more-btn {
  display: block;
  margin: 10px auto 20px;
  padding: 8px 28px;
  border: 0;
  border-radius: 20px;
  background: #ee1b24;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.doc-empty {
  margin: 24px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
}

.footer { height: 120px; }
.footer-line {
  height: 2px;
  background: linear-gradient(to right, rgba(72, 58, 69, 0.1), rgba(72, 58, 69), rgba(72, 58, 69, 0.1));
}
.site-copy {
  line-height: 100px;
  text-align: center;
  font-size: 18px;
  background: rgba(69, 10, 10, 0.1);
}

.popup-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.popup-mask.show { display: flex; }
.popup-notice {
  width: 520px;
  max-width: 92vw;
  min-height: 280px;
  padding: 90px 28px 70px;
  background: #fff6e4 url("images/noticeimg.jpg") center / cover no-repeat;
  border: 6px solid #bb7e12;
  border-radius: 16px;
  position: relative;
  color: #5a2a12;
  text-align: center;
}
.popup-notice p { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.6; }
.popup-notice button {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 16px;
  background: #473760;
  color: #fff;
  font-size: 20px;
  padding: 8px 48px;
  cursor: pointer;
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .sheet-wrap, .sheet { max-width: 100%; overflow-x: hidden; }
  .banner img { height: 108px; }
  .site-name { left: 16px; top: 28px; font-size: 32px; letter-spacing: 0; }
  .menu { height: auto; flex-wrap: wrap; font-size: 15px; line-height: 42px; }
  .menu a { flex: 1 1 33%; padding: 0 8px; text-align: center; }
  .notice { height: 36px; line-height: 36px; }
  .notice-title { width: 72px; font-size: 15px; }
  .site-head { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
  .site-logo { width: 84px; margin: 0 auto; }
  .bet-open { font-size: 16px; }
  .issue-row, .next-row { flex-wrap: wrap; gap: 4px 8px; }
  .now-issue, .now-title, .next-label { width: auto; text-align: left; }
  .next-row { font-size: 16px; }
  .bet-main { margin: 8px 0; padding: 8px; }
  .bet-label { width: 40px; font-size: 15px; }
  .ball-row, .zodiac-row { gap: 4px; flex: 1; min-width: 0; justify-content: space-between; }
  .ball-row .ball, .zodiac-row .zodiac-chip {
    width: auto;
    height: auto;
    flex: 1 1 0;
    max-width: 42px;
    aspect-ratio: 1;
  }
  .ball-row .ball b { font-size: 13px; }
  .zodiac-row .zodiac-chip { font-size: 16px; border-radius: 6px; }
  .plus, .zodiac-chip.plus { width: 12px; font-size: 16px; flex: none; }
  .zodiac-grid li { width: 50%; padding: 6px; }
  .zodiac-card { height: 150px; background-size: 150px auto; }
  .zodiac-card .sprite { transform: scale(0.72); }
  .zodiac-card p { font-size: 14px; }
  .info-title { margin: 16px 0 6px; }
  .info-title span { width: 120px; height: 40px; line-height: 40px; font-size: 22px; }
  .doc-page { padding: 8px 12px 28px; min-height: 0; overflow-x: hidden; }
  .doc-page h2 { font-size: 26px; }
  .doc-page h3, .history-item h3 { font-size: 18px; }
  .doc-body p, .doc-panel p, .plain-list, .prize-table { font-size: 15px; }
  .split { flex-direction: column; gap: 8px; }
  .side-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    overflow: visible;
    position: relative;
    z-index: 2;
  }
  .side-nav button {
    width: 33.333%;
    flex: 0 0 33.333%;
    max-width: 33.333%;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 4px 10px 26px;
    border-bottom: 0;
    text-align: left;
    position: relative;
    z-index: 2;
    -webkit-tap-highlight-color: rgba(238, 27, 36, 0.25);
  }
  .side-nav button::before {
    left: 8px;
    top: 14px;
  }
  .split-main { width: 100%; max-width: 100%; }
  .chart-block { margin: 0 0 14px; }
  .num-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  .num-line .ball,
  .history-balls .ball,
  .chart-block .ball {
    width: 34px;
    height: 34px;
    flex: none;
    max-width: none;
  }
  .num-line .ball b,
  .history-balls .ball b,
  .chart-block .ball b { font-size: 13px; }
  .history-item { margin: 0 0 12px; padding: 12px 10px 4px; }
  .history-balls { flex-wrap: wrap; gap: 8px; }
  .history-balls .cell { width: 34px; }
  .history-balls .cell .sx { font-size: 14px; margin-top: 4px; }
  .attr-table { width: 100%; table-layout: fixed; display: table; font-size: 12px; }
  .attr-table th, .attr-table td { padding: 4px 0; font-size: 12px; }
  .footer { height: auto; }
  .site-copy { line-height: 1.5; padding: 20px 12px; font-size: 14px; }
  .popup-notice { min-height: 220px; padding: 72px 16px 64px; }
  .popup-notice p { font-size: 16px; }
  .popup-notice button { font-size: 16px; padding: 8px 28px; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 16px;
  padding: 8px 4px 28px;
}
.gallery-card {
  display: block;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.gallery-card:hover {
  transform: translateY(-2px);
}
.gallery-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #1a1014;
  overflow: hidden;
}
.gallery-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.gallery-title {
  margin: 0;
  padding: 10px 6px;
  text-align: center;
  font-size: 16px;
  line-height: 1.2;
  color: #222;
  background: #fff;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  box-sizing: border-box;
}
.gallery-lightbox[hidden] {
  display: none !important;
}
.gallery-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}
.gallery-lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 41;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    padding: 4px 0 20px;
  }
  .gallery-title {
    font-size: 14px;
    padding: 8px 4px;
  }
  .gallery-lightbox {
    padding: 48px 8px 16px;
  }
}
