:root {
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: #f0f0f0;
}

.reference-detail-shell,
.reference-auto-home {
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.reference-detail-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: flex-end;
  padding: 0 17%;
  background: #0861ef;
}

.reference-back {
  padding: 7px 17px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
}

.reference-game-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 2px solid #0e7ff0;
  background: #f5f5f5;
}

.reference-game-tabs span {
  padding: 12px 4px 10px;
  border-right: 1px solid #ccc;
  color: #a0a0a0;
  text-align: center;
  font-size: 17px;
}

.reference-game-tabs .active {
  background: #fff;
  color: #0787ec;
  font-weight: 800;
}

.reference-open-card {
  padding: 0 10px 10px;
  background: #fff;
}

.reference-open-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border-bottom: 1px solid #ddd;
  color: #888;
  font-size: 16px;
}

.reference-open-head strong,
.reference-open-head a {
  color: #f12424;
}

.reference-open-balls {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  padding: 10px 1.5% 5px;
}

.reference-ball-wrap {
  min-width: 0;
  text-align: center;
}

.reference-ball {
  --ball-main: #268ddb;
  --ball-light: #6fc4ff;
  --ball-deep: #0863aa;
  display: grid;
  position: relative;
  width: 50px;
  height: 50px;
  max-width: 100%;
  margin: 0 auto;
  place-items: center;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  outline: 1px solid var(--ball-deep);
  background:
    radial-gradient(circle at 50% 51%, #fff 0 45%, #f7f7f7 46% 51%, transparent 52%),
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0 5%, rgba(255, 255, 255, 0.34) 6% 18%, transparent 29%),
    linear-gradient(145deg, var(--ball-light) 0%, var(--ball-main) 48%, var(--ball-deep) 100%);
  box-shadow:
    inset 4px 4px 7px rgba(255, 255, 255, 0.42),
    inset -5px -6px 8px rgba(0, 0, 0, 0.2),
    0 3px 6px rgba(20, 53, 82, 0.24);
  color: #181818;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  text-shadow: 0 1px 0 #fff;
}

.reference-ball.red {
  --ball-main: #ef3a52;
  --ball-light: #ff8293;
  --ball-deep: #bc112b;
}

.reference-ball.green {
  --ball-main: #20a76d;
  --ball-light: #72d6a8;
  --ball-deep: #08794a;
}

.reference-ball.empty {
  --ball-main: #d9dee4;
  --ball-light: #f7f9fb;
  --ball-deep: #aab2bc;
  color: #8b949e;
}

.reference-opening-status {
  color: #f28a00;
  font-weight: 800;
}

.reference-ball-plus {
  color: #b8bec5;
  font-size: 46px;
  font-weight: 900;
  line-height: 50px;
  text-align: center;
  text-shadow: 0 2px 0 #fff;
}

.reference-zodiac {
  display: block;
  padding-top: 5px;
  color: #555;
  font-size: 14px;
}

.reference-next-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px clamp(14px, 2.2vw, 24px) 7px;
  overflow: hidden;
  box-sizing: border-box;
  color: #ff6718;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.reference-next-date {
  min-width: 0;
}

.reference-countdown {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.reference-speed-tip {
  padding: 14px 10px 8px;
  border-bottom: 2px dashed #ff1cc8;
  color: #f126d8;
  font-size: 17px;
}

.reference-ad-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin: 2px 8px 8px;
  padding: 3px;
  border: 2px solid #ff34cc;
  background: #fff62a;
}

.reference-ad-strip span {
  min-width: 0;
  padding: 5px 2px;
  overflow: hidden;
  border-radius: 4px;
  background: #0759d7;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.reference-ad-strip span:nth-child(2) {
  background: #00a872;
}

.reference-ad-strip span:nth-child(3) {
  background: #503825;
}

.reference-ad-strip span:nth-child(4) {
  background: #ef14bf;
}

.reference-ad-strip span:nth-child(5) {
  background: #00a44f;
}

.reference-detail-title {
  margin: 0;
  padding: 7px 9px 12px;
  border-bottom: 1px solid #ddd;
  color: #f500a9;
  font-size: 20px;
  font-weight: 900;
}

.reference-detail-title small {
  display: block;
  padding-top: 4px;
  color: #ef1919;
  font-size: 15px;
}

.reference-material-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.reference-material-table td {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ddd;
  color: #303030;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.reference-material-table .issue {
  color: #333;
}

.reference-material-table .prediction {
  color: #273142;
}

.reference-material-table .open-result {
  color: #555;
}

.reference-status {
  display: inline-block;
  min-width: 26px;
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff !important;
  text-align: center;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 1px 1px rgba(90, 0, 0, 0.28);
}

.reference-status.hit {
  background: #ef202e;
  color: #fff !important;
}

.reference-status.miss {
  background: #1683d8;
  color: #fff !important;
}

.reference-status.pending {
  background: #db9c0b;
  color: #fff !important;
}

.reference-loading {
  padding: 50px 15px;
  color: #777;
  text-align: center;
}

.reference-home-title {
  margin: 0;
  padding: 10px 8px;
  background: #1189ee;
  color: #fff;
  text-align: center;
  font-size: 20px;
}

.reference-home-subtitle {
  margin: 0;
  padding: 7px 8px;
  border-bottom: 1px solid #ddd;
  background: #fff8d8;
  color: #d31515;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.reference-poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 7px;
  background: #eef4fa;
}

.reference-poster-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #b9cce0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 89, 0.12);
}

.reference-poster-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.reference-home-board {
  margin: 0;
  border: 0;
  border-bottom: 3px solid #fff;
  background: #fff;
}

.reference-home-board h3 {
  margin: 0;
  padding: 9px 7px;
  background: #0b79db;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.reference-home-board h3 a {
  color: inherit;
  text-decoration: none;
}

.reference-home-board .reference-material-table td {
  height: 38px;
  padding: 4px 7px;
  border-color: #d1d1d1;
  font-size: 16px;
}

.reference-home-board.theme-0 h3 {
  background: #228dff;
}

.reference-home-board.theme-1 h3 {
  background: #d9b72d;
}

.reference-home-board.theme-2 h3 {
  background: #e8517f;
}

.reference-home-board.theme-3 h3 {
  background: #1ca36d;
}

.reference-home-board.theme-4 h3 {
  background: #7b58c8;
}

.reference-home-board.theme-5 h3 {
  background: #e56b23;
}

.reference-home-table {
  table-layout: fixed;
}

.reference-home-table td {
  text-align: center;
}

.reference-home-table .home-issue {
  width: 16%;
  background: #fff;
  color: #222;
  font-weight: 800;
  white-space: nowrap;
}

.reference-home-table .home-prediction {
  width: 64%;
  background: #f2eaae;
  color: #238652;
  font-weight: 900;
}

.reference-home-board.theme-0 .home-prediction,
.reference-home-board.theme-3 .home-prediction {
  background: #dff3ff;
  color: #145da2;
}

.reference-home-board.theme-2 .home-prediction,
.reference-home-board.theme-4 .home-prediction {
  background: #fff0f5;
  color: #ca2857;
}

.reference-home-table .home-result {
  width: 20%;
  background: #fff;
  color: #e71d31;
  font-weight: 900;
  white-space: nowrap;
}

.reference-home-table .home-result-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.reference-home-table .home-open-label {
  overflow: hidden;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
}

.reference-home-table .home-result .reference-status {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 26px;
  min-width: 26px;
  height: 24px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.reference-more {
  display: block;
  padding: 6px;
  border: 1px solid #ddd;
  background: #f7f7f7;
  color: #174f9d;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.reference-home-interlude,
.reference-detail-poster {
  display: block;
  width: 100%;
  margin: 3px 0;
  overflow: hidden;
  border-top: 2px solid #ef2455;
  border-bottom: 2px solid #ef2455;
  background: #fff;
}

.reference-detail-poster {
  margin: 4px 0 7px;
}

@media (max-width: 600px) {
  .reference-detail-header {
    min-height: 52px;
    padding-right: 16%;
  }

  .reference-back {
    padding: 5px 14px;
    font-size: 17px;
  }

  .reference-game-tabs span {
    padding: 9px 2px;
    font-size: 13px;
  }

  .reference-open-card {
    padding: 0 6px 7px;
  }

  .reference-open-head,
  .reference-next-open {
    font-size: 13px;
  }

  .reference-next-open {
    gap: 4px;
    padding: 7px 7px 5px;
    letter-spacing: -0.2px;
  }

  .reference-next-date {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reference-countdown {
    font-size: 12px;
    letter-spacing: -0.3px;
  }

  .reference-open-balls {
    gap: 2px;
  }

  .reference-ball {
    width: 39px;
    height: 39px;
    border-width: 1.5px;
    font-size: 16px;
    box-shadow:
      inset 3px 3px 5px rgba(255, 255, 255, 0.42),
      inset -4px -4px 6px rgba(0, 0, 0, 0.2),
      0 2px 4px rgba(20, 53, 82, 0.22);
  }

  .reference-ball-plus {
    font-size: 34px;
    line-height: 39px;
  }

  .reference-zodiac {
    font-size: 11px;
  }

  .reference-speed-tip {
    font-size: 14px;
  }

  .reference-ad-strip {
    margin-right: 3px;
    margin-left: 3px;
  }

  .reference-ad-strip span {
    font-size: 11px;
  }

  .reference-detail-title {
    font-size: 17px;
  }

  .reference-material-table td {
    padding: 7px 5px;
    font-size: 16px;
  }

  .reference-home-board h3 {
    padding: 7px 4px;
    font-size: 16px;
  }

  .reference-home-board .reference-material-table td {
    height: 35px;
    padding: 3px 4px;
    font-size: 13px;
  }

  .reference-home-table .home-issue {
    width: 15%;
  }

  .reference-home-table .home-prediction {
    width: 64%;
    white-space: nowrap;
  }

  .reference-home-board .reference-home-table td.home-prediction-tight {
    font-size: 11px;
    letter-spacing: -0.2px;
  }

  .reference-home-board .reference-home-table td.home-prediction-compact {
    font-size: 9px;
    letter-spacing: -0.35px;
  }

  .reference-home-table .home-result {
    width: 21%;
  }

  .reference-home-table .home-result-wrap {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 2px;
  }

  .reference-home-table .home-open-label {
    font-size: 12px;
  }

  .reference-home-table .home-result .reference-status {
    width: 24px;
    min-width: 24px;
    height: 22px;
    font-size: 13px;
  }

  .reference-poster-grid {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px 3px;
  }
}
