/* General Page Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #e1e6ff;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
}

/* Header */
.top {
    background-color: #af7deb;
    color: #ffffff;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 380px;
    margin-bottom: 10px;
    position: relative;
    text-align: center;
    height: 40px;
    border-radius: 8px 8px 0 0;
}

.top i {
    position: absolute;
    left: 10px;
    font-size: 18px;
    cursor: pointer;
}

/* Main Container */
.container {
    width: 380px;
    background: #ffffff;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: 50px;
    position: relative;
}

/* Task Form */
.task-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
}

.task-form.hidden {
    display: none;
}

.task-form .form-group {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.task-form input {
    width: 95%;
    padding: 8px;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.save-btn {
    width: 100%;
    background-color: #af7deb;
    color: #ffffff;
    border: none;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.save-btn:hover {
    background-color: #8254d4;
}

#closeTaskForm {
    width: 100%;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

/* Task List */
.task-list-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    margin: 15px 0;
}

#taskList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#taskList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

/* Task Info */
.task-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-info input[type="checkbox"] {
    margin-right: 5px;
}

/* Completed Task */
.completed {
    text-decoration: line-through;
    opacity: 0.5;
}

/* Task Actions */
.task-actions {
    display: flex;
    gap: 10px;
}

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

/* Filter & Sort Controls */
.filter-sort-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.filter-sort-container select {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
}

/* Add Task Button */
#addTaskBtn {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: 40%;
    background-color: #af7deb;
    color: #ffffff;
    border: none;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

#addTaskBtn:hover {
    background-color: #8254d4;
}

/* Responsive Design */
@media screen and (max-width: 400px) {
    .container {
        width: 100%;
        padding: 15px;
    }

    .top {
        width: 100%;
        border-radius: 0;
    }
    
    #addTaskBtn {
        width: 60%;
    }
}
/* Style the browser's default confirm dialog */
/* Note: Native confirm dialogs can't be styled, but this affects text */
@media screen and (min-width: 768px) {
    dialog {
        padding: 20px;
        border-radius: 8px;
        border: 1px solid #af7deb;
    }
}