.bxh-modal-card,
.bxh-modal-card * {
  font-family: "Segoe UI Black", "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bxh-modal-card {
  position: relative;
  width: min(940px, calc(100vw - 28px));
  max-height: min(86vh, 760px);
  border-radius: 34px;
  padding: 24px 28px 26px;
  border: 2px solid #1e3a8a;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.bxh-modal-card .donate-title {
  margin: 0 40px 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f172a;
  text-align: center;
}

.bxh-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bxh-tab {
  min-width: 140px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #1e3a8a;
  background: #ffffff;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bxh-tab.active {
  background: #93c5fd;
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.2);
}

.bxh-meta {
  text-align: center;
  color: #334155;
  font-size: 13px;
  margin-bottom: 10px;
}

.bxh-list {
  background: #eef2ff;
  border: 1.5px solid #1e3a8a;
  border-radius: 30px;
  padding: 14px;
  max-height: calc(86vh - 185px);
  overflow: auto;
}

.bxh-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #1e3a8a;
  background: #f8fafc;
}

.bxh-row:last-child {
  margin-bottom: 0;
}

.bxh-rank-badge {
  width: 72px;
  text-align: center;
  border-radius: 12px;
  padding: 8px 0;
  font-size: 26px;
  font-weight: 900;
  border: 1px solid #1e3a8a;
  background: #e5e7eb;
  color: #0f172a;
}

.bxh-rank-badge.is-gold {
  background: #facc15;
}

.bxh-rank-badge.is-silver {
  background: #cbd5e1;
}

.bxh-rank-badge.is-bronze {
  background: #c26111;
  color: #fff;
}

.bxh-name {
  font-size: 22px;
  font-weight: 900;
  color: #020617;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bxh-score {
  font-size: 42px;
  font-weight: 900;
  color: #020617;
  white-space: nowrap;
}

.bxh-history-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #1e3a8a;
  background: #f8fafc;
}

.bxh-history-row:last-child {
  margin-bottom: 0;
}

.bxh-history-date {
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  background: #bfdbfe;
  border: 1px solid #1e3a8a;
  border-radius: 10px;
  padding: 6px 8px;
}

.bxh-history-winner {
  font-size: 28px;
  font-weight: 900;
  color: #111827;
}

.bxh-empty {
  text-align: center;
  padding: 20px;
  color: #475569;
  font-style: italic;
}

.bxh-result-actions {
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  padding: 12px;
  text-align: left;
}

.bxh-contribution-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#bxhProvinceSelect,
#bxhPlayerName {
  height: 44px;
  border-radius: 10px;
  border: 1px solid #94a3b8;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

#bxhProvinceSelect:focus,
#bxhPlayerName:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.bxh-register-wrap {
  margin-top: 8px;
}

.bxh-register-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.bxh-result-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #334155;
  min-height: 18px;
}

@media (max-width: 768px) {
  .bxh-modal-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .bxh-tab {
    min-width: 100px;
    font-size: 16px;
    padding: 8px 10px;
  }

  .bxh-list {
    max-height: calc(86vh - 168px);
    border-radius: 18px;
    padding: 10px;
  }

  .bxh-row {
    grid-template-columns: 54px 1fr;
    grid-template-areas:
      "rank name"
      "rank score";
    gap: 6px 10px;
    padding: 8px 10px;
  }

  .bxh-rank-badge {
    grid-area: rank;
    width: 54px;
    font-size: 22px;
  }

  .bxh-name {
    grid-area: name;
    font-size: 18px;
  }

  .bxh-score {
    grid-area: score;
    font-size: 30px;
  }

  .bxh-history-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bxh-history-date {
    font-size: 22px;
  }

  .bxh-history-winner {
    font-size: 20px;
    text-align: center;
  }

  .bxh-contribution-row,
  .bxh-register-row {
    grid-template-columns: 1fr;
  }
}
