/* Reset some default styles */
body,
h1,
h2,
p,
form {
  margin: 0;
  padding: 0;
  color: white;
  text-shadow: 1px 1px 2px black;
}

body,
button {
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-style: italic;
}

/* Set background color and font */
body {
  background-color: #0a0c3d; /* Navy */
  background-image: url("images/background.png"); /* Default background for mobile */
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  overscroll-behavior-x: none;
  background-size: cover; /* Cover the entire page */
  background-position: center center; /* Center the background image */
  background-attachment: fixed; /* Fix background during scroll */
  font-family: Arial, sans-serif;
  color: white;
}

/* Align content to the center */
body > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

/* Headings */
h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  margin: 24px 0;
}

/* Text elements */
p {
  font-size: 16px;
  margin-bottom: 8px;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Input fields and buttons */
input[type="text"],
input[type="number"],
select,
button {
  width: 100%;
  font-size: 16px;
  padding: 4px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  border-color: #000000;
  text-shadow: 0px 0px 0px black;
}

/* Table headers */
th {
  background-color: #3f3f3f;
  color: white;
  padding: 4px;
  border-color: #000000;
}

/* Table data */
td {
  background-color: #ffffff; /* Add this line to set the background color of table data cells */
  color: #000000; /* Add this line to set the text color of table data cells */
  padding: 4px;
  border: 1px solid #999;
  border-color: #000000;
}

/* Buttons */
button {
  background-color: lightgray;
  color: black;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px; /* Round the buttons */
}

/* Scorecard shading */
#scorecard-table tr td:nth-child(1) {
  font-weight: bold;
}
#scorecard-table tr:nth-child(1) td {
  background-color: #110c59;
  color: white;
  font-weight: bold;
}
#scorecard-table tr:nth-child(2) td {
  background-color: #06381a;
  font-weight: normal;
  font-size: smaller;
  color: white;
}
#scorecard-table tr:nth-child(3) td {
  background-color: #590454;
  color: white;
  font-weight: bold;
}
#scorecard-table tr:nth-child(6) td {
  background-color: #110c59;
  color: white;
  font-weight: bold;
}
#scorecard-table tr:nth-child(7) td {
  background-color: #06381a;
  font-weight: normal;
  font-size: smaller;
  color: white;
}
#scorecard-table tr:nth-child(8) td {
  background-color: #590454;
  color: white;
  font-weight: bold;
}
#scorecard-table tr:nth-child(4) td {
  font-weight: bold;
  font-style: normal;
}
#scorecard-table tr:nth-child(9) td {
  font-weight: bold;
  font-style: normal;
}

/* Leaderboard table rows */
#leaderboard-table tr:nth-child(even) {
  background-color: #e0e0e0;
}

#leaderboard-table tr:nth-child(1) td {
  background-color: black;
  font-weight: bold;
  color: white;
}

#leaderboard-table tr td:nth-child(1) {
  background-color: black;
  font-weight: bold;
  color: white;
}

/* Add this centered-text class */
.centered-text {
  text-align: center;
}

/* Flex container for course name and today's date */
#main-page-header-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2px;
}

/* Add some space between course name and today's date */
#main-course-name {
  margin-right: 8px;
}

/* Button container */
.button-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
}

.button-container button {
  flex-grow: 1;
  margin-right: 8px;
}

.button-container button:last-child {
  margin-right: 0;
}

/* Input and button container */
.input-and-button-container {
  display: flex;
}

h1 {
  font-size: 24px;
  margin-bottom: 16px;
  text-align: center; /* Add this line to center the header content */
}

.hole-score-container {
  margin-right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  white-space: nowrap;
  height: 100%;
}

button {
  height: 100%;
}

/* Table container */
.table-container {
  padding: 1rem 0;
}

/* Leaderboard container */
.leaderboard-container {
  padding-left: 25%;
  padding-right: 25%;
  padding-top: 10px;
  padding-bottom: 10px;
  height: 30vh;
  overflow: auto;
}

/* Table styles */
#leaderboard-table {
  border-collapse: collapse;
  width: 100%;
}

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

/* Media query for mobile responsiveness */
@media (max-width: 600px) {
  /* Leaderboard container */
  .leaderboard-container {
    padding-left: 25%;
    padding-right: 25%;
  }

  /* Button container */
  .button-container button {
    margin-bottom: 8px;
  }

  .hole-score-container {
    margin-right: 0.5rem;
  }
}

/* Media query for desktop users */
@media (min-width: 1024px) {
  body {
    background-image: url("images/backgroundLandscape.png"); /* Background for desktop */
    /* All other properties remain the same */
  }
}
