body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 32px 20px;
  background-color: #f4f7f4;
  color: #243022;
}

main {
  max-width: 1320px;
  margin: 0 auto;
  background-color: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: #2f4d22;
}

h2 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2f4d22;
}

h3 {
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #d7e6d2;
  color: #2f4d22;
}

section {
  margin-top: 28px;
}

button,
input {
  font-family: inherit;
}

input {
  min-width: 260px;
  padding: 10px 12px;
  border: 1px solid #9aa694;
  border-radius: 6px;
  font-size: 15px;
}

button {
  padding: 10px 14px;
  cursor: pointer;
  background-color: #3b5f2a;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
}

button:hover:not(:disabled) {
  background-color: #2f4d22;
}

button:disabled {
  cursor: default;
  opacity: 0.68;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.deadline-message {
  max-width: 420px;
  margin: 2px 0 0;
  padding: 10px 12px;
  background-color: #f3f8ef;
  border-left: 4px solid #3b5f2a;
  border-radius: 6px;
  line-height: 1.35;
}

.auth-panel,
.bracket-panel {
  border-top: 1px solid #dfe8db;
  padding-top: 22px;
}

.auth-row,
.action-row,
.section-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading-row {
  align-items: flex-start;
  justify-content: space-between;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bracket-instructions {
  max-width: 760px;
  margin: 6px 0 0;
  padding: 12px 14px;
  background-color: #f7faf4;
  border: 1px solid #d7e1d3;
  border-radius: 8px;
  line-height: 1.45;
  color: #3d4d38;
}

.section-tabs {
  margin: 14px 0 18px;
}

.tab-button {
  background-color: #eef2ec;
  color: #2f4d22;
  border: 1px solid #8b9c84;
}

.tab-button:hover:not(:disabled),
.tab-button.active {
  background-color: #3b5f2a;
  color: white;
}

#bracketMessage,
#pickMessage,
#bracketProgressMessage,
#authMessage,
#signedInStatus,
#databaseMessage {
  margin-top: 12px;
  line-height: 1.45;
}

#databaseMessage {
  color: #4d6048;
}

.bracket-progress-bar {
  width: 100%;
  max-width: 620px;
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  background-color: #dfe8db;
  border-radius: 999px;
}

.bracket-progress-fill {
  width: 0;
  height: 100%;
  background-color: #3b5f2a;
  border-radius: inherit;
  transition: width 0.2s ease;
}

#predictedChampionMessage {
  margin-top: 12px;
  padding: 12px;
  background-color: #f3f8ef;
  border-left: 4px solid #3b5f2a;
  border-radius: 6px;
  font-weight: bold;
  color: #2f4d22;
}

.bracket-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 20px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 12px;
}

.bracket-round {
  min-width: 235px;
  display: flex;
  flex-direction: column;
}

.bracket-matches {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
}

.match {
  max-width: none;
  margin: 0;
  padding: 12px;
  background-color: #fafcf9;
  border: 1px solid #d7e1d3;
  border-radius: 8px;
}

.match-heading {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: bold;
  color: #4d6048;
}

.player {
  display: block;
  width: 100%;
  margin: 7px 0;
  padding: 11px 12px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  background-color: white;
  color: #243022;
  border: 1px solid #8b9c84;
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.player:hover:not(:disabled) {
  background-color: #e4f0dd;
  border-color: #3b5f2a;
}

.player.selected {
  background-color: #b9ddb0;
  border-color: #3b5f2a;
  font-weight: bold;
}

.player.placeholder {
  color: #687064;
  font-style: italic;
  cursor: default;
  background-color: #f1f3f0;
  border-style: dashed;
}

.player:disabled:not(.placeholder) {
  cursor: default;
  opacity: 0.75;
}

.final-match {
  border: 2px solid #3b5f2a;
  background-color: #f3f8ef;
}

.final-match .match-heading {
  color: #2f4d22;
  font-size: 16px;
}

.player.champion-pick {
  background-color: #9dca89;
  border: 2px solid #2f4d22;
  font-size: 16px;
}

#resetBracketButton,
#signOutButton {
  background-color: #eef2ec;
  color: #2f4d22;
  border: 1px solid #8b9c84;
}

#resetBracketButton:hover:not(:disabled),
#signOutButton:hover:not(:disabled) {
  background-color: #dfe8db;
}

#submitBracketButton {
  background-color: #2f4d22;
  font-weight: bold;
}

#submitBracketButton:hover:not(:disabled) {
  background-color: #203817;
}

#playersList {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#playersList p {
  margin: 0;
  padding: 10px 12px;
  background-color: #fafcf9;
  border: 1px solid #d7e1d3;
  border-radius: 6px;
  font-size: 14px;
}
