/* Table styling */
.match-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.content {
  display: grid;
  justify-content: center;
  align-content: center;
  align-items: center;
  justify-items: center;
  color: white;
  font-family: 'Play', Arial, sans-serif; /* Custom font */
}

.scroll-box {
  max-height: 775px;
  overflow-y: auto;
  overflow-x: auto; /* ✅ Enable horizontal scrolling */
  border: 1px solid #4B4B63;
  margin: 20px 0;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.5);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto; /* Enables horizontal scrolling */
}

/* This helps keep your table centered and scrollable */
.table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background-color: #6C00FF;
  border-radius: 4px;
}

/* Sticky Header */
.match-table th {
  position: sticky;
  top: -1px;
  z-index: 2;
  background-color: rgba(108, 0, 255, 1); /* Highlight with purple glow */
  color: #FFFFFF;
  text-transform: uppercase;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border: 1px solid #4B4B63;
  text-shadow: 0 0 10px rgba(108, 0, 255, 0.8);
}

/* Cell Styling */
.match-table td {
  text-align: center; /* Center align all cells */
  font-weight: bold; /* Bold text for emphasis */
  padding: 10px; /* Consistent padding */
  color: #FFFFFF; /* White text */
  border: 1px solid #4B4B63; /* Subtle border */
  font-family: 'Play', Arial, sans-serif; /* Consistent font family */
  word-wrap: break-word; /* Handle long text */
  white-space: normal; /* Allow text wrapping */
  background-color: rgba(0, 0, 0, 0.5); /* Black with 50% transparency */
  cursor: auto;
}

/* Hover Effect for Rows */
.match-table tr:hover {
  background-color: rgba(108, 0, 255, 0.3); /* Highlight row on hover */
  cursor: pointer; /* Change cursor to pointer */
}

/* Column Widths */
.match-table th:nth-child(1),
.match-table td:nth-child(1) {
  width: 8%; /* Match ID */
}

.match-table th:nth-child(2),
.match-table td:nth-child(2),
.match-table th:nth-child(3),
.match-table td:nth-child(3) {
  width: 12%; /* Current Team & Opponent */
}

.match-table th:nth-child(4),
.match-table td:nth-child(4) {
  width: 11%; /* Match Result */
}

.match-table th:nth-child(5),
.match-table td:nth-child(5) {
  width: 12%; /* Report Time */
}

.match-table th:nth-child(6),
.match-table td:nth-child(6) {
  width: 45%; /* Maps */
  font-size: 14px;
}

/* Match Link Styling */
.match-link {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Inherit text color */
  font-weight: bold; /* Bold for emphasis */
  transition: color 0.3s ease; /* Smooth hover transition */
}

.match-link:hover {
  color: #007BFF; /* Blue on hover */
  text-decoration: underline; /* Add underline on hover */
}

/* Small Display */
@media (max-width: 992px) {
  .scroll-box {
    margin-left: 0px;
    color: white;
    font-family: 'Play', Arial, sans-serif; /* Custom font */
  }


}

/* Remove scroll-box height cap on mobile */
@media (max-width: 768px) {
  .scroll-box {
    max-height: none; /* ✅ Let it grow with content */
    overflow-x: auto; /* ✅ Only enable horizontal scrolling */
    overflow-y: visible; /* ✅ Allow full vertical rendering */
    padding-bottom: 5px;
  }

  .table-wrapper {
    overflow-x: auto; /* ✅ Keep horizontal scrolling */
    width: 100%;
  }

  .match-table {
    min-width: 700px; /* ✅ Triggers horizontal scroll */
    width: max-content;
    table-layout: fixed;
  }

  .match-table th {
    top: 0;
    z-index: 10;
    position: sticky;
    background-color: rgba(108, 0, 255, 1);
  }
}

@media (max-width: 576px) {
  .scroll-box {
    display: grid;
    justify-content: center;
    align-content: center;
    align-items: center;
    justify-items: center;
    margin-left: 0px;
    color: white;
    font-family: 'Play', Arial, sans-serif; /* Custom font */
  }


}
