:root {
  --primaryColor: #fd746c;
  --secondaryColor: #7cd987;
  --black: #333;
  --btnColor: rgba(0, 0, 0, 0.8);
}

html {
  font-size: 10px;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  height: 100vh;
  font-family: "Raleway", sans-serif;
  background: #fd746c; /* fallback for old browsers */
  color: var(--black);
  background: -webkit-linear-gradient(
    to right,
    #ff9068,
    #fd746c
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to right,
    #ff9068,
    #fd746c
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}

header {
  height: 10rem;
  padding: 3rem;
}

header h1 {
  font-size: 0;
}

header img {
  max-width: 18rem;
}

@media (max-width: 845px) {
  header img {
    width: 100px;
  }
  header {
    padding: 1.25rem;
    height: initial;
  }
}

main {
  height: calc(100vh - 10rem);
}

.app {
  max-width: 75rem;
  background: white;
  height: 65rem;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (max-width: 845px) and (max-height: 834px) {
  .app {
    border-radius: 0;
    width: 90%;
    margin-top: 4rem;
    height: 350px;
  }
  .app.knowCurrentGrade {
    height: 600px;
  }
}

@media (max-width: 845px) and (max-height: 830px) {
  .app {
    border-radius: 0;
    width: 90%;
    margin-top: 4rem;
    height: 350px;
  }
  .app.knowCurrentGrade {
    height: 350px;
  }
}

@media (max-width: 475px) {
  html {
    font-size: 6px;
  }
}

.app h3 {
  font-size: 2.5rem;
  padding: 5rem;
  max-width: 80%;
  margin: 0 auto;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.app h3:hover {
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.app h3:first-of-type {
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.secondScreen {
  text-align: center;
  padding: 4rem 0;
}

.secondScreen .goBack {
  font-size: 4rem;
  position: absolute;
  top: 1rem;
  left: 2rem;
}

.secondScreen a,
.secondScreen a:active,
.secondScreen a:hover,
.secondScreen a:visited {
  color: var(--black);
  text-decoration: none;
}

.secondScreen .goBack:hover {
  cursor: pointer;
}

.secondScreen h1 {
  font-size: 3rem;
  font-weight: bold;
}

.secondScreen .finalPercent {
  color: var(--secondaryColor);
  font-size: 7rem;
  font-weight: 600;
  margin: 1rem;
}

.secondScreen label {
  color: var(--black);
  font-weight: bold;
  font-size: 1.5rem;
  display: block;
  margin: 1rem;
}

input[type="number"] {
  padding: 1.25rem 0.5rem;
  width: 9rem;
  font-size: 2.2rem;
  color: var(--black);
  text-align: right;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-right: none;
  border-radius: 4px 0 0 4px;
}

.secondScreen .top-card .input-label-group {
  margin-top: 4rem;
}

.input-group {
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-group .input-after {
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: block;
  align-self: stretch;
  padding: 1rem;
  font-size: 2rem;
  border-radius: 0 4px 4px 0;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.top-card:after {
  content: "";
  display: block;
  color: black;
  width: 75%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin: 4rem auto;
}

.bottom-card {
  display: flex;
  width: 75%;
  margin: 4rem auto;
  justify-content: space-evenly;
}

.top-card .mark-row {
  display: grid;
  grid-template-columns: 2fr 4fr 4fr 2fr;
  margin-bottom: -2rem;
}

.mark-row h4 {
  font-size: 2.2rem;
  align-self: end;
  margin-bottom: 2rem;
}

.addMark {
  background: #616161;
  color: white;
  font-size: 2.2rem;
  padding: 2.2rem;
  width: 90%;
  margin: 0 auto 2rem;
  border-radius: 0.7rem;
  border: none;
}

.addMark:hover,
.addMark:active {
  cursor: pointer;
  background: #444;
}

.secondScreen.dontKnowCurrentGrade {
  height: 68rem;
  overflow-y: scroll;
}
