@import url('https://fonts.googleapis.com/css2?family=Poppins: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&family=Sora:wght@100..800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sora', sans-serif;
    /* font-family: cursive; */
}

body {
    background: #f9f9f9;
}

.container {
    width: 35%;
    height: auto;
    background: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    margin: 3rem auto;
    border-radius: 1rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.bx-x {
    position: absolute;
    top: 2.2rem;
    right: 2rem;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

.display-large {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

#editOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.1); /* translucent white */
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1000;
}

#editOverlay.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Modal animation */
.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  width: 35%;
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#editOverlay.show .modal-content {
  transform: scale(1);
  opacity: 1;
}


.btn-container {
    display: flex;
    flex-direction: row;
    column-gap: 1rem;
    justify-content: center;
}

.btn {
    border: none;
    outline: none;
    padding: 1.2rem 3rem;
    background: #000;
    color: #fff;
    font-size: 1rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.btn:hover {
    scale: 1.05;
}

.fa-pen-to-square, .fa-trash {
    border: none;
    outline: none;
    background: none;
    font-size: 1.3rem;
    cursor: pointer;
}

.search-section {
    display: flex;
    flex-direction: row;
    column-gap: 1rem;
    justify-content: center;
}

.title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.edit-input {
    font-size: 1rem;
    padding: 1rem 1rem 1rem 2rem;
    border: 1px solid #e5e5e5;
    border-radius: 2rem;
    background: #f5f5f5;
}

.task-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 1rem;
    border-radius: 2rem;
}

.search-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    border-radius: 5rem;
    padding-left: 1rem;
    border: 1px solid #e5e5e5;
    margin: 0 auto;
}

.task-container {
    width: 35%;
    height: auto;
    background: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    margin: 3rem auto;
    border-radius: 1rem;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.list-container {
    display: flex;
    flex-direction: row;
    column-gap: 1rem;
    justify-content: space-between;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    padding: 1rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.task-text {
    transition: all 0.3s ease;
}

.completed {
    text-decoration: line-through;
    color: #999;
    opacity: 0.6;
}

.filter-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 2rem;
  background: #f0f0f0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active {
  background: #000;
  color: #fff;
}

.action-btns {
  width: 25%;
  display: flex;
  justify-content: space-between;
  margin: 2rem auto;
  gap: 1rem;
}

.btn.danger {
  background: #e74c3c;
}

.btn.secondary {
  background: #95a5a6;
}

.btn.danger:hover,
.btn.secondary:hover {
  opacity: 0.9;
}

.task-fade-out {
    opacity: 0;
    transform: translate(50px, -10px);
    transition: all 0.3s ease;
}

button:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
}



@media (max-width: 1200px) {
    .container, .task-container {
        width: 40%;
    }

    .action-btns {
        width: 30%;
    }
}

@media (max-width: 992px) {
    .container, .task-container {
        width: 50%;
    }

    .modal-content {
        width: 45%;
    }

    .action-btns {
        width: 35%;
    }
}

@media (max-width: 768px) {
    .container, .task-container {
        width: 60%;
    }

    .modal-content {
        width: 55%;
    }

    .action-btns {
        width: 45%;
    }
}

@media (max-width: 576px) {
    .container, .task-container {
        width: 80%;
    }

    .modal-content {
        width: 75%;
    }

    .action-btns {
        width: 66%;
    }
}