@import url("https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@100..900&display=swap");

:root {
  --bg: #16213e;
  --white: #f1f3fb;
  --button: #1045a8;
  --red: #cb2d2e;
  --blue: #1463b8;
  --green: #30b05a;
  --yellow: #c69027;
  --gray: #666666;
  --font-family: "Kumbh Sans", sans-serif;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

body {
  font-family: var(--font-family);
  font-weight: 300;
  height: 100vh;
  margin: 0;
  background-color: var(--bg);
  color: var(--white);
  word-spacing: 0.5rem;
}

button,
a,
input,
select,
option {
  font-family: var(--font-family);
  font-weight: 300;
}

input,
select {
  background: none;
  border: 1px solid var(--white);
  color: var(--white);
}

option {
  background-color: var(--bg);
}

input[type="search"] {
  text-transform: uppercase;
}

button,
a {
  color: var(--white);
  background-color: var(--button);
  border: none;
}

button:active,
a:active {
  transform: scale(0.95);
}

input:focus {
  outline: none;
}

main {
  height: 100%;
  display: grid;
  grid-template-rows: 50% 50%;
}

.top-half {
  display: grid;
  height: 100%;
  grid-template-columns: 17.5% 20% 25% 20% 17.5%;
}

.bottom-half {
  display: grid;
  grid-template-columns: 50% 50%;
}

.top-half > div {
  height: 100%;
}

.left-buttons,
.right-buttons {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.left-score,
.right-score,
.time-period {
  display: grid;
  grid-template-columns: 1fr;
}

.time-content {
  display: grid;
  grid-template-columns: 50% 50%;
}

.period-buttons,
.scorebox-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.time-container,
.period-container,
.scorebox {
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.left-team,
.right-team {
  text-align: center;
  border-radius: 2rem 2rem 0 0;
  padding-top: 1rem;
}

.left-team table,
.right-team table {
  width: 100%;
}

.commercial-break {
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 1rem;
  margin-right: 1rem;
}

.commercial-break table {
  width: 100%;
}

.commercial-break table tr td {
  text-align: center;
}

.scorebox {
  font-size: 7rem;
}

.time-content {
  font-size: 5rem;
}

.time-header {
  font-size: 2.5rem;
}

.time-content input {
  font-size: 2rem;
  padding: 1rem;
  width: 75%;
  border-radius: 1.5rem;
}

.time-content div {
  display: flex;
  margin: auto;
  justify-content: center;
}

#period-name {
  font-size: 1.75rem;
}

#period-no {
  font-size: 3.25rem;
}

.left-buttons button,
.right-buttons button {
  width: 65%;
  height: 4.5rem;
  font-size: 1.3rem;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1.1rem;
}

.scorebox-buttons button,
.period-buttons button {
  font-size: 1.25rem;
  width: 4rem;
  border-radius: 1rem;
}

.delete-container {
  margin: auto;
}

.delete-container button {
  width: 12rem;
  font-size: 1.3rem;
  height: 4.5rem;
  border-radius: 1.1rem;
}

.commercial-break {
  font-size: 1.1rem;
}

.commercial-break button {
  width: 2.75rem;
  line-height: 1.75rem;
}

.commercial-break input {
  font-size: 1.25rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  width: 6rem;
  text-align: center;
  border-radius: 0.75rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.left-team {
  background-color: var(--red);
}

.right-team {
  background-color: var(--blue);
}

.team-name {
  font-size: 1.9rem;
  font-weight: 600;
  padding-bottom: 2rem;
}

.number-inputs {
  display: flex;
  justify-content: space-evenly;
}

.number-inputs input {
  font-size: 2.25rem;
  width: 6rem;
  line-height: 3rem;
  border-radius: 2rem;
  border-width: 2px;
  text-align: center;
}

.name-table table {
  width: 75%;
  margin: 2rem auto;
  font-size: 1.5rem;
  font-weight: 500;
}

.penalty-container input {
  font-size: 2rem;
  width: 15rem;
  line-height: 3rem;
  border-radius: 2rem;
  border-width: 2px;
  text-align: center;
}

.penalty-container tr:first-child td:first-child {
  text-align: right;
}

.penalty-container button {
  font-size: 3.5rem;
  background: none;
}

.penalty-container tr:nth-child(2) {
  display: none;
}

.button-success {
  background-color: var(--green);
}

.button-fail {
  background-color: var(--red);
}

.team-goals table {
  width: 100%;
}

.team-goals h4 {
  text-align: center;
}

@media screen and (max-width: 1440px) {
  .time-content {
    font-size: 4rem;
  }
  .time-content input {
    padding: 0.8rem;
    width: 60%;
  }
}

@media screen and (max-width: 1024px) {
  .left-buttons button,
  .right-buttons button {
    font-size: 1rem;
    width: 80%;
  }

  .scorebox {
    font-size: 5rem;
  }
  #period-no {
    font-size: 2.75rem;
  }
  #period-name {
    font-size: 1.55rem;
  }
  .time-header {
    font-size: 2rem;
  }
  .time-content {
    font-size: 3.3rem;
  }
  .time-content input {
    font-size: 2rem;
    padding: 0.5rem;
    width: 65%;
    border-radius: 1rem;
  }
  .delete-container button {
    width: 9rem;
    height: 3.5rem;
  }
  .penalty-container input {
    font-size: 1.5rem;
    width: 10rem;
  }
}
