/*
    body style
*/
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    Overflow-x: hidden;
}

/*
    header style
*/
header {
    background-color: #333;
    color: #fff;
    padding: 10px;
}

header h1 {
    font-size: 36px;
    margin: 0;
    display: inline-block;
    user-select: none;
}

header h1:hover {
    cursor: pointer;
}

/*
    footer style
*/
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

footer p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    width: 100%;
}

/*
    main style
*/

main {
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 50%;
}

.form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    width: fit-content;
}

.inp {
    display: flex;
    flex-direction: row;
}

.input {
    flex: 1;
    font-size: 18px;
    padding: 10px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 5px #ccc;
}

.add {
    font-size: 18px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.add:hover {
    background-color: #222;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 15px;
    display: none; /* Hide the error message by default */
}

/* Style tasks div */
.tasks {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    width: fit-content;
    min-width: 53%;
}

/* Style the task elements */
.task {
    display: flex;
    align-items: center;
    background-color: #e1e1e1;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Style the task name */
.task p {
    flex: 1;
    margin: 0;
}

/* Style the "Delete" button */
.delete-task {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    border: none;
    background-color: #dc3545;
    color: #fff;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-left: 0.5rem;
}