/* 极简设计：米暖灰背景，不显示球场/副标题/扣分说明，界面纯粹 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #f6f3ed;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
}

.container {
  width: 100%;
  max-width: 820px;
}

/* 界面最顶部可选赛事药丸切换器 */
.tournament-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.tournament-pills {
  display: inline-flex;
  background-color: #eae5db;
  padding: 3px;
  border-radius: 20px;
  gap: 4px;
}

.tourn-btn {
  border: none;
  background: transparent;
  color: #636159;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 18px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tourn-btn:hover {
  color: #1a1a1a;
}

.tourn-btn.active {
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

/* 顶部极简导航 */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.csl-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.csl-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn {
  border: none;
  background-color: #e5e2da;
  color: #2e3033;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: #ded9cf;
}

.tab-btn.active {
  background-color: #27282b;
  color: #ffffff;
}

/* 一键赛季标注与切换 */
.season-switch-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.season-pills {
  display: inline-flex;
  background-color: #eae5db;
  padding: 3px;
  border-radius: 20px;
  gap: 4px;
}

.season-btn {
  border: none;
  background: transparent;
  color: #636159;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.season-btn:hover {
  color: #1a1a1a;
}

.season-btn.active {
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

/* 日期分组 */
.date-section {
  margin-bottom: 24px;
}

.date-header {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #4b4843;
  margin: 16px 0 12px;
  position: relative;
}

.date-header::before,
.date-header::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32%;
  height: 1px;
  background-color: #e6e1d7;
}

.date-header::before {
  left: 0;
}

.date-header::after {
  right: 0;
}

/* 赛程比赛行：纯净无多余信息 */
.match-card {
  padding: 16px 4px;
  border-bottom: 1px solid #e7e2d8;
}

.match-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.team-side.home {
  justify-content: flex-start;
}

.team-side.away {
  justify-content: flex-end;
}

.team-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-name {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.rank-badge {
  font-size: 12px;
  color: #716e66;
  background-color: #eae6dd;
  border: 1px solid #e0dbd0;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

/* 胜平负率与时间居中区 */
.prediction-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 220px;
}

/* 主胜与客胜率基础样式 */
.prob-rate {
  font-size: 17px;
  font-weight: 700;
  color: #4b4843;
  min-width: 58px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* 时间与平局中轴列 */
.time-draw-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 82px;
}

.match-time {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
}

/* 平局概率胶囊基础样式 */
.draw-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* =========================================================================
   严格统一高亮规则：>=50标绿，最大标灰，其余无底色（主胜、平局、客胜完全一致）
   ========================================================================= */

/* 1. >= 50.0% 标绿 */
.prob-rate.highlight-green {
  background-color: #16a34a !important;
  color: #ffffff !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.draw-pill.highlight-green {
  background-color: #16a34a !important;
  color: #ffffff !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

/* 2. 概率最大的标灰 (未到50%时) */
.prob-rate.highlight-dark {
  background-color: #475569 !important;
  color: #ffffff !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

.draw-pill.highlight-dark {
  background-color: #475569 !important;
  color: #ffffff !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

/* 3. 其余较小概率：完全无底色 */
.prob-rate.highlight-none {
  background: transparent !important;
  color: #4b4843 !important;
  padding: 4px 6px !important;
}

.draw-pill.highlight-none {
  background: transparent !important;
  color: #716e66 !important;
  padding: 2px 0 !important;
}

/* 模块标题 */
.section-title {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #27282b;
  margin-bottom: 14px;
}

/* 【赛程】与【赛果】轮次选择器与头部 */
.schedule-header,
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-header .section-title,
.results-header .section-title {
  margin-bottom: 0;
}

.round-picker-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f0ece3;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid #e2ddd2;
}

.round-arrow-btn {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: #4b4843;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.round-arrow-btn:hover:not(:disabled) {
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.round-arrow-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.round-select-dropdown {
  background-color: #ffffff;
  border: 1px solid #dcd7cc;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

/* 【赛果】视图 */
.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px;
  border-bottom: 1px solid #e7e2d8;
}

.result-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
}

.final-score {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: 2px;
}

/* 日期加时间，不显示完赛二字 */
.result-datetime {
  font-size: 11px;
  color: #8c887b;
  margin-top: 3px;
}

/* 【积分榜】视图表格 */
.table-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e0d5;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
}

.standings-table th {
  background-color: #f2eee6;
  color: #55524b;
  font-weight: 600;
  padding: 10px 6px;
  border-bottom: 1px solid #e0dbce;
}

.standings-table td {
  padding: 11px 6px;
  border-bottom: 1px solid #f0ecdf;
  color: #2c2a26;
}

.standings-table tr:hover {
  background-color: #fbf9f5;
}

.col-pos {
  width: 50px;
  font-weight: 700;
  color: #636159;
  white-space: nowrap;
}

.tied-badge {
  display: inline-block;
  font-size: 10px;
  background-color: #e2ddd2;
  color: #4b4843;
  padding: 1px 3px;
  border-radius: 3px;
  margin-right: 2px;
  font-weight: 700;
  vertical-align: middle;
}

.col-team {
  text-align: left;
  padding-left: 12px !important;
  font-weight: 700;
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-cell img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.col-num {
  width: 38px;
  color: #55524b;
}

.col-ded {
  width: 44px;
  font-weight: 700;
  color: #dc2626;
}

.ded-val {
  color: #dc2626;
  font-weight: 700;
  background-color: #fee2e2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.col-pts {
  width: 46px;
  font-weight: 800;
  font-size: 15px;
  color: #111827;
}

/* 最底部：更新于 日期和时间 */
.page-footer {
  text-align: center;
  color: #8c887b;
  font-size: 13px;
  margin-top: 36px;
  padding-top: 14px;
}

/* =========================================================================
   移动端响应式深度适配 (iPhone, Android 等各类手机屏幕)
   ========================================================================= */
@media (max-width: 680px) {
  body {
    padding: 12px 6px 30px;
  }
  .container {
    width: 100%;
  }
  .tournament-bar {
    margin-bottom: 10px;
  }
  .tourn-btn {
    padding: 4px 14px;
    font-size: 12px;
  }
  .top-nav {
    gap: 8px;
    margin-bottom: 12px;
  }
  .csl-icon {
    width: 28px;
    height: 28px;
  }
  .tab-btn {
    padding: 6px 14px;
    font-size: 13px;
  }
  .season-switch-bar {
    margin-bottom: 14px;
  }
  .season-btn {
    padding: 3px 10px;
    font-size: 11px;
  }
  .schedule-header,
  .results-header {
    gap: 6px;
    margin-bottom: 10px;
  }
  .section-title {
    font-size: 14px;
  }
  .round-picker-group {
    padding: 2px 4px;
    gap: 4px;
  }
  .round-select-dropdown {
    font-size: 12px;
    padding: 2px 4px;
  }
  .round-arrow-btn {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  .date-header {
    font-size: 14px;
    margin: 12px 0 8px;
  }
  .date-header::before,
  .date-header::after {
    width: 22%;
  }
  .match-card {
    padding: 12px 2px;
  }
  .team-side {
    gap: 6px;
  }
  .team-logo {
    width: 26px;
    height: 26px;
  }
  .team-name {
    font-size: 13px;
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rank-badge {
    font-size: 10px;
    padding: 1px 3px;
  }
  .prediction-center {
    gap: 4px;
    min-width: 132px;
  }
  .prob-rate {
    font-size: 13px;
    min-width: 36px;
    padding: 3px 4px !important;
  }
  .time-draw-col {
    min-width: 52px;
  }
  .match-time {
    font-size: 13px;
    margin-bottom: 2px;
  }
  .draw-pill {
    font-size: 10px;
    padding: 2px 4px !important;
  }
  .result-card {
    padding: 12px 4px;
  }
  .result-score-col {
    min-width: 95px;
  }
  .final-score {
    font-size: 18px;
    letter-spacing: 1px;
  }
  .result-datetime {
    font-size: 10px;
  }
  .standings-table {
    font-size: 12px;
  }
  .standings-table th,
  .standings-table td {
    padding: 8px 3px;
  }
  .col-team {
    padding-left: 6px !important;
    min-width: 90px;
  }
  .team-cell {
    gap: 5px;
  }
  .team-cell img {
    width: 18px;
    height: 18px;
  }
  .col-pos {
    width: 32px;
  }
  .col-num {
    width: 24px;
    font-size: 11px;
  }
  .col-ded {
    width: 30px;
    font-size: 11px;
  }
  .ded-val {
    padding: 1px 3px;
    font-size: 11px;
  }
  .col-pts {
    width: 32px;
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .team-name {
    font-size: 12px;
    max-width: 68px;
  }
  .prediction-center {
    gap: 2px;
    min-width: 120px;
  }
  .prob-rate {
    font-size: 12px;
    min-width: 32px;
    padding: 2px 2px !important;
  }
  .time-draw-col {
    min-width: 48px;
  }
  .match-time {
    font-size: 12px;
  }
  .draw-pill {
    font-size: 9px;
  }
}
