* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: "Lato", sans-serif;
  letter-spacing: 0.02em;
  font-size: 1.6rem;
  color: #333;
}

.heading {
  margin: 3rem 0 2rem;
}

select {
  padding: 1rem;
  width: 20rem;
  font-size: 1.6rem;
}

.header {
  background: #fee800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10rem;
  width: 100%;
}

.header__text p {
  font-weight: 300;
  font-size: 5.2rem;
  line-height: 6.2rem;
}

.header__text h2 {
  font-weight: bold;
  font-size: 6.4rem;
  line-height: 7.7rem;
}

.header__img {
  width: 20rem;
  height: 20rem;
}

@media (max-width: 1200px) {
  .header {
    padding: 0 1rem;
  }
}

@media (max-width: 550px) {
  .header__text p {
    font-weight: 300;
    font-size: 3rem;
    line-height: 4.2rem;
  }

  .header__text h2 {
    font-weight: bold;
    font-size: 4rem;
    line-height: 5.4rem;
  }

  .header__img {
    width: 10rem;
    height: 10rem;
  }
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  overflow: auto;
}

table {
  margin: 5rem auto;
  border-collapse: collapse;
  border-spacing: 0;
  color: #fff;
  background: url(./images/corona-bg.jpg) no-repeat center center;
  background-size: cover;
  position: relative;
  border: 0.2rem solid rgba(255, 204, 0, 0.8);
}

table th,
table td {
  text-align: center;
}

table thead {
  font-size: 1.6rem;
  line-height: 1.7rem;
  background: #ce2828;
  text-transform: uppercase;
}

table thead th {
  color: rgba(0, 0, 0, 0.7);
  padding: 1.4rem 1rem;
  font-weight: bold;
  vertical-align: bottom;
  color: #fff;
  border-left: 1px solid rgba(255, 204, 0, 0.8);
}

table thead th:nth-child(1) {
  text-align: left;
  padding-left: 2rem;
  border-left: none;
}

table tbody {
  font-size: 1.6rem;
  line-height: 1.7rem;
}

table tbody td:first-child {
  text-align: left;
  padding-left: 2rem;
  font-weight: 700;
  background: rgba(251, 113, 103, 0.3);
  transition: background 0.3s;
}

table tbody tr {
  border-bottom: 1px solid rgba(255, 204, 0, 0.8);
  transition: background 0.3s;
}
table tbody tr:last-child {
  border-bottom: 1px solid rgba(255, 204, 0, 0.8);
}

table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.2);
}

table tbody tr:hover {
  background: rgba(251, 113, 103, 0.6);
}

table tbody tr:hover td:first-child {
  background: rgba(251, 113, 103, 0);
}

table tbody td {
  padding: 1.2rem;
}

@media (max-width: 550px) {
  table,
  tr,
  td {
    display: grid;
  }
  th,
  thead {
    display: none;
  }
  td {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 204, 0, 0.8);
  }
  table tbody td:first-child {
    padding-left: 1rem;
    background: none;
  }
  td:before {
    font-weight: 700;
  }
  td:nth-child(1):before {
    content: "Country";
  }
  td:nth-child(2):before {
    content: "Capital City";
  }
  td:nth-child(3):before {
    content: "Confirmed";
  }
  td:nth-child(4):before {
    content: "Recovered";
  }
  td:nth-child(5):before {
    content: "Deaths";
  }
  td:nth-child(6):before {
    content: "Population";
  }
  td:nth-child(7):before {
    content: "Life Expectancy";
  }
  td:nth-child(8):before {
    content: "Abbreviation";
  }
  td:nth-child(9):before {
    content: "Updated";
  }
  table tbody tr {
    border-bottom: 3px solid rgba(255, 204, 0, 0.8);
  }
}
