
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

/* === Unified container styling === */
section, header, footer {
    max-width: 800px;
    margin: 10px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
}

/* === Section headings === */
section h2, header h1, footer h2 {
    margin-top: 0;
    font-size: 1.8em;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

/* === Task list === */
#taskList {
    list-style: none;
    padding: 0;
}

#taskList li {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    flex-direction: row;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* === Completed tasks === */
#taskList li.completed span {
    text-decoration: line-through;
    color: gray;
}

/* === Task images === */
#taskList img {
    margin-left: 10px;
    width: 50px;
    height: 50px;
}

/* === Hover effect for task items === */
#taskList li:hover {
    transform: rotateY(3deg) scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#header nav a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 12px; 
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

#header nav a:hover {
    background-color: #4CAF50;
}

/* === Form elements === */
input[type="text"],
input[type="password"],
input[type="file"],
textarea,
button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

/* === Buttons === */
button, input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover, input[type="submit"]:hover {
    background-color: #45a049;
}

/* === Focus and validation === */
form input:focus {
    outline: 2px solid #4CAF50;
    background-color: #f0fff0;
}

form input:required:invalid {
    border-color: red;
}

/* === Space below inputs === */
section > form label + input,
section > form label + textarea {
    margin-bottom: 10px;
}

/* === Links === */
a {
    color: #007BFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Footer and general paragraph alignment === */
#footer, section p {
    text-align: center;
}

/* === Network status banner === */
#networkStatus {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    display: none;
}

/* === Appearance animation === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive design === */
@media (max-width: 768px) {
    section, header, footer {
        margin: 20px 10px;
        padding: 15px;
    }

    h2 {
        font-size: 1.5em;
    }

    input, textarea, button {
        font-size: 1em;
    }

    #taskList li {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }

    #taskList img {
        width: 80px;
        height: 80px;
        margin-top: 8px;
        margin-left: 0;
    }

    button,
    input[type="text"],
    input[type="file"] {
        width: 100%;
        font-size: 1.1em;
        margin-top: 10px;
    }

    #networkStatus {
        font-size: 0.9em;
        padding: 8px;
    }
}
