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

body {
  font-family: "Poppins", sans-serif;
  background-color: rgb(150, 146, 146);
  color: rgb(44, 62, 80);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}


.main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  background-color: rgb(255, 255, 255);
  border-radius: 5px;
  width: 90%;
  max-width: 550px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  word-wrap: break-word;        
  overflow-wrap: break-word;
}

.container:hover {
  transform: translateY(-3px);
}

h1 {
  text-align: center;
  color: white;
  font-size: 2rem;
  margin-bottom: 25px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}


.input-wrapper {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap; 
}

input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border: 1.5px solid rgb(203, 213, 225);
  border-radius: 8px;
  background-color: rgb(248, 250, 252);
  font-size: 1rem;
  color: rgb(44, 62, 80);
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: rgb(59, 130, 246);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.25);
  outline: none;
}


button {
  padding: 12px 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  color: rgb(255, 255, 255);
  flex-shrink: 0;
}

.edit-btn {
  background-color: rgb(59, 130, 246);
}

.edit-btn:hover {
  background-color: rgb(30, 64, 175);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.delete-btn {
  background-color: rgb(239, 68, 68);
}

.delete-btn:hover {
  background-color: rgb(185, 28, 28);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}


hr {
  border: none;
  border-top: 1px solid rgb(209, 213, 219);
  margin: 20px 0;
}

ul {
  list-style: none;
  margin-top: 15px;
}

ul li {
  background-color: rgb(241, 245, 249);
  border-radius: 8px;
  border: 1px solid rgb(226, 232, 240);
  margin-bottom: 12px;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  min-width: 0; 
  word-wrap: break-word;
  overflow-wrap: break-word;
}

ul li:hover {
  background-color: rgb(226, 232, 240);
  transform: translateX(4px);
}

ul li span {
  flex: 1 1 100%; 
  font-size: 1rem;
  color: rgb(44, 62, 80);
  white-space: normal;
  word-break: break-word;
}

ul li > div {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

ul li button {
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

ul li button:first-child {
  background-color: rgb(248, 113, 113);
}

ul li button:first-child:hover {
  background-color: rgb(239, 68, 68);
}

ul li button:last-child {
  background-color: rgb(96, 165, 250);
}

ul li button:last-child:hover {
  background-color: rgb(59, 130, 246);
}




@media (max-width: 900px) {
  h1 {
    font-size: 1.8rem;
  }

  .container {
    width: 95%;
    padding: 25px;
  }

  input[type="text"] {
    font-size: 0.95rem;
  }

  button {
    font-size: 0.9rem;
    padding: 10px 16px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .container {
    width: 100%;
    padding: 20px;
  }

  .input-wrapper {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  input[type="text"] {
    width: 100%;
  }

  button {
    width: 100%;
  }

  ul li {
    flex-direction: column;
    align-items: flex-start;
  }

  ul li > div {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 400px) {
  input[type="text"] {
    font-size: 0.9rem;
  }

  button {
    font-size: 0.85rem;
  }

  ul li span {
    font-size: 0.9rem;
  }
}
