@import url("https://fonts.googleapis.com/css2?family=Iceland&family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
:root {
  --bg: rgb(0, 0, 0);
  --primary: rgb(86, 130, 177);
  --secondary: rgb(115, 158, 201);
  --accent: rgb(255, 232, 219);
  --text: #ffffff;
  --text-muted: #aaaaaa;
  --container-bg: rgb(20, 20, 20);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--bg);
  font-family: "Iceland", sans-serif;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.container {
  width: 550px;
  height: 700px;
  background: var(--container-bg);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1rem;
  overflow-y: auto;
  align-items: center;
  border-radius: 1rem;
  border: 1px solid var(--primary);
  /* position: relative; */
}

h1 {
  color: var(--text);
  font-weight: 800;
  font-size: 3.5rem;
}
.text {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.todo-input {
  width: 380px;
  height: 50px;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 50px;
  outline: none;
  caret-color: var(--secondary);
  padding-left: 20px;
  color: var(--text);
  font-size: 1.6rem;
  font-family: inherit;
}
.todo-input::placeholder {
  color: var(--text-muted);
  font-size: 1.4rem;
}
.add-todo {
  width: 90px;

  height: 50px;
  border-radius: 50px;

  border: 1px solid var(--primary);
  background: transparent;
  color: var(--text);
  font-weight: 900;
  font-size: 1.5rem;
  transition: cubic-bezier(0.19, 1, 0.22, 1) 0.5s;
  outline: none;
  font-family: inherit;
}
.add-todo:hover {
  background: var(--secondary);
  color: var(--bg);
}
.todo-list {
  width: 420px;
  max-height: 500px;
  border: 1px solid var(--primary);
  margin-top: 50px;
  display: flex;
  color: var(--text);
  flex-direction: column;
  gap: 30px;
  /* align-items: start; */
  padding: 1rem;
  font-size: 1.5rem;
  border-radius: 20px;
  overflow-y: auto;
}
.todo-list::-webkit-scrollbar {
  display: none;
}
.todo-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.todo-list li span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
}
.todo-checkbox {
  appearance: none;

  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s;
}

.todo-checkbox:checked::after {
  content: "✓";
  color: rgb(1, 251, 1);
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.todo-checkbox:hover {
  border-color: rgb(4, 247, 73);
}
.edit-btn {
  width: 25px;
  height: 25px;
  color: var(--secondary);
  border-radius: 50%;
  outline: none;
  background: transparent;
  border: 1px solid var(--primary);
}
.edit-btn:hover {
  background: var(--secondary);
  color: rgb(249, 251, 249);
}
.delete-btn {
  width: 25px;
  height: 25px;
  color: var(--secondary);
  border-radius: 50%;
  outline: none;
  background: transparent;
  border: 1px solid var(--primary);
}
.delete-btn:hover {
  color: red;
  border: 1px solid red;
}
.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.empty-state p {
  color: var(--text-muted);
  margin-top: 15px;
}
.plus-btn {
  width: 25px;
  height: 25px;
  background: transparent;
  outline: none;
  border: none;

  color: var(--secondary);
  cursor: pointer;
  font-size: 3rem;
  transition: 0.3s;
}
.plus-btn:hover {
  font-size: 3.2rem;
}
.text-wrapper {
  position: relative;
}
.reset {
  position: absolute;
  bottom: -40px;
  right: 0;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 5px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
}
.reset:hover {
  color: red;
  border: 1px solid red;
}

@media (max-width: 600px) {
  .container {
    width: 95vw;
    height: 95vh;
    padding: 1rem;
  }
  .text{
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .todo-input {
    width: 90%;
    font-size: 1.2rem;
  }
  .add-todo {
    width: 70%;
  }

  .todo-list {
    width: 100%;
  }
  .plus-btn{
    margin: 20px;
  }

  h1 {
    font-size: 2.5rem;
  }
}
