body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  background: #2d2d70;
}

header nav ul li {
  flex: 1 1 auto;
  text-align: center;
}

header nav ul li a {
  display: block;
  padding: 10px;
  color: white;
  text-decoration: none;
}

header nav ul li a:hover {
  background: #444;
}

main {
  padding: 20px;
}

footer {
  background: #eee;
  text-align: center;
  padding: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

table th, table td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: left;
}

@media (max-width: 768px) {
  header nav ul {
    flex-direction: column;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  td {
    position: relative;
    padding-left: 50%;
  }

  td::before {
    position: absolute;
    top: 10px;
    left: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
}
