/* Global styles */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 1rem;
    text-align: center;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    box-sizing: border-box;
}

/* Form styling */
#task-form {
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
}
#task-form input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}
#task-form button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}
#task-form button:hover {
    background: #45a049;
}

/* Task list styling */
#task-list {
    list-style: none;
    padding: 0;
    width: 100%;
}
.task-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
.task-item:hover {
    background: #f1f1f1;
}

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

/* Responsive design */
@media (max-width: 600px) {
    #task-form {
        flex-direction: column;
    }
    #task-form input[type="text"], #task-form button {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }
    #task-form button {
        border-radius: 4px;
    }
}
