:root {
    --main : #31305a;
    --headcolor: #2eb98a;
    --addtaskback: #292852;
    --white: #fff;
    --delete: #f83546;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--main);
    height: 100%;
    margin: 0;
}

main{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header {
    color: var(--headcolor);
    flex-direction: row;
    align-items: center;
    padding: 10px;
    font-size: 2.4rem;
    font-weight: bold;
}

.todo-app {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    min-width: 300px;
    flex-direction: column;
    position: relative;
}

.task-form {
    position: absolute;
    display: flex;
    flex-direction: column;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-color: var(--white);
    overflow: auto;
    border-radius: 12px;
    padding: 5px 20px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.form-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}


.close-task-btn {
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.close-task-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.close-icon {
    width: 24px;
    height: 24px;
}

.form-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-form-label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.form-control {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: 0.2s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.form-footer {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.confirm-close-btn-dialog {
    border: none;
    border-radius: 10px;
    padding: 0;
}

.dialog-content {
    padding: 20px;
    border-radius: 8px;
    border: 2px var(--delete) dashed;
    text-align: center;
    font-weight: bold;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.dialog-buttons .cancel-btn {
    background-color: #292852;
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 10px;
    transition: all 0.3s ease;
    border: none;
}

.dialog-buttons .discard-btn {
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 10px;
    transition: all 0.3s ease;
    border: none;

}

.dialog-buttons .discard-btn:hover{
    transform: scale(1.05);
}

.dialog-buttons .cancel-btn:hover{
    transform: scale(1.05);
}


.main-btn {
    cursor: pointer;
    background-color: var(--addtaskback);
    color: var(--white);
    padding: 10px 10px;
    min-width: 90px;
    color: var(--white);
    border-radius: 8px;
    margin: 15px 0;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.main-btn:hover {
    background-color: #3b82f6;
    transform: scale(0.98);
}

.tasks .task-btn {
   cursor: pointer;
   width: 100px;
   margin: 5px;
   padding: 5px 5px;
   border-radius: 8px;
   border: none;
   
}

.del {
    background-color: var(--delete);
    color: var(--white);
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.del:hover {
    background-color: #73040d;
    transform: scale(1.05);
}

.edi {
    background-color: #05a1a1;
    color: var(--white);
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.edi:hover {
    transform: scale(1.05);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}
.stat-card {
    background-color: #a0e3e9;
    padding: 10px 25px;
    border-radius: 10px;
    min-width: 120px;
    text-align: center;

    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.stat-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.stat-card span {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.stat-card:first-child span {
    color: green;
}


.stat-card:last-child span {
    color: red;
}

.display-tasks {
    height: 100%;
    overflow-y: auto;
}

.tasks {
    padding: 15px 25px;
    margin: 10px 0;
    background-color: #71a3c1;
    border-radius: 5px;
    }

.tasks.completed p {
    text-decoration: line-through;
    opacity: 0.6;
}

.hidden {
    display: none;
}