body {
  font-family: "Roboto Condensed", sans-serif;
  color: gold;
}

html {
  background-color: rgba(11, 11, 11, 0.9);
}

.intermission-container {
  padding: 16px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: gold;
  background-color: rgba(11, 11, 11, 0.9);
  font-size: 0.8rem;
}

.event-list {
  font-size: 1.2rem;
}

h1,
h4,
h6 {
  text-align: center;
}

.wrap {
  width: 300px;
}

.table {
  border: 1px solid gold !important;
  border-collapse: collapse;
}

.table td {
  border: none !important;
}

.card {
  background-color: rgba(11, 11, 11, 0.9);
  color: gold;
  /* border: 1px solid red !important; */
}

.card-title {
  color: gold !important;
  text-align: center;
}

.card-text {
  color: gold !important;
  text-align: center;
}

.logo-left {
  position: absolute;
  z-index: 10;
}

.logo-right {
  position: absolute;
  right: 8px;
  z-index: 10;
}

span {
  font-size: 1rem;
}

.bunny {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.map-leaderboards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.map-leaderboard {
  flex: 1 1 0;
  min-width: 250px;
  max-width: calc(100% / 3 - 10px);
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 260px; /* ensures all boxes are the same height */
}

.total-leaderboard,
.map-leaderboard.total-leaderboard {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.total-leaderboard > table,
.map-leaderboard.total-leaderboard > table {
  margin-left: auto;
  margin-right: auto;
  width: auto;
  min-width: 800px;
  max-width: 100%;
}

/* Make tables more compact for side-by-side display */
.map-leaderboard .table {
  font-size: 0.85rem;
  width: 100%;
  table-layout: fixed;
  min-height: 180px;
  margin-bottom: 0;
}

/* Prevent table rows from stretching to fill the table height */
.map-leaderboard .table tbody {
  height: auto;
  display: table-row-group;
}
.map-leaderboard .table tr {
  height: auto;
}

.map-leaderboard .table tr.filler-row td {
  visibility: hidden;
  padding-top: 0.5rem; /* Adjust to match default cell padding */
  padding-bottom: 0.5rem; /* Adjust to match default cell padding */
  line-height: 1.5; /* Ensure consistent line height with actual data rows */
}

.map-leaderboard .table td {
  /* Ensure all cells have consistent padding and line height */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  line-height: 1.5;
}

.map-leaderboard h2 {
  font-size: 1.2rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;
}

.map-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #0F1014;
  border: 1px solid gold;
  border-bottom: none;
}

.map-preview {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
}

.remaining-time-container {
  margin-bottom: 20px;
  text-align:center;
}

/* Modal styles for info dialog */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Prevent scroll on body when open */
  overflow: auto;
}
.modal-dialog {
  background: #181818;
  color: gold;
  border: 2px solid gold;
  border-radius: 12px;
  padding: 2em 2em 1.5em 2em;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 4px 32px #000a;
  position: relative;
  z-index: 2100;
  /* Table style mimic */
  font-size: 1.1rem;
  border-collapse: separate;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: gold;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
body.modal-open {
  overflow: hidden;
}

/* Info button style */
.info-btn {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  border: 1px solid gold;
  background: none;
  color: gold;
  font-weight: bold;
  margin-left: 10px;
  cursor: pointer;
  line-height: 32px;
  font-size: 1.8rem;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .map-leaderboard {
    max-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .map-leaderboards-container {
    flex-direction: column;
  }

  .map-leaderboard {
    max-width: 100%;
  }
}

.map-leaderboard .filler {
  flex: 1 1 0;
  border: 1px solid gold;
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: transparent;
}

.week-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: gold;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.week-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}