:root {
  --background: #101114;
  --primary-color: #1c1d20;
  --secondary-color: #4a4d57;
  --accent-color: #00ffc4;
  --text-color: #f9f9f9;
}

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

body {
  background: var(--background);
  color: var(--text-color);
  font-family: Segoe UI;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

h1 {
  margin: 60px 0 20px;
  color: var(--accent-color);
}

.wrapper {
  width: 700px;
  max-width: 95%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(28, 29, 32, 0.6);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

form {
  position: relative;
}

#todo-input {
  width: 100%;
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #151619;
  color: white;
  transition: 0.25s;
}

#todo-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 255, 196, 0.15);
}

#todo-input::placeholder {
  font-weight: 600;
}

#add-button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: calc(100% - 12px);
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #00ffc4, #00c2ff);
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}

#add-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 255, 196, 0.3);
}

/* FILTERS */
.filters {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #151619;
  color: #aaa;
  cursor: pointer;
  font-weight: 600;
  transition: all .25s ease;
}

.filter-btn:hover {
  color: white;
  border-color: #00ffc4;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #00ffc4, #00c2ff);
  color: black;
  border: none;
}

/* TODO */
.todo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #151619;
  border-radius: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.25s;
}

.todo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.todo-text {
  flex: 1;
  padding: 15px 0;
}

.edit-input {
  flex: 1;
  background: transparent;
  border: none;
  /* border-bottom:1px solid var(--accent-color); */
  color: white;
  outline: none;
}

.material-symbols-outlined {
  color: var(--secondary-color);
  font-size: 20px;
}

.edit-button,
.delete-button,
.save-button,
.cancel-button {
  background: none;
  border: none;
  cursor: pointer;
}

.delete-button:hover span {
  color: #ff0033;
}
.cancel-button:hover span {
  color: #ff0033;
}
.edit-button:hover span,
.save-button:hover span {
  color: var(--accent-color);
}

.custom-checkbox {
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
   transition:.2s;
}

.custom-checkbox span {
  opacity: 0;
}

input[type="checkbox"]:checked ~ .custom-checkbox {
  background: var(--accent-color);
}
input[type="checkbox"]:checked ~ .custom-checkbox span {
  opacity: 1;
}
input[type="checkbox"]:checked ~ .todo-text,
input[type="checkbox"]:checked ~ .edit-input {
  text-decoration: line-through;
  color: var(--secondary-color);
}
input[type="checkbox"] {
  display: none;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.page-btn{
 border:1px solid rgba(255,255,255,0.08);
 padding:6px 14px;
 cursor:pointer;
 background:#151619;
 color:#aaa;
 border-radius:8px;
 transition:.25s;
}

.page-btn:hover{
 color:white;
 transform:translateY(-1px);
}

.page-btn.active{
 background:linear-gradient(135deg,#00ffc4,#00c2ff);
 color:black;
 border:none;
}

/* PREV + NEXT BUTTON STYLE */
#prev-btn,
#next-btn{
 border:none;
 padding:8px 18px;
 border-radius:10px;
 background:#151619;
 color:#aaa;
 font-weight:600;
 cursor:pointer;
 transition:.25s;
 border:1px solid rgba(255,255,255,0.08);
}

/* HOVER EFFECT */
#prev-btn:hover,
#next-btn:hover{
 color:white;
 transform:translateY(-1px);
 box-shadow:0 6px 18px rgba(0,0,0,0.35);
}

/* ACTIVE CLICK FEEDBACK */
#prev-btn:active,
#next-btn:active{
 transform:scale(.96);
}

/* OPTIONAL DISABLED LOOK (future-proof) */
#prev-btn:disabled,
#next-btn:disabled{
 opacity:.4;
 cursor:not-allowed;
 transform:none;
 box-shadow:none;
}

#page-numbers{
    display: flex;
    gap: 10px;
}

/* TOAST */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1c1d20;
  border-left: 4px solid var(--accent-color);
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.3s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================= */
/* 📱 MOBILE (max 600px) */
/* ============================= */
@media (max-width: 600px) {

  .todo {
    flex-direction: row; /* keep row */
    align-items: center;
    justify-content: space-between;
    padding: 12px;
  }

  .todo-text {
    flex: 1;
    font-size: 14px;
  }

  /* ICON GROUP */
  .todo-actions {
    display: flex;
    gap: 8px;
  }

}

/* ============================= */
/* 📲 TABLET (601px - 900px) */
/* ============================= */
@media (max-width: 900px) {

  .wrapper {
    width: 90%;
  }

  h1 {
    font-size: 28px;
  }

}


/* ============================= */
/* 💻 LARGE SCREENS (1200px+) */
/* ============================= */
@media (min-width: 1200px) {

  .wrapper {
    width: 800px;
  }

}
