/* original code: https://doctorcodetutorial.blogspot.com/2020/03/create-coronavirus-tracker-in.html */

* {
  margin: 0;
  padding: 0;
  outline: 0;
  font-family: sans-serif;
}

body {
  background-color: #1e88e5;
  counter-reset: raw;
}

.wrapper {
  width: 80%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.statistic {
  width: 100%;
}

.total_case_box {
  background-color: #fafafa;
  box-shadow: 2px 2px 8px rgba(30,30,30,.2);
  margin: 10px 15px;
  padding: 15px 0;
  text-align: center;
  text-transform: uppercase;
}

.total_case_box p {
  font-size: 3rem;
}

.wrapper .box_wrapper {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
}

.box_wrapper .box {
  background-color: #fafafa;
  box-shadow: 2px 2px 8px rgba(30,30,30,.2);
  margin: 10px 15px;
  width:25%;
  text-align: center;
  padding: 15px 0;
  border-radius: 8px;
  text-transform: uppercase;
}

.box_wrapper .box p {
  font-size: 2.5rem;
}

/*Styiling the table*/
table {
  width: 100%;
  padding: 15px 10px;
  margin: 10px 0;
  text-align: center;
  border-spacing: 0;
}

tr:first-child {
  background-color: #37474f;
  color: #fafafa;
  text-transform: uppercase;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

th {
  padding: 15px 0;
  border: none;
  border-spacing: 0;
  cursor: default;
}

th:not(:first-child) {
  cursor: n-resize;
}

tr:nth-child(even) {
  background-color: #fafafa;
}

tr:nth-child(odd) {
  background-color: #424242;
  color: #fafafa;
}

tr td {
  padding: 15px 0;
}

tr td:first-of-type {
  position: relative;
}

tr td:first-of-type::before {
  counter-increment: raw;
  content: counter(raw);
  position: absolute;
  left: 4px;
  opacity: .5;
}

@media (max-width: 1024px) {
  h2 {
    font-size: 0.6rem;
  }
  th {
    font-size: 0.6rem;
  }
  td {
    font-size: 0.8rem;
  }
  .total_case_box p {
    font-size: 1.5rem;
  }
  .box_wrapper .box p {
    font-size: 1rem;
  }
  .wrapper{
    width: 100%;
  }
  .total_case_box {
    box-shadow: 2px 2px 8px rgba(30,30,30,.2);
    margin: 0;
    padding: 15px 0;
  }
  .box_wrapper .box {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 7px 0;
  }
  table {
    padding: 0;
    margin: 0;
  }
}