:root {
  --bg-body: #0f1115;
  --bg-card: #181b21;
  --bg-card-inner: #22262e;
  --text-primary: #e4e6eb;
  --text-secondary: #8b949e;
  --text-tertiary: #565d66;
  --gold-primary: #d4af37;
  --gold-bright: #fadd70;
  --gold-dim: #8a732a;
  --gold-gradient: linear-gradient(135deg, #fadd70 0%, #d4af37 100%);
  --red-accent: #ff4757;
  --red-gradient: linear-gradient(145deg, #ff6b81, #ff4757);
  --border-color: #2f3336;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  width: 100%;
}

html {
  background-color: var(--bg-body);
}

body {
  background-color: var(--bg-body) !important;
  color: var(--text-primary);
  padding-bottom: 40px;
  line-height: 1.5;
}

header {
  background: rgba(24, 27, 33, 0.85);
  backdrop-filter: blur(10px);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  font-size: 18px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.btn-refresh {
  background: transparent;
  color: var(--gold-bright);
  border: 1px solid var(--gold-dim);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-refresh:active {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
}

.filter-section {
  padding: 15px 20px;
  background: var(--bg-card);
  margin-bottom: 1px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.highlight-text {
  color: var(--gold-primary);
  font-weight: 500;
}

.filter-tags {
  display: flex;
  gap: 10px;
}

.tag {
  background: var(--bg-card-inner);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.tag::after {
  content: "▾";
  color: var(--gold-dim);
}

.tag.active {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 15px 20px;
  background: var(--bg-card);
}

.stat-card {
  background: var(--bg-card-inner);
  padding: 15px 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border-color);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-dim);
  opacity: 0.3;
  border-radius: 6px 6px 0 0;
}

.stat-card.main::before {
  background: var(--gold-primary);
  opacity: 1;
  box-shadow: 0 0 8px var(--gold-dim);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-family: 'DIN Alternate', 'Roboto Mono', sans-serif;
}

.stat-value.gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 20px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sub {
  font-size: 10px;
  margin-top: 6px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
}

.hot-nums-section {
  background: var(--bg-card);
  padding: 15px 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
  border-left: 3px solid var(--gold-primary);
  padding-left: 8px;
}

.hot-num-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-num {
  width: 30px;
  height: 30px;
  background: var(--bg-card-inner);
  color: var(--text-secondary);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #333;
  transition: all 0.2s;
}

.hot-num:nth-child(-n+3) {
  border-color: var(--gold-dim);
  color: var(--gold-bright);
  box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

.list-container {
  padding: 0 15px;
  background-color: var(--bg-body);
}

.result-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rank-wrapper {
  display: flex;
  align-items: center;
}

.rank-badge {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-gradient);
  color: #1a1a1a;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  flex: 0 0 auto;
}

.rank-badge.silver { background: linear-gradient(135deg, #e0e0e0, #bdbdbd); }
.rank-badge.bronze { background: linear-gradient(135deg, #d7a98c, #a87b60); }
.rank-badge.normal { background: #333; color: #888; }

.ball-group {
  display: flex;
  gap: 8px;
}

/* 隐藏滚动条但保留功能 */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.ball {
  width: 28px;
  height: 28px;
  background: var(--red-gradient);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.2), 0 2px 4px rgba(0,0,0,0.3);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.roi-badge {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
  font-family: 'DIN Alternate', sans-serif;
}

.roi-badge span {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: normal;
}

.card-body {
  padding: 15px;
}

.card-main-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.main-stat-item {
  text-align: center;
  flex: 1;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.main-stat-item:last-child {
  border-right: none;
}

.main-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.main-stat-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'DIN Alternate', sans-serif;
}

.val-profit {
  color: var(--red-accent);
  font-size: 17px;
  font-weight: 700;
}

.card-grid-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.detail-item {
  background: var(--bg-card-inner);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-label {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.detail-val {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hit-badge { color: var(--text-primary); }
.hit-badge-high { color: var(--gold-primary); }

@media (max-width: 420px) {
  .stats-container { grid-template-columns: 1fr 1fr 1fr; }
  .ball { width: 26px; height: 26px; line-height: 26px; font-size: 12px; }
  .hot-num { width: 28px; height: 28px; }
}
