body {
    font-family: 'Montserrat', sans-serif;
    background-color: #222429;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 0;
}

header {
    background-color: #a6a6a6; 
    padding: 40px 20px; 
    margin-bottom: 50px; 
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 6.5em;
    color: #ffffff;
    margin-top: .25em;
    text-align: center;
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 3em;
    color: #a6a6a6;
    margin-top: -80px;
    margin-bottom: 50px;
}

h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 5em;
    color: #ffffff;
    line-height: 1em;
    margin-bottom: .5em;
}

p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    line-height: 1.5em;
    color: #ffffff;
    padding: 0 50px;
    margin-top: 50px;
    margin-bottom: 90px;
}

.arrow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 80px;
    margin-bottom: 90px;
}

.down-arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ffffff;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Section Styling */
section {
    margin: 30px 0;
    padding: 0 10px;
}

/* Current Popular Jerseys with Hover Effect */
.jersey-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three columns */
    gap: 20px; 
    padding: 40px; 
    margin-top: 0px;
    margin-bottom: 100px;
    width: 100%; 
    background-color: #222429;
}

/* Jersey Layout */
.jersey {
    position: relative;
    width: 100%;
    height: 325px; 
    max-width: 275px; 
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff; 
    flex-direction: column; /* Stack the jersey and label vertically */
    text-align: center;
    padding-top: 30px;
}

/* Label Styling */
.jersey-label {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2em;
    color: #242424;
    letter-spacing: 2px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 20px; 
    z-index: 2;
}

/* Image Styling */
.current-jersey, .throwback-jersey {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure images don't overflow or get cut off */
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.throwback-jersey {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
}

.jersey:hover .throwback-jersey {
    opacity: 1;
    transform: scale(1.05);
}

.jersey:hover .current-jersey {
    opacity: 0;
    transform: scale(1.05);
}

/* Responsive Design: Stacking jerseys on smaller screens */
@media screen and (max-width: 900px) {
    .jersey-images {
        grid-template-columns: repeat(2, 1fr); /* Two columns on medium screens */
    }
}

@media screen and (max-width: 600px) {
    .jersey-images {
        grid-template-columns: 1fr; /* One column on small screens */
    }
}

/* Section Styling */
section {
    margin: 30px 0;
    padding: 0 10px;
}

/* Mystery Player */
.scratch-container {
    position: relative;
    width: 500px; 
    height: 500px;
    margin: 0 auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


#backgroundCanvas,
#scratchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: auto;
    object-fit: contain;
}

#playerName {
    margin-top: 20px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6); /* semi-transparent black background */
    padding: 8px 16px; /* add padding inside */
    border-radius: 8px; /* slightly rounded corners */
    display: inline-block; /* so background wraps only around the text */
}

#playerName.visible {
    opacity: 1;
    transform: translateY(0);
}

#nextPlayer {
    background-color: #ffffff;
    color: #222429;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    z-index: 10;
    margin-top: 20px;
    transition: background 0.3s ease;
}

#nextPlayer:hover {
    background-color: #e0e0e0;
}


#nextPlayer.visible {
    display: inline-block;
}


#nextPlayer:hover {
    background-color: #e0e0e0;
}

#nextPlayer.visible {
    display: inline-block;
}

.hidden {
    display: none;
}

.jersey-carousel-section {
    margin: 50px auto;
    text-align: center;
    color: white;
    width: 90%;
  }
  
  .jersey-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
  }
  
  .jersey-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome */
  }
  
  .jersey-card {
    flex: 0 0 auto;
    width: 250px;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* center everything inside */
    padding: 10px;
  }
  
  .jersey-card:hover {
    transform: scale(1.05);
  }
  
  .jersey-card img {
    width: 200px; /* consistent width */
    height: 250px; /* consistent height */
    object-fit: contain; /* keep image proportions without stretching */
    margin-bottom: 10px;
  }
  
  .jersey-card p {
    margin: 0;
    font-weight: bold;
    color: #222429;
    text-align: center;
  }

.start-over-page {
    margin: 60px auto 30px;
    text-align: center;
}
  
.start-over-page button {
    padding: 12px 24px;
    background-color: #b81615;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    animation: pulse 2s infinite;
    font-family: 'Montserrat', sans-serif;
  }  
  
.start-over-page button:hover {
    background-color: #a6a6a6;
}

@keyframes pulse {
    0% {
      transform: scale(1);
      background-color: #b81615;
      box-shadow: 0 0 0 0 rgba(184, 22, 21, 0.7);
    }
    70% {
      transform: scale(1.05);
      box-shadow: 0 0 10px 10px rgba(184, 22, 21, 0);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(184, 22, 21, 0);
    }
  }

  .sources-section {
    text-align: center;
    margin: 40px auto 20px;
  }
  
  .sources-section button {
    padding: 5px 24px;
    background: none;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
  }
  
  .sources-section button:hover {
    background-color: #a6a6a6;
  }
  
  /* Modal styling */
  
  .modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
  }
  
  .modal-content {
    background-color: #222429;
    margin: auto;
    padding: 20px;
    border: 1px solid #a6a6a6;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    color: white;
  }
  
  .modal-content h2 {
    margin-top: 0;
  }
  
  .modal-content ul {
    list-style-type: none;
    padding: 0;
  }
  
  .modal-content ul li {
    margin-bottom: 10px;
  }
  
  .modal-content ul li a {
    color: #ffffff;
    text-decoration: underline;
  }
  
  #closeModal {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
  }
  
  #closeModal:hover {
    color: #a6a6a6;
  }
  