body {
  background-color: black;
  color: white;
  font-family: "Courier New", monospace;
  margin: 0; /* Reset default margin */
}

.container {
  max-width: 960px;
  text-align: center;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  padding: 1rem 0;
}

header h1 {
  font-size: 3rem;
  color: gold;
  font-family: 'Brush Script MT', cursive;
}

header img {
  width: 100%;
  max-width: 600px;
}

form {
  background-color: #111111;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px gold;
  margin-top: 50px;
}

input[type="text"],
input[type="email"] {
  width: 80%;
  max-width: 300px;
  padding: 10px;
  margin-bottom: 10px;
  border: none;
  border-radius: 5px;
  background-color: #222222;
  color: white;
  font-size: 1rem; /* Prevent zoom on mobile */
}

input[type="submit"] {
  background-color: gold;
  color: black;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  width: 100%; /* Full width on mobile */
  max-width: 300px;
}

input[type="submit"]:disabled {
  background-color: #555;
  cursor: not-allowed;
}

a {
  color: #AAA;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #555;
  padding: 10px;
  text-align: center;
}

th {
  background-color: #333;
}

.radio-label {
  font-size: 1.1rem;
  margin-right: 15px;
}

.wager-col {
  width: 15%; /* Slightly wider for easier tapping */
}

.wager-col input[type="text"] {
  width: 50px; /* Wider input */
  display: block;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem; /* Prevent zoom */
  padding: 5px;
}

.odds-col {
  width: 10%;
}

.probability-col {
  width: 10%;
}

.nominee-col{
  text-align: left;
}

.oscar-buck-icon {
  content: url('images/oscarbuck.png');
  height: 0.8rem; /* Slightly larger */
  display: inline-block;
  vertical-align: middle;
}

.oscar-buck-icon-bank {
  content: url('images/oscarbuck.png');
  height: 1.3rem;
  display: inline-block;
  vertical-align: middle;
}

.oscar-buck-icon-small {
  content: url('images/oscarbuck.png');
  height: 0.6rem;
  display: inline-block;
}

.instructions {
  background-color: #111111;
  color: white;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: left;
  line-height: 1.6;
}

.sticky-bar {
  background-color: #222222;
  color: white;
  text-align: center;
  padding: 0.5rem 0; /* Reduced padding */
  position: sticky;
  top: 0;
  z-index: 100; /* Ensure it stays on top */
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.sticky-bar h2 {
  font-size: 1.2rem;
  margin: 0;
}

.error-message {
  position: fixed;
  top: 60px; /* Below sticky bar */
  right: 20px;
  left: 20px; /* Full width on mobile */
  background-color: #f44336;
  color: white;
  text-align: center;
  padding: 15px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
  pointer-events: none; /* Click through when hidden */
}

.error-message.show {
  opacity: 1;
  pointer-events: auto;
}

.split {
  width: 50%;
}

.accordion {
  border: 1px solid #333;
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.accordion-header {
  background-color: #222;
  color: gold;
  cursor: pointer;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.accordion-title {
  font-weight: bold;
}

.accordion-content {
  padding: 0; /* Remove padding to let table fill width */
  border-top: 1px solid #333;
  display: none;
  background-color: #111;
}

.accordion-header .arrow {
  transition: transform 0.3s ease;
}

.accordion-header.active .arrow {
  transform: rotate(90deg);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: gold;
  padding: 30px;
  border-radius: 10px;
  position: relative;
  color: black;
  width: 90%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
}

.center-table {
  margin: 0 auto;
}

.winner {
  background-color: #D4AF37;
  color: black;
}

.new-row {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}

/* Leaderboard specific styles */
.leaderboard-table {
  border-collapse: separate;
  max-width: 100%;
  width: 600px;
  border: 5px solid #D4AF37;
  box-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
  border-radius: 25px;
  font-size: 1.2rem;
}

.leaderboard-table th, .leaderboard-table td {
  padding: 15px;
  text-align: center;
}

#wagers-header {
  margin-top: 50px;
  margin-bottom: 20px;
}

#wagers-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.category {
  flex: 1 1 45%; /* Grow and shrink, basis 45% */
  background-color: #1a1a1a;
  padding: 10px;
  border-radius: 5px;
}

#wagers table {
  border-collapse: collapse;
  width: 100%;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  font-size: 0.9rem;
  margin: 0 auto;
}

#wagers td {
  min-width: 40px;
  border: 1px solid #333;
  padding: 8px;
  text-align: left;
}

/* Default state for mobile-only elements */
.show-on-mobile {
  display: none;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
    margin-top: 10px;
  }

  form {
    padding: 15px;
    margin-top: 20px;
  }

  .sticky-bar h2 {
    font-size: 1rem;
  }

  table {
    width: 100%;
    font-size: 0.9rem;
  }

  th, td {
    padding: 8px 5px;
  }

  /* Hide less important columns */
  .hide-on-mobile {
    display: none;
  }

  .show-on-mobile {
    display: table-cell; /* Ensure it displays as a table cell */
  }

  .no-padding-on-mobile {
    padding: 0 !important;
    border: 0;
  }

  .category {
    flex: 1 1 100%; /* Full width on mobile */
  }

  /* Adjust nested table in mobile view */
  .show-on-mobile table {
    width: 100%;
    margin: 0;
    border: none;
  }

  .show-on-mobile td {
    border: none;
    padding: 2px 5px;
    text-align: left;
  }

  .show-on-mobile .split {
    width: 50%;
    text-align: center;
    border-top: 1px solid #333;
  }
}
