* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, "Microsoft YaHei", BlinkMacSystemFont, sans-serif;
  background: #F5F7FA;
  padding: 12px;
  min-height: 100vh;
}
.container {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}
.card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
@media (max-width: 480px) {
  .card {
    padding: 16px;
    border-radius: 14px;
  }
}
@media (max-width: 360px) {
  .card {
    padding: 12px;
    border-radius: 12px;
  }
}
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1D1D1F;
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 480px) {
  .card-title {
    font-size: 15px;
  }
}
@media (max-width: 360px) {
  .card-title {
    font-size: 14px;
  }
}
.card-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: #d32f2f;
  border-radius: 2px;
}
.refresh-btn {
  padding: 6px 12px;
  border-radius: 10px;
  border: none;
  background: #007aff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
@media (max-width: 480px) {
  .refresh-btn {
    padding: 5px 10px;
    font-size: 13px;
  }
}
.ball-group {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.ball-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 38px;
}
.ball {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
@media (max-width: 480px) {
  .ball {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .ball-zodiac {
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  .ball {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .ball-zodiac {
    font-size: 10px;
  }
  .ball-sep {
    font-size: 18px;
  }
}
.ball.red { background: radial-gradient(circle at 30% 30%, #ff4d4f, #cf1322); }
.ball.blue { background: radial-gradient(circle at 30% 30%, #40a9ff, #096dd9); }
.ball.green { background: radial-gradient(circle at 30% 30%, #73d13d, #389e0d); }
.ball-zodiac {
  font-size: 12px;
  color: #333;
  font-weight: 600;
}
.ball-sep {
  font-size: 22px;
  color: #999;
  line-height: 38px;
  padding: 0 2px;
}
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  background: #E9EBF0;
  color: #555;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
  min-width: 80px;
}
@media (max-width: 480px) {
  .tab-btn {
    font-size: 13px;
    padding: 8px 4px;
  }
}
.tab-btn.active {
  background: #d32f2f;
  color: #fff;
}
.tab-btn.analyze.active {
  background: #007aff;
  color: #fff;
}
.tab-btn.zodiac.active {
  background: #13a662;
  color: #fff;
}
.tab-btn.model.active {
  background: #722ED1;
  color: #fff;
}
.history-item {
  padding: 14px 0;
  border-bottom: 1px solid #F0F0F5;
}
@media (max-width: 480px) {
  .history-item {
    padding: 12px 0;
  }
}
.history-expect {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  text-align: left;
}
@media (max-width: 480px) {
  .history-expect {
    font-size: 13px;
  }
}
.history-item .ball-group { justify-content: flex-start; gap: 8px; }
.load-more {
  text-align: center;
  padding: 12px;
  background: #F5F7FA;
  border-radius: 12px;
  color: #007aff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
}
@media (max-width: 480px) {
  .load-more {
    padding: 10px;
    font-size: 13px;
  }
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-select, .filter-input, .filter-btn {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 13px;
  background: #fff;
  transition: border 0.2s;
  flex: 1;
  min-width: 0;
}
.filter-select:focus, .filter-input:focus {
  border-color: #007aff;
  outline: none;
}
.filter-select { min-width: 70px; }
.filter-input { min-width: 60px; }
.filter-btn {
  background: #007aff;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.hot-wrap-title {
  font-size: 17px;
  font-weight: 800;
  color: #d32f2f;
  margin: 12px 0 16px;
}
.hot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .hot-grid {
    grid-template-columns: 1fr;
  }
  .hot-card.full {
    grid-column: span 1;
  }
}
.hot-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px;
  border-left: 5px solid #d32f2f;
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.05);
}
.hot-card.full {
  grid-column: span 2;
  border-left-color: #007aff;
  background: #fff;
}
.hot-card .label {
  font-size: 12px;
  color: #8A8A93;
  font-weight: 500;
  margin-bottom: 6px;
}
.hot-card .value {
  font-size: 17px;
  font-weight: 800;
  color: #1D1D1F;
  line-height: 1.3;
}
.hot-card.full .value {
  color: #007aff;
  font-size: 16px;
}
.rank-box {
  margin-top: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  overflow-x: auto;
}
@media (max-width: 480px) {
  .rank-box {
    padding: 8px;
  }
  .rank-header,
  .rank-row {
    font-size: 11px;
  }
  .rank-header .rank-no,
  .rank-row .rank-no { width: 28px; }
  .rank-header .rank-count,
  .rank-row .rank-count { width: 38px; }
  .rank-header .rank-rate,
  .rank-row .rank-rate { width: 42px; }
  .rank-header .rank-miss,
  .rank-row .rank-miss { width: 42px; }
}
.rank-header {
  display: flex;
  padding: 6px 0 8px;
  font-size: 11px;
  color: #8A8A93;
  border-bottom: 1px solid #E5E7EB;
}
.rank-header .rank-no { width: 32px; text-align: center; }
.rank-header .rank-name { flex: 1; padding: 0 6px; }
.rank-header .rank-count { width: 42px; text-align: right; }
.rank-header .rank-rate { width: 48px; text-align: right; }
.rank-header .rank-miss { width: 48px; text-align: right; }
.rank-row {
  display: flex;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid #F0F0F5;
  align-items: center;
}
.rank-row:last-child { border-bottom: none; }
.rank-row .rank-no {
  width: 32px;
  text-align: center;
  font-weight: 700;
  color: #d32f2f;
}
.rank-row .rank-name { flex: 1; padding: 0 6px; }
.rank-row .rank-count {
  width: 42px;
  text-align: right;
  font-weight: 600;
}
.rank-row .rank-rate {
  width: 48px;
  text-align: right;
  color: #8A8A93;
}
.rank-row .rank-miss {
  width: 48px;
  text-align: right;
  color: #8A8A93;
}
.sub-title {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 12px;
  color: #1D1D1F;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 480px) {
  .sub-title {
    font-size: 14px;
    margin: 16px 0 10px;
  }
}
@media (max-width: 360px) {
  .sub-title {
    font-size: 13px;
    margin: 14px 0 8px;
  }
}
.hot-tag {
  display: inline-block;
  background: #FFECEC;
  color: #d32f2f;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}
.toggle-btn {
  font-size: 12px;
  font-weight: 600;
  color: #007aff;
  background: #F0F5FF;
  padding: 4px 10px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
}
.analysis-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .analysis-row {
    gap: 8px;
  }
}
@media (max-width: 360px) {
  .analysis-row {
    gap: 6px;
  }
  .analysis-item {
    min-width: calc(50% - 4px);
    padding: 10px 8px;
  }
}
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0;
}
@media (max-width: 360px) {
  .analysis-grid {
    grid-template-columns: 1fr;
  }
}
.analysis-item {
  flex: 1;
  min-width: 72px;
  background: #F7F8FA;
  padding: 12px 10px;
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
}
.analysis-item .label {
  color: #8A8A93;
  font-size: 11px;
  margin-bottom: 4px;
}
.analysis-item .value {
  font-weight: 700;
  font-size: 15px;
  color: #007aff;
}
.item-full {
  background: #F7F8FA;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 480px) {
  .item-full {
    padding: 10px 12px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .item-full {
    padding: 8px 10px;
    font-size: 11px;
  }
}
.detail-box {
  display: none;
  margin-top: 10px;
  background: #F9FAFC;
  border-radius: 12px;
  padding: 14px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.empty-tip {
  text-align: center;
  padding: 24px 0;
  color: #8A8A93;
  font-size: 14px;
}
.countdown-small {
  text-align: center;
  font-size: 12px;
  color: #cf1322;
  margin-top: 6px;
}
.countdown-small .num {
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.core-conclusion {
  background: #FFF5F5;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}
.conclusion-title {
  font-size: 16px;
  font-weight: 700;
  color: #13a662;
  margin-bottom: 8px;
}
.conclusion-item {
  font-size: 14px;
  line-height: 1.6;
}
.data-grid-z {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.data-grid-4 {
  grid-template-columns: repeat(4, 1fr) !important;
}
.data-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 480px) {
  .data-grid-z {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .data-grid-4,
  .data-grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 360px) {
  .data-grid-z,
  .data-grid-4,
  .data-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
.data-item-z {
  background: #F7F8FA;
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  font-size: 12px;
}
.data-item-z.hot {
  background: #E6F7F0;
  color: #13a662;
  font-weight: 700;
}
.data-item-z.cold {
  background: #FFF2F0;
  color: #d32f2f;
  font-weight: 700;
}
.data-item-z.warm {
  background: #FFF7E6;
  color: #fa8c16;
}
.follow-table-z {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
  overflow-x: auto;
  display: block;
}
.follow-table-z th, .follow-table-z td {
  border: 1px solid #E5E7EB;
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
}
.follow-table-z th {
  background: #F7F8FA;
  font-weight: 700;
}
@media (max-width: 480px) {
  .follow-table-z {
    font-size: 11px;
  }
  .follow-table-z th, .follow-table-z td {
    padding: 4px 2px;
  }
}
.final-recommend-z {
  background: #E6F7F0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #13a662;
  margin-top: 10px;
  word-break: break-all;
  line-height: 1.6;
}
@media (max-width: 480px) {
  .final-recommend-z {
    padding: 12px;
    font-size: 14px;
  }
}
@media (max-width: 360px) {
  .final-recommend-z {
    padding: 10px;
    font-size: 13px;
  }
}

/* 新增：概率模型专用样式 */
.model-section {
  margin-bottom: 16px;
}
.model-title {
  font-size: 15px;
  font-weight: 700;
  color: #1D1D1F;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 480px) {
  .model-title {
    font-size: 14px;
    margin: 16px 0 10px;
  }
}
@media (max-width: 360px) {
  .model-title {
    font-size: 13px;
    margin: 14px 0 8px;
  }
}
.model-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: #722ED1;
  border-radius: 2px;
}
.model-card {
  background: #F7F8FA;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}
@media (max-width: 480px) {
  .model-card {
    padding: 10px 12px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .model-card {
    padding: 8px 10px;
    font-size: 11px;
  }
}
.model-item {
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  position: relative;
  overflow: hidden;
}
.model-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #722ED1 0%, #9254DE 100%);
  opacity: 1;
}
.model-item:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(114, 46, 209, 0.08);
}
@media (max-width: 480px) {
  .model-item {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.7;
  }
}
@media (max-width: 360px) {
  .model-item {
    padding: 10px 12px;
    font-size: 11px;
    line-height: 1.6;
  }
}
.model-item .top {
  display: inline-block;
  color: #fff;
  background: linear-gradient(135deg, #722ED1 0%, #9254DE 100%);
  font-weight: 700;
  margin-right: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  min-width: 50px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(114, 46, 209, 0.2);
}
@media (max-width: 480px) {
  .model-item .top {
    padding: 2px 8px;
    font-size: 11px;
    min-width: 45px;
  }
}
.model-item .label {
  color: #666;
  margin-right: 8px;
  display: inline-block;
}
.model-item .label strong {
  color: #1D1D1F;
  font-weight: 600;
}
.kill-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.kill-item {
  background: #FFF1F0;
  color: #d32f2f;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
}
@media (max-width: 480px) {
  .kill-item {
    padding: 6px 12px;
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .kill-item {
    padding: 5px 10px;
    font-size: 12px;
  }
}
.protect-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.protect-item {
  background: #E6F7F0;
  color: #13a662;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
}
@media (max-width: 480px) {
  .protect-item {
    padding: 6px 12px;
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .protect-item {
    padding: 5px 10px;
    font-size: 12px;
  }
}
