@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Tajawal", sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(150deg, rgba(214, 220, 203, 0.86) 17%, rgba(100, 105, 130, 0.81) 48%, rgba(214, 220, 203, 0.9) 82%);
    line-height: 1.6;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
}

.to-do-app {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: white;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.541);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.375);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

h1 {
    font-size: 2rem;
    text-align: center;
}

.stat-container {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.details {
    width: 100%;
}

.details h3 {
    font-size: 1.1rem;
    color: white;
}

.progress-bar {
    width: 100%;
    height: 7px;
    background: #D6DCCB;
    border-radius: 20px;
    position: relative;
    margin-top: 15px;
}

.progress {
    width: 0%;
    height: 100%;
    background: #646982;
    border-radius: 20px;
    transition: width 0.3s ease;
}

.numbers {
    width: 80px;
    height: 80px;
    background: #646982;
    border: 4px solid rgba(255, 255, 255, 0.499);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
}

.input-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.input-area input {
    flex: 1;
    padding: 10px 17px;
    font-size: 1.1rem;
    border: none;
    outline: none;
    border-radius: 22px;
    background: rgba(255, 192, 203, 0.2);
    color: #f1f1f1;
}

.input-area input::placeholder {
    color: #ccc;
}

.input-area button {
    margin-left: 10px;
    padding: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    background: rgba(255, 192, 203, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.input-area button:hover {
    transform: scale(1.1);
    background: #646982;
}

.todus-container {
    width: 100%;
}

#taskList {
    width: 100%;
    list-style: none;
}

#taskList li {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 192, 203, 0.15);
    margin-bottom: 12px;
    padding: 12px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    color: white;
    transition: box-shadow 0.2s ease;
}

#taskList li:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.423);
}

#taskList li input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#taskList li input[type="checkbox"]:checked {
    background: #646982;
    transform: scale(1.1);
    border-color: #ffffffc4;
}

#taskList li input[type="checkbox"]:checked::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 0.7rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#taskList li .task-title {
    flex: 1;
    margin-left: 10px;
    word-break: break-all;
}

#taskList li.completed .task-title {
    text-decoration: line-through;
    color: #ccc;
    opacity: 0.7;
}

.ai-tag {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 10px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.task-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.task-buttons button {
    background: rgba(255, 192, 203, 0.3);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.task-buttons button:hover {
    transform: scale(1.2);
}

.task-buttons .ai-btn:hover {
    background: #646982;
}

.task-buttons .delete-btn:hover {
    background: rgba(255, 0, 0, 0.4);
}

.sub-task-list {
    width: 100%;
    list-style: none;
}

.sub-task-list li {
    background: rgba(0, 0, 0, 0.333) !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    margin-top: 6px !important;
    margin-bottom: 0px !important;
    font-size: 0.95rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    box-shadow: none !important;
}

.sub-task-list li input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    margin-right: 8px;
}

footer {
position: fixed;
    bottom: 20px;
    left: 50%;
  
    display: flex;
    align-items: center;
    gap: 8px;
    color: #646982; 
    cursor: pointer;

}
footer a {
    text-decoration: none;
    color: #646982;
}
footer:hover{
transform:scale(1.03);
    text-decoration: none;
}

@media (max-width: 600px) {
    .to-do-app {
        padding: 1.5rem;
        gap: 20px;
    }
    .numbers {
        width: 65px;
        height: 65px;
        font-size: 1.2rem;
    }
}