/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Kode Mono', monospace;
    background-color: #1A2A5E;
    color: #FFFFFF;
    height: 100%; 
    overflow-x: hidden; 
}

/* Container */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align items to the top */
  min-height: 100vh;
  padding: 20px; 
  box-sizing: border-box;
}

/* Header Section */
header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5% 2%;
    background-color: #1A2A5E;
    z-index: 1000;
    box-sizing: border-box;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
  height: 70px;
  margin-right: 50px;
}

@media (max-width: 768px) {
  .logo img {
    height: 40px;
    margin-right: 20px;
  }
}

.logo h1 {
  font-size: 4rem;
  margin: 0;
  color: #FFFFFF;
  text-shadow: 3px 3px 4px #304884;
  letter-spacing: 2px; 
  font-weight: bold;
}

/* Overlay button format */
.overlay-button {
    background-color: #2C3E75;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 10px 40px;
    font-size: 1.22rem;
    @media (max-width: 768px) {
      padding: 8px 20px;
      font-size: 1rem;
    }
    cursor: pointer;
    font-family: 'Kode Mono', monospace;
}

.overlay-button:hover {
    background-color: #3A4F91;
}

.button-container {
    display: flex;
    gap: 20px; 
    justify-content: flex-end; 
    margin-top: 10px; 
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Rules Overlay */
.overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    width: 500px;
    max-width: 65vw;
    height: 100%;
    background-color: #2C3E75;
    color: #FFFFFF;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; 
    transition: right 0.4s ease-in-out;
    z-index: 1000;
}

.rules-content {
    padding: 4vh;
    font-family: 'Kode Mono', monospace;
}

.rules-content h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.rules-content p {
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.rules-content img {
    width: 100%;
    margin: 20px 0;
}

/* Leaderboard Overlay */

.leaderboard-content {
    padding: 4vh;
    max-width: 600px;
}

.leaderboard-content h2 {
    margin-bottom: 20px;
}

.leaderboard-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
}

.leaderboard-content table th,
.leaderboard-content table td {
    border: 1px solid #555555;
    padding: 10px;
    text-align: center;
}

.leaderboard-content table th {
    background-color: #1A2A5E;
}

.leaderboard-content table tr:nth-child(even) {
    background-color: #767baaa8;
}

.close-button {
    background-color: #1A2A5E;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 10px 40px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Kode Mono', monospace;
    margin-bottom: 20px;
    margin-top: 10px;
}

.close-button:hover {
    background-color: #14204A;
}

/* Form Section */
.form-container {
    background-color: #2C3E75;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 100vw;
    min-width: 40vw;
    @media (max-width: 768px) {
      min-width: 80vw;
    }
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10vh;
}

.form-container h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

label {
    text-align: left;
    margin-bottom: 5px;
    font-size: 1rem;
}

input[type="text"], input[type="email"] {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid rgb(78, 81, 127);
    border-radius: 5px;
    background-color: #1A2A5E;
    color: #FFFFFF;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

input::placeholder {
    color: #A9B3D1;
}

.radio-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0px 30px 0px 0px;
  box-sizing: border-box;
}

.radio-group label {
  margin-right: 10px;
  position: relative;
}

@media (max-width: 768px) {
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  .radio-group label {
    margin-bottom: 10px;
    margin-right: 0;
    top: 0;
  }
}

button[type="submit"] {
    background-color: #1A2A5E;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Kode Mono', monospace;
    width: 100%;
}

button[type="submit"]:hover {
    background-color: #14204A;
}

/* Confirmation Page Styles */
.confirmation-container {
    background-color: #2C3E75;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-sizing: border-box;
    margin-top: 20vh;
}

.confirmation-container h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.confirmation-container p {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #A9B3D1;
}

.submit-another-button {
    background-color: #1A2A5E;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Kode Mono', monospace;
    width: 100%;
}

.submit-another-button:hover {
    background-color: #14204A;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
        flex-direction: column; /* Stack logo and buttons vertically */
        align-items: center;
    }

    .logo img {
        height: 40px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .rules-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .form-container, .confirmation-container {
        padding: 15px;
        max-width: 90%;
    }

    .form-container h2, .confirmation-container h1 {
        font-size: 1.5rem;
    }

    input[type="text"], input[type="email"], button[type="submit"], .submit-another-button {
        font-size: 0.9rem;
        padding: 8px;
    }

    .radio-group {
        gap: 5px;
    }

    .button-container {
        justify-content: center; /* Center buttons on smaller screens */
        margin-top: 10px;
        gap: 10px; /* Reduce gap between buttons */
    }

    .overlay-button {
        padding: 8px 20px; /* Adjust button padding for smaller screens */
        font-size: 1rem; /* Adjust font size for smaller screens */
    }
}