html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  font-size: 1vw; /* Responsive font size */
}
.card-header {
  font-size: 1.5vw;                /* Small font size */
  font-weight: normal;            /* Lighter font weight */
  color: #555555;                 /* Slightly darker gray color */
  text-align: center;             /* Center text */              /* Add some padding for spacing */ 
  max-width: 90%;                 /* Limit width to fit within the card */
  margin-left: auto;              /* Center horizontally */
  margin-right: auto;  
  margin-bottom: 0px;           /* Center horizontally */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 2rem; /* Creates space between elements */
}


.theme {
  position: absolute;
}

.bracket {
  display: flex;
  flex-direction: row;
  position: relative;
  width: 100%;
  justify-content: space-between; /* Evenly distribute columns with space */
  align-items: flex-start; /* Align items to the top */
  gap: 2vw; /* Optional: Add space between columns */
}

/* Columns inside the bracket */
.column {
  display: flex;
  flex-direction: column;
  justify-content: space-around; /* Space items evenly within the column */
  align-content: center;
  flex: 1; /* Ensure all columns take up equal space */
  min-width: 0; /* Prevent columns from overflowing */
}

/* Container adjustments */
.container {
  max-width: 95vw !important; /* Constrain container width */
  margin: 0 auto;
}

/* Team div styles */
.team-div {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.3vw solid transparent; /* No default border */
  width: 100%;
  height: auto;
}

/* Hover effects */
.team-div:hover {
  outline: 0.1vw solid black !important;
}

/* Tightened win/lose states */
.team-div[data-result="win"] {
  border: 0.1vw solid black !important;
  outline: 0.2vw solid black !important;
}
.team-div[data-result="lose"] {
  border: 0.1vw solid transparent !important;
}

/* Bracket card styles */
.bracketcard {
  margin: 1vw auto !important; /* Minimal margin */
  padding: 0.5vw !important;
  background-color: #fcfcfc;
  box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
  border-radius: 0.5vw !important;
  width: auto;
  max-width: 90vw;
  min-width: 40vw;
  max-height: auto;
  height: auto;
}

/* Match card styles */
.match {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 8vw;
  max-width: 12vw;
  min-width: 10vw;
  margin: 4vw 0; /* Space between matches */
  width: calc(20vw - 3vw); /* Dynamic width */
  background-color: #fcfcfc;
  border-radius: 0.8vw !important;
}
.match .match-top {
  border-radius: 0.5vw 0.5vw 0 0 !important;
}
.match .match-bottom {
  border-radius: 0 0 0.5vw 0.5vw !important;
}
.match .team {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0.3vw solid black !important;
  padding: 0.5vw;
}
.match .team span {
  padding-left: 0.5vw !important;
}
.match .team span:last-child {
  padding-right: 0.5vw !important;
}
.match .team .score {
  margin-left: auto !important;
}

/* Empty match and team boxes */
#bracket-container-3 .empty-match,
.three #bracket-container-3 .match {
  background-color: #6b6b6b;
  color: #1f1f1f;
  border: 0.2vw solid #3b3b3b !important;
  padding: 1vw !important;
  margin: 0.5vw; /* Remove outer margin */
  border-radius: 0.5vw !important;
}
#bracket-container-3 .empty-match .empty-team {
  background-color: #2f2f2f;
  border-color: #1f1f1f !important;
  margin: 0.5vw !important;
  min-height: 4vh !important;
}

/* Team divs inside matches */
#bracket-container-3 .match .team-div {
  background-color: #2f2f2f !important;
  border-color: #5b5b5b !important;
  margin: 0.5vw !important; /* Remove extra margin */
  min-height: 4vh !important;
}

/* Align and tighten items */
.match .team:first-child {
  margin-bottom: -0.1vw !important;
}


  .disable-image .image,
  .disable-seed .seed,
  .disable-name .name,
  .disable-score .score {
    display: none !important;
  }
  .disable-borders {
    border-width: 0px !important;
  }
  .disable-borders .team {
    border-width: 0px !important;
  }
  .disable-seperator .match-top {
    border-bottom: 0px !important;
  }
  .disable-seperator .match-bottom {
    border-top: 0px !important;
  }
  .disable-seperator .team:first-child {
    margin-bottom: 0px;
  }
  /* Dark Theme */
  .theme-dark {
    background: #0e1217;
    border-color: #040607;
  }
  .theme-dark .match-lines .line {
    background: #36404e;
  }
  .theme-dark .team {
    background: #182026;
    border-color: #232c36;
    color: #6b798c;
  }
  .theme-dark .winner-top .match-top, .winner-mid
  .theme-dark .winner-bottom .match-bottom {
    background: #232c36;
    color: #e3e8ef;
    border-color: #36404e;
    z-index: 1;
  }
  .theme-dark .winner-top .match-top .score .winner-mid,
  .theme-dark .winner-bottom .match-bottom .score {
    color: #03d9ce;
  }
  .theme-dark .match .seed {
    font-size: 12px;
    min-width: 10px;
  }
  .theme-dark .match .score {
    font-size: 14px;
  }
 
  @media (max-width: 768px) {
    .one, .two {
      width: 50%;
      max-width: 50%;
      min-width: 2vw;
      padding: 1vw;
    }
    .one {
      padding-right: 1.5vw;
    }
    .two {
      padding-left: 1.5vw;
    }
    #bracket-container, #bracket-container-2, #bracket-container-3, #bracket-container-4, #bracket-container-5 {
      padding: 0vw;
      max-width: 100%;
      min-width: 100%;
    }
    .bracket {
      padding: 1vw;
      max-width: 100%;
      min-width: 100%;
      gap: 2vw; /* Add space between items */
    }
  
    .game-title {
      width: 100%; /* Matches the width of the matches */
      max-width: 100%;
      min-width: 100%;
      margin-top: 1vw;
      font-size: 4vw; /* Maintain legibility */
      text-align: center; /* Center-align game titles */
      height: auto;
      padding: 1.5vw;
    }
    .game-title .text-2xl {
      font-size: 4vw;
      height: auto;
    }
  
    .bracket .team-div {
      width: 16vw; /* Wider width for same aspect ratio */
      height: 8vw; /* Adjusted height */
      font-size: 1.2vw; /* Scaled font size */
      border-width: 0.2vw; /* Consistent border thickness */
      box-shadow: 0 0.3vw 0.6vw rgba(0, 0, 0, 0.1); /* Slight shadow */
      margin-bottom: 1vw; /* Space between teams */
      border-radius: 0.5rem;

    }
  
    .bracketcard {
      margin: 1vw;
      padding: 1vw;
      width: 100%;
      min-width: 10vw;
    }
  
    .match {
      width: 100%; /* Match fills the container */
      max-width: 100%;
      min-width: none;
      height: auto; /* Auto height */
      margin: 4vw 0; /* Space between matches */
      padding: 1vw;
      display: flex;
      flex-direction: column; /* Ensure teams stack properly */
      gap: 1vw; /* Add space between teams */
      font-size: 3.2em;
    }
  
    .match-row {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      gap: 1vw; /* Add space between items */
      width: 100%;
      flex-wrap: wrap; /* Allow wrapping if the space is too tight */
    }
  
    .match .team {
      height: 8vw; /* Matches team-div height */
      font-size: 1.2vw; /* Scaled font size */
      padding: 0.5vw; /* Internal padding for teams */
    }
  
    .team-and-seed {
      display: flex;
      flex: 1; /* Flex to fill space within row */
      justify-content: flex-start; /* Align content to the start (left side) */
      max-width: 47vw; /* Ensure it fits on the same row */
      min-width: 15vw; /* Allow it to shrink as needed */
      gap: 0; /* Remove space between items inside */
    }
    
    .match-details {
      display: flex;
      flex: 0 1 auto; /* Allow it to shrink and grow based on content */
      justify-content: flex-end; /* Align content to the right */
      max-width: 35vw; /* Make it thinner than the team-and-seed */
      min-width: 12vw; /* Allow it to shrink as needed */
    }
  
    #bracket-container-3 .match .team-div, #bracket-container-3 .match .empty-team {
      min-height: 3vw;
      font-size: 1vw;
      max-width: 20vw;
      width: 20vw;
      height: 10vw;
      border-radius: 0.5rem;
    }
  
    #bracket-container-3 .empty-match, #bracket-container-3 .match {
      max-width: 50vw;
      padding: 1vw;
      margin: 1vw;
      border-radius: 1vw;
      width: 50vw;
      min-width: none;
    }
    #bracket-container-3 .match img {
      height: auto;
      width: 20vw;
      max-width: 20vw;
      min-width: 20vw;
    }
    #superbowl-logo {
      width: 50vw;
      max-width: 50vw;
      min-width: 50vw;
    }
    .nav-bar {
      background-color: #006400;
      padding: 2px;
      display: flex;
      align-items: center;
      justify-content: flex;
      max-width: 100%;
      min-width: 100%;
      width: 100%;
      overflow: hidden;
  }
  
    /* Add hover effects to the empty matches */
    .navbar-nav .nav-item .nav-link {
      color: white;
      font-weight: bold;
      text-decoration: underline;
      text-transform: uppercase;
      font-size: 3.8em;
      padding: 2px 2px;
      white-space: nowrap; /* Prevents wrapping for nav links */
      transition: color 0.3s;
      display: block; /* Ensure nav-link behaves like a block element */
    }
    .navbar-nav {
      gap: 4vw;
    }
  .title {
    font-size: 12.6em;
    color: white;
  }
  .subtitle {
    font-size: 5.0em;
    color: white;
    text-align: center;
    margin: 0;
    padding-left: 3vw;
  }
  .navbar-brand {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .card-header {
    font-size: 3.5vw;                /* Small font size */
    font-weight: bold;            /* Lighter font weight */
    color: black;                 /* Slightly darker gray color */
  }
  /* Tightened win/lose states */
.team-div[data-result="win"] {
  border: 0.2vw solid black !important;
  outline: 0.4vw solid black !important;
}
.team-div[data-result="lose"] {
  border: 0.1vw solid transparent !important;
}
  }
  
/* Tightened win/lose states - with higher specificity */
.bracket .team-div[data-result="win"],
.match .team-div[data-result="win"],
div[id^="bracket-container"] .team-div[data-result="win"] {
  border: 0.2vh solid black !important;
  outline: 0.25vh solid black !important;
}

.bracket .team-div[data-result="lose"],
.match .team-div[data-result="lose"],
div[id^="bracket-container"] .team-div[data-result="lose"] {
  border: 0.1vw solid transparent !important;
}
  
#bracket-container, #bracket-container-2, #bracket-container-4, #bracket-container-5 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align to top */
    align-items: center;
    gap: 0; /* Remove flex gap */
}

.match {
    margin: 0.5vh 0; /* Small margin between matches */
}

.spacer {
    height: 3vh; /* Explicit height for spacers */
    visibility: visible; /* Make sure spacers are visible */
    margin: 0;
}

.game-title {
    margin: 0.5vh 0;
    height: auto;
}
  
#bracket-container, #bracket-container-2, #bracket-container-4, #bracket-container-5 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
}

.match {
    margin: 0.5vh 0;
}

/* Add margin to match rows in columns 2 and 4 */
#bracket-container-2 .match-row,
#bracket-container-4 .match-row {
    margin-top: 0.3vh;
    margin-bottom: 0.3vh;
}

/* Help Link Style */
.help-link {
    color: #006400;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1vw;
    position: absolute;
    right: 20%; /* Adjusted position to prevent overlap */
}

.help-link:hover {
    color: #004d00;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15px;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close-button:hover {
    color: #000;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column !important;  /* Stack items vertically */
        gap: 2vw !important;               /* Space between items */
        padding: 2vw !important;           /* Padding around content */
        align-items: center !important;    /* Center items horizontally */
    }

    .card-header span {
        width: 100% !important;  /* Full width */
        text-align: center;
        font-size: 4vw !important;         /* Larger font size for main title */
        order: 1 !important;               /* Show title first */
    }

    .help-link {
        position: relative !important;  /* Remove absolute positioning */
        right: auto !important;        /* Reset right position */
        font-size: 3.5vw !important;   /* Adjusted font size */
        order: 2 !important;                      /* Show help link second */
        margin-top: 1vw !important;              /* Space between title and link */
    }

    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 5vw !important;
        margin-bottom: 4vw !important;
    }

    .modal-content p {
        font-size: 3.8vw !important;
        line-height: 1.4 !important;
    }

    .close-button {
        font-size: 7vw !important;
        right: 3vw;
        top: 1vw;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .card-header {
        gap: 1rem; /* Smaller gap on mobile */
    }

    .help-link {
        font-size: 3vw;
        right: 15%; /* Adjusted for mobile */
    }
}

