/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 10px;
}


form {
  width: 100%;
  max-width: 420px;
}


fieldset {
  border: none;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}


legend {
  font-size: 22px;
  font-weight: bold;
  color: #5a4fcf;
  padding: 0 10px;
  height: 0.5em;
}

.userinput {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  outline: none;
  text-align: center;
}

.userinput:focus {
  border-color: #667eea;
}

button[type="submit"] {
  margin-top: 15px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.edit-btn, .delete-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  border-radius: 6px;
  transition: transform 0.2s, background 0.2s;
}


.edit-btn {
  color: #4caf50;
}

.edit-btn:hover {
  background: rgba(76, 175, 80, 0.15);
  transform: scale(1.1);
}
.delete-btn {
  color: #f44336;
}

.delete-btn:hover {
  background: rgba(244, 67, 54, 0.15);
  transform: scale(1.1);
}


button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* Output Area */
.output {
  margin-top: 25px;
  width: 100%;
  max-width: 420px;
}

.childdiv {
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
}

.childdiv p {
  flex: 1;
  font-size: 16px;
  color: #333;
}
.childdiv button:first-of-type {
  background: #4caf50;
  border: none;
  color: white;
  padding: 7px 12px;
  border-radius: 6px;
  margin-right: 6px;
  cursor: pointer;
}

.childdiv button:first-of-type:hover {
  background: #43a047;
}


@media (max-width: 320px) {
  body {
    padding: 10px;
  }

  form,
  .output {
    width: 100%;
    max-width: 100%;
  }

  fieldset {
    margin: 0 auto;
  }
}


.childdiv button:last-of-type {
  background: #f44336;
  border: none;
  color: white;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.childdiv button:last-of-type:hover {
  background: #e53935;
}
