body {
  font-family: "Gill Sans", sans-serif;
  background-color: #f9f9f9;
}

h1 {
  text-align: center;
  color: #007bff;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: black 1px 1px 0;
  margin: 20px 0;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 20px auto;
  padding: 20px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

table {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

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

th {
  background-color: #007bff;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
}

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

tbody tr:hover {
  background-color: #f1f1f1;
}

.edit-button, .delete-button {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.edit-button {
  background-color: #007bff;
  color: #fff;
}

.edit-button:hover {
  background-color: #0056b3;
}

.delete-button {
  background-color: #ff4c4c;
  color: #fff;
}

.delete-button:hover {
  background-color: #d40000;
}

@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  
  thead tr {
    display: none;
  }
  
  tr {
    margin-bottom: 10px;
  }
  
  td {
    text-align: center; 
    padding-left: 0;
    position: relative;
  }
  
  td::before {
    content: attr(data-label);
    position: absolute;
    top: 50%;    
    left: 10px;
    transform: translateY(-50%);
    width: calc(50% - 20px);
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }
}

@media (max-width: 460px) {
  form {
    width: 100%;
    padding: 10px;
  }

  input[type="text"] {
    font-size: 14px;
  }

  button {
    width: 100%;
    font-size: 14px;
  }

  table {
    box-shadow: none;
    border-radius: 0;
  }

  table {
    margin: 20px auto;
    width: 90%;
  }

  tr {
    display: block;
    margin-bottom: 10px;
  }
  
  td {
    text-align: center;
    padding-left: 0;
    position: relative;
  }
  
  td::before {
    content: attr(data-label);
    position: absolute;
    top: 50%; 
    left: 10px;
    transform: translateY(-50%);
    width: calc(50% - 20px);
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
  }
}