body {
  background-color: lightblue;
}

.site-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}

#header-image {
  max-width: 50%;
  height: auto;
}

#plot-area {
  height: 50vh;
  background-color: #f9f9f9;
  border: 1px solid black;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#layout-container {
  display: flex;
  width: 100%;
}

#ratings-table {
  width: 20%;
  box-sizing: border-box;
  margin-bottom: 10%;
  align-self: flex-start;
}

#left-panel {
  display: flex;
  flex-direction: column;
  width: 60%;
  margin-left: 10%;
  margin-right: 5%;
}

#input-controls, #advanced-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 1em;
  align-items: center;
  justify-content: flex-start;
}

#input-controls label, #advanced-settings label {
  font-weight: bold;
  font-size: 0.9em;
}

#advanced-settings label {
  display: flex;
  align-items: center;
}

#input-controls input {
  margin-left: 0.5em;
  padding: 0.3em 0.5em;
  font-size: 1em;
  width: 80px;
}

#submit-button {
  padding: 0.5em 1em;
  font-size: 1em;
  font-weight: bold;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#submit-button:hover {
  background-color: #0056b3;
}

#submit-button:active {
  transform: scale(0.97);
}

#advanced-header {
  margin-top: 1em;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
}

#advanced-settings.hidden {
  display: none;
}

#input-error-message {
  color: #c00;
  background-color: #fee;
  border: 1px solid #c00;
  padding: 0.6em;
  border-radius: 6px;
  margin-top: 1em;
}

#input-error-message.hidden {
  display: none;
}


.work-sans-semi-bold {
  font-family: "Work Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.pt-serif-bold {
  font-family: "PT Serif", serif;
  font-weight: 700;
  font-style: normal;
}


.row {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1fr 1.5fr 0.5fr 1fr;
  border-left: 2px solid black;
  border-right: 2px solid black;
  border-bottom: 2px solid black;
}

.item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2vw;
  line-height: 1.2vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: whitesmoke;
}

img {
  width: 90%;
}

.ranking {
  background-color: white;
  border-right: 2px solid black;
  color: black;
}

.arrow.up {
  color: green;
}

.arrow.down {
  color: red;
}

input:focus {
  outline: none;
  box-shadow: 0 0 0.25em #007bff;
  border-color: #007bff;
  border-style: solid;
}

#submit-button.ready {
  background-color: #28a745;
  box-shadow: 0 0 0.3em rgba(40, 167, 69, 0.5);
}


#upcoming-games, #recent-games {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
}

h2 {
  margin-bottom: 0.5em;
  font-size: 2.063em;
  color: #333;
}

.game-box {
  border-radius: 4px;
}

.game-row {
  display: grid;
  grid-template-columns: 1fr 0.75fr 1.5fr 1.25fr;
}

.game-row2 {
  display: grid;
  grid-template-columns: 1fr 0.6fr 1fr 0.25fr 0.75fr 0.9fr;
}

.game-row.away, .game-row2.away {
  border: 2px solid black;
  border-bottom: 0px solid black;
}

.game-row.home, .game-row2.home {
  border: 2px solid black;
}


.item.upcoming, .item.recent {
  font-size: 1.6vw;
  line-height: 1.6vw;
  border: 0;
}

.item.upcoming.win-probability, .item.recent.score {
  background-color: white;
  color: black;
  border-left: 2px solid black;
}

.item.recent.score.down {
  color: #bbb;
}


.win-bar-bg {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: rgba(0, 128, 0, 0.2);
  z-index: 0;
  width: 0%;
  transition: width 0.6s ease-out;
}

.win-bar-text {
  position: relative;
  z-index: 1;
  font-weight: bold;
  color: black;
}

.game-header {
  background-color: #333;
  color: white;
  font-size: 0.989vw;
  font-weight: bold;
  text-align: center;
  padding: 0.3em 0.5em;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2);
}


.ratings-header {
  display: grid;
  grid-template-columns: 0.75fr 2fr 1.5fr 0.5fr 1fr;
  background-color: #333;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 0.3em 0;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.2);
  border-bottom: 2px solid black;
}

.header-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75vw;
  line-height: 1.2vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: whitesmoke;
}


#team-toggle-container {
  position: relative;
  margin-top: 1em;
  display: inline-block;
}

#toggle-button {
  padding: 0.5em 1em;
  background-color: #004C54;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#team-toggles {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.5em;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 10;
  max-width: 250px;
}

#team-toggles.hidden {
  display: none;
}

#team-toggles label {
  font-size: 0.9em;
  display: flex;
  align-items: center;
  color: whitesmoke;
}


#select-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5em;
}

#select-controls button {
  font-size: 0.8em;
  padding: 0.25em 0.5em;
  background-color: #eee;
  border: 1px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
}

#select-controls button:hover {
  background-color: #ddd;
}

#team-toggles strong {
  margin-bottom: 0.3em;
  color: #004C54;
  display: flex;
  align-items: center;
}

.division-group {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5em;
}

.division-group strong {
  margin-bottom: 0.2em;
  font-size: 0.95em;
  color: #004C54;
}

.division-group strong:hover {
  background-color: yellow;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.1em 0.3em;
  transition: background-color 0.2s ease;
}

#division-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5em 1em;
  max-height: 300px;
  overflow-y: auto;
}

img.mini {
  width: 20%;
  margin-right: 5%;
}

.control-button {
  padding: 0.5em 1em;
  background-color: #004C54;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.control-button:hover {
  background-color: #006670;
}


.caption-text {
  font-size: 0.85em;
  color: #444;
  text-align: left;
  font-style: italic;
}


#recent-header-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}

#recent-header-container h2 {
  display: inline-block;
  width: auto;
  margin: 0;
}


.rating-points.recent.pulse {
  animation: pulseScale 1s ease-out;
  filter: brightness(1.1);
}

@keyframes pulseScale {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}


#site-footer {
  font-size: 0.9em;
  color: #333;
  border-top: 4px solid #333;
  border-radius: 4px;
  margin-top: 2em;
  text-align: center;
}

.footer-content a {
  color: #0066cc;
  font-weight: 500;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin-top: 0.8em;
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links li a {
  color: #333;
}


@media screen and (max-width: 768px) {
  h2 {
    font-size: 1.5em;
  }

  #team-toggle-container button {
    margin-bottom: 0.5em;
  }

  #site-footer {
    font-size: 0.7em;
  }
}

@media screen and (max-width: 450px) {
  .division-group strong {
    font-size: 0.9em;
  }
}


/*Privacy Policy and Terms of Service*/
a.support {
  color: #0066cc;
  font-weight: 500;
}

.return-home {
  margin-top: 2em;
  text-align: center;
  font-size: 0.9em;
}