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

body {
  background: #f0f2f5;
  background-attachment: fixed;
  font-family: "Inter", sans-serif;
  color: #2d3436;
  min-height: 100vh;
}

i {
  pointer-events: none;
}

header {
  height: 15vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}
header h1 {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem;
}
form input,
form button {
  border: 1px solid transparent;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  outline: none;
}
form input[type=text] {
  width: 100%;
  max-width: 300px;
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
form input[type=text]:focus {
  border-color: #0984e3;
}

form .stepper {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
form .stepper:focus-within {
  border-color: #0984e3;
}
form .stepper input[type=number] {
  width: 50px;
  padding: 0.6rem 0.2rem 0.6rem 0.8rem;
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
form .stepper input[type=number]:focus {
  border-color: transparent;
}
form .stepper .controls {
  display: flex;
  flex-direction: column;
  border-left: 1px solid #eee;
}
form .stepper .controls button {
  background: transparent;
  color: #0984e3;
  box-shadow: none;
  border-radius: 0;
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 50%;
  min-height: 20px;
}
form .stepper .controls button:hover {
  background: rgba(9, 132, 227, 0.1);
  transform: none;
}
form .stepper .controls button:active {
  background: rgba(9, 132, 227, 0.2);
}
form .stepper .controls button.plus {
  border-bottom: 1px solid #eee;
}

form input::-webkit-outer-spin-button,
form input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
form input[type=number] {
  -moz-appearance: textfield;
}
form button {
  cursor: pointer;
  background-color: #0984e3;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
form button:hover {
  background-color: #076ad2;
  transform: translateY(-2px);
}
form button:active {
  transform: translateY(0);
}

.sort {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}
.sort button {
  cursor: pointer;
  background-color: #ffffff;
  color: #0984e3;
  border: 2px solid #0984e3;
  padding: 0.5rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.sort button:hover {
  background-color: #0984e3;
  color: #ffffff;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 3rem;
}
section div.todo {
  width: 90%;
  max-width: 600px;
  display: flex;
  align-items: stretch;
  margin: 0.5rem 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
section div.todo:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
section div.todo p {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  font-size: 1.2rem;
}
section div.todo p.todo-text {
  flex: 1;
  border-right: 1px solid #eee;
}
section div.todo p.todo-time {
  width: 100px;
  justify-content: center;
  color: #636e72;
  font-weight: 500;
  border-right: 1px solid #eee;
}
section div.todo button {
  width: 50px;
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
section div.todo button.complete {
  background-color: #00b894;
}
section div.todo button.complete:hover {
  background-color: #009e7f;
}
section div.todo button.remove {
  background-color: #d63031;
}
section div.todo button.remove:hover {
  background-color: #c02b2b;
}

.done {
  opacity: 0.6;
  text-decoration: line-through;
  filter: grayscale(0.5);
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes scaleDown {
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}
