:root {
  --primary: #f94470;
  --secondary: #667eea;
  --gold: #ffd700;
  --wine: #722f37;
  --text: #222;
  --muted: #666;
  --panel: #ffffff;
  --panel-dark: #5d2430;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wine);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--wine);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 8px;
}

.announcement-bar {
  overflow: hidden;
  margin-bottom: 8px;
  padding: 8px;
  color: #00ff00;
  background: #000;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
  font-size: 13px;
  font-weight: 600;
}

.announcement-track {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.logo-panel {
  margin-bottom: 8px;
}

.logo-slider {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--gold);
  box-shadow: var(--shadow);
}

.logo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.logo-slide.active {
  opacity: 1;
}

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

.logo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 6px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.logo-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.promo-stack,
.wide-image-stack,
.history-top-images {
  display: grid;
  gap: 6px;
}

.promo-img,
.history-top-images img,
.wide-image-stack img,
.lottery-promo-img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.full-bleed-img {
  width: 100vw;
  max-width: none;
  margin-left: calc(-50vw + 50%);
  border-radius: 0;
}

.header-card,
.lottery-card,
.history-card,
.recommend-card,
.prediction-card {
  margin-bottom: 8px;
  padding: 12px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.header-time {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.header-time span {
  color: var(--primary);
  font-weight: 700;
}

.lottery-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.lottery-tabs::-webkit-scrollbar {
  display: none;
}

.type-btn {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #222;
  background: #f0f0f0;
  border: 0;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.type-btn:hover {
  transform: translateY(-1px);
}

.type-btn.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 3px 8px rgba(249, 68, 112, 0.28);
}

.lottery-open-time {
  margin-top: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.lottery-card {
  padding: 6px 16px 10px;
}

.lottery-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.period-line {
  color: #000;
  font-size: 15px;
  font-weight: 700;
}

.countdown-box {
  min-width: 96px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  text-align: center;
  font-weight: 700;
}

.countdown-box #countdownTime[hidden],
.countdown-box #countdownTime.is-drawing-hidden {
  display: none !important;
}

.countdown-box.is-drawing span {
  margin-bottom: 0;
}

.countdown-box span {
  display: block;
  margin-bottom: 2px;
  color: #333;
  font-size: 11px;
}

.countdown-box strong {
  display: block;
  font-size: 16px;
}

.numbers-title {
  margin-bottom: 4px;
  color: #000;
  font-size: 14px;
  text-align: center;
}

.numbers-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.numbers-row::-webkit-scrollbar {
  display: none;
}

.number-unit {
  display: grid;
  justify-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.number-ball {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #111;
  font-size: 25px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22), inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.number-ball::before {
  content: "";
  position: absolute;
  top: 14%;
  left: 14%;
  width: 68%;
  height: 58%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.number-ball::after {
  content: "";
  position: absolute;
  right: 9%;
  bottom: 9%;
  width: 22%;
  height: 20%;
  border-radius: 50%;
  background: #fff;
  opacity: 0.92;
}

.number-ball span {
  position: relative;
  z-index: 1;
  transform: translate(-6%, -8%);
}

.number-ball.red {
  background: radial-gradient(circle at 30% 30%, #ff6666 0%, #cc0000 70%, #990000 100%);
}

.number-ball.blue {
  background: radial-gradient(circle at 30% 30%, #6666ff 0%, #0000cc 70%, #000099 100%);
}

.number-ball.green {
  background: radial-gradient(circle at 30% 30%, #66cc66 0%, #009900 70%, #006600 100%);
}

.number-ball.gray {
  background: radial-gradient(circle at 30% 30%, #d2d2d2 0%, #999 70%, #666 100%);
}

.number-ball.pending {
  opacity: 0.62;
}

.number-ball.just-revealed {
  animation: lottery-ball-reveal 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes lottery-ball-reveal {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-16deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.12) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .number-ball.just-revealed {
    animation: none;
  }
}

.number-ball.special {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.25), 0 3px 8px rgba(0, 0, 0, 0.2);
}

.plus {
  align-self: center;
  flex: 0 0 auto;
  color: #000;
  font-size: 20px;
  font-weight: 800;
}

.zodiac {
  min-height: 20px;
  color: #000;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
}

.lottery-card-history {
  margin-top: 7px;
  border-top: 1px solid #eadada;
}

.lottery-history-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 4px;
  color: #222;
  background: transparent;
  border: 0;
  text-align: left;
}

.lottery-history-toggle-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.lottery-history-toggle-copy strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.lottery-history-toggle-copy small {
  overflow: hidden;
  color: #777;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-history-chevron {
  flex: 0 0 auto;
  color: #777;
  font-size: 20px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 180ms ease;
}

.lottery-history-toggle.open .lottery-history-chevron {
  transform: rotate(180deg);
}

.lottery-history-toggle:focus-visible,
.lottery-history-tabs button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.lottery-history-panel {
  padding: 6px 0 2px;
  border-top: 1px solid #f1e5e5;
}

.lottery-history-tabs {
  width: min(280px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 auto 8px;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
}

.lottery-history-tabs button {
  min-height: 32px;
  padding: 4px 10px;
  color: #555;
  background: #f3f3f3;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.lottery-history-tabs button + button {
  border-left: 1px solid #d8d8d8;
}

.lottery-history-tabs button.active {
  color: #fff;
  background: var(--primary);
}

.lottery-history-empty {
  padding: 22px 8px;
  color: #888;
  font-size: 12px;
  text-align: center;
}

.compact-history-table {
  overflow-x: auto;
  border: 1px solid #ededed;
  border-radius: 6px;
  scrollbar-width: thin;
}

.compact-history-row {
  min-width: 390px;
  display: grid;
  grid-template-columns: minmax(80px, 0.42fr) minmax(282px, 1.58fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.compact-history-row:last-child {
  border-bottom: 0;
}

.compact-history-head {
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  color: #666;
  background: #f7f7f7;
  font-size: 11px;
  font-weight: 700;
}

.compact-history-period {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.compact-history-period strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-history-period small {
  color: #888;
  font-size: 9px;
  white-space: nowrap;
}

.compact-history-numbers {
  display: flex;
  align-items: flex-start;
  gap: 3px;
  white-space: nowrap;
}

.compact-history-unit {
  width: 34px;
  flex: 0 0 34px;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.compact-history-unit .number-ball {
  width: 34px;
  height: 34px;
  border-width: 1px;
  font-size: 14px;
}

.compact-history-unit .number-ball.special {
  border-width: 2px;
}

.compact-history-unit .zodiac {
  min-height: 11px;
  font-size: 7px;
  line-height: 1.2;
  white-space: nowrap;
}

.compact-history-plus {
  align-self: center;
  margin-top: 8px;
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.trend-section + .trend-section,
.trend-stat-list + .trend-section {
  margin-top: 10px;
}

.trend-section-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  color: #333;
  background: #f7f7f7;
  border-left: 3px solid var(--primary);
  font-size: 11px;
}

.trend-section-head span {
  color: #888;
  font-size: 9px;
}

.special-trend-list {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 8px 1px 4px;
  scrollbar-width: thin;
}

.special-trend-item {
  width: 52px;
  flex: 0 0 52px;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.special-trend-item > small {
  color: #777;
  font-size: 9px;
}

.special-trend-item > em {
  color: #555;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.trend-stat-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  gap: 4px;
  overflow-x: auto;
  margin-top: 9px;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.trend-stat {
  min-height: 43px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  color: #333;
  background: #f5f5f5;
  border-top: 3px solid #aaa;
  border-radius: 4px;
}

.trend-stat small {
  font-size: 9px;
}

.trend-stat strong {
  font-size: 14px;
}

.trend-stat.odd,
.trend-stat.big {
  border-top-color: #e45d39;
  background: #fff1ec;
}

.trend-stat.even,
.trend-stat.small {
  border-top-color: #536d9f;
  background: #eef3fb;
}

.trend-stat.red {
  border-top-color: #d9363e;
  background: #fff0f1;
}

.trend-stat.blue {
  border-top-color: #315db2;
  background: #edf3ff;
}

.trend-stat.green {
  border-top-color: #258c55;
  background: #edf8f1;
}

.trend-heat-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 4px;
  padding-top: 7px;
}

.trend-heat-cell {
  min-width: 0;
  min-height: 38px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  color: #333;
  background: #f4f4f4;
  border-top: 3px solid #aaa;
  border-radius: 4px;
}

.trend-heat-cell strong {
  font-size: 11px;
}

.trend-heat-cell small {
  font-size: 8px;
}

.trend-heat-cell.red {
  border-top-color: #d9363e;
}

.trend-heat-cell.blue {
  border-top-color: #315db2;
}

.trend-heat-cell.green {
  border-top-color: #258c55;
}

.trend-heat-cell.heat-level-0 {
  color: #999;
  background: #f2f2f2;
}

.trend-heat-cell.heat-level-1 {
  background: #fff8db;
}

.trend-heat-cell.heat-level-2 {
  background: #ffe9a8;
}

.trend-heat-cell.heat-level-3 {
  background: #ffc970;
}

.trend-heat-cell.heat-level-4 {
  color: #4a2400;
  background: #ff9b4a;
}

.quick-menu {
  margin-bottom: 8px;
  padding: 12px;
  background: var(--wine);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.quick-menu h2,
.recommend-card h2,
.prediction-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  text-align: center;
}

.quick-menu h2 {
  color: #fff;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}

.quick-menu-btn {
  min-height: 34px;
  padding: 8px 4px;
  overflow: hidden;
  color: #e34234;
  background: var(--gold);
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-menu-btn:hover,
.quick-menu-btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.history-card {
  padding: 16px;
}

.history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px 16px;
  color: var(--gold);
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 16px;
  font-weight: 800;
}

.small-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  color: #fff;
  background: var(--secondary);
  border: 0;
  border-radius: 20px;
  font-size: 13px;
}

.table-scroll {
  overflow-x: auto;
}

.history-table,
.insider-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table {
  font-size: 12px;
}

.history-table th,
.history-table td {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.history-table th {
  color: #666;
  background: #f8f9fa;
  font-weight: 700;
}

.history-numbers {
  display: flex;
  align-items: center;
  gap: 3px;
}

.mini-ball {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.mini-ball.special {
  width: 28px;
  height: 28px;
  border: 2px solid #ff9900;
}

.mini-ball.red {
  background: #ff3333;
}

.mini-ball.blue {
  background: #3333ff;
}

.mini-ball.green {
  background: #00aa00;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
  color: #333;
  font-size: 13px;
}

.pagination button {
  min-width: 72px;
  padding: 7px 12px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 18px;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.center-actions {
  margin: 14px 0;
  text-align: center;
}

.zhuge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  color: #fff;
  background: linear-gradient(45deg, #ffaa00, #ff6600);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  box-shadow: 0 0 15px #ffaa00, 0 0 28px rgba(255, 102, 0, 0.8);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.daily-image-card {
  position: relative;
  margin: 15px 0;
}

.daily-image-card img {
  width: 100%;
  display: block;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.date-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
}

.recommend-card h2 {
  color: #333;
}

.recommend-list {
  display: grid;
  gap: 8px;
}

.recommend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-left: 4px solid currentColor;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.recommend-item img {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.prediction-card h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #333;
}

.prediction-card h2 img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.insider-list {
  display: grid;
  gap: 14px;
  padding: 10px 2px 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.liubei-banner {
  width: min(100%, 640px);
  display: block;
  margin: 0 auto 8px;
  border-radius: 8px;
}

.insider-table {
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 12px;
}

.insider-table th,
.insider-table td {
  padding: 7px 5px;
  border-bottom: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

.insider-table th {
  background: #f0f0f0;
  font-size: 13px;
}

.insider-table tr:last-child td {
  border-bottom: 0;
}

.content-cell {
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-line;
}

.hit {
  display: inline-block;
  padding: 1px 5px;
  color: var(--gold);
  background: #ff3333;
  border-radius: 4px;
  font-weight: 800;
}

.result-ok {
  color: var(--gold);
  background: #ff3333;
  border-radius: 4px;
  font-weight: 800;
}

.result-miss {
  color: #000;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}

.public-gallery-card {
  margin-bottom: 8px;
  text-align: center;
}

.gallery-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 24px;
  color: #fff;
  background: linear-gradient(135deg, #f94470, #ff9900);
  border: 2px solid var(--gold);
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(249, 68, 112, 0.4);
  font-size: 16px;
  font-weight: 800;
}

.gallery-toggle img {
  width: 24px;
  height: 24px;
}

.public-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
  margin-top: 12px;
}

.gallery-item {
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.gallery-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

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

.gallery-lines {
  position: absolute;
  inset: 6% 3%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: #8b0000;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 0 6px #fff, 0 1px 0 #fff;
}

.gallery-line {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.gallery-line-period {
  font-size: 23px;
}

.gallery-line-long {
  font-size: 15px;
}

.gallery-line-xlong {
  font-size: 12px;
}

.gallery-line-result {
  font-size: 13px;
}

.gallery-caption {
  padding: 6px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.85);
  font-weight: 800;
}

.copyright {
  padding: 15px 0;
  color: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.65);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  width: min(420px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.modal-body {
  padding: 15px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.modal-recommend-img {
  width: 100%;
  display: block;
  margin-bottom: 12px;
  border-radius: 8px;
}

.copy-box {
  min-height: 86px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-btn,
.warning-btn {
  min-height: 42px;
  color: #fff;
  border: 0;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 700;
}

.primary-btn {
  background: var(--secondary);
}

.warning-btn {
  color: #333;
  background: #ffc107;
}

.image-modal-panel {
  position: relative;
  width: min(960px, 96vw);
  background: transparent;
  box-shadow: none;
}

.image-modal-panel img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.image-close {
  position: absolute;
  top: -12px;
  right: -12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.announcement-panel {
  width: min(380px, 92vw);
  border-radius: 16px;
}

.announcement-head {
  background: linear-gradient(135deg, #f94470, #ff9900);
}

.announcement-body {
  padding: 20px;
  color: #333;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
}

.announcement-body .first-line {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 18px;
  text-align: center;
}

.toast {
  position: fixed;
  top: 18px;
  left: 15px;
  right: 15px;
  z-index: 1200;
  display: none;
  padding: 12px;
  color: #fff;
  background: #28a745;
  border-radius: 6px;
  text-align: center;
}

.toast.show {
  display: block;
}

@media (max-width: 768px) {
  .number-ball {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .prediction-card h2 img {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 2px;
    padding-right: 2px;
  }

  .header-card,
  .lottery-card,
  .history-card,
  .recommend-card,
  .prediction-card {
    padding-left: 6px;
    padding-right: 6px;
  }

  .lottery-card-head {
    align-items: stretch;
  }

  .period-line {
    align-self: center;
    font-size: 14px;
  }

  .history-title {
    padding: 12px 10px;
    font-size: 14px;
  }

  .insider-table th,
  .insider-table td,
  .history-table th,
  .history-table td {
    padding-left: 4px;
    padding-right: 4px;
  }
}

@media (max-width: 480px) {
  .type-btn {
    font-size: 15px;
  }

  .number-ball {
    width: 40px;
    height: 40px;
    font-size: 19px;
  }

  .numbers-row {
    gap: 4px;
  }

  .quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  }

  .public-gallery {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}
