/* Base Styling */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    margin: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 600px;
}

/* Form Section */
.form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.input {
    border-radius: 25px;
    padding: 10px;
    flex-grow: 1;
    min-width: 200px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    /* Include padding in width */
}

/* Button Styling */
.add {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 10px;
    width: auto;
}

button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: scale(0.98);
}

input:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Task List Container */
.tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    width: 100%;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Task Item */
.task {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid grey;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    word-break: break-word;
    text-align: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.task:hover {
    transform: scale(1.01);
}

.task-title {
    flex: 1 1 100%;
    margin-bottom: 10px;
}

/* Button Container */
.Buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

/* Completed Task */
.done {
    opacity: 0.7;
    text-decoration: line-through;
    color: #6c757d;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .form {
        flex-direction: column;
        align-items: stretch;
    }

    .input,
    .add {
        width: 100%;
    }

    .task {
        text-align: center;
    }

    .Buttons {
        justify-content: center;
    }
}
