/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f7f7;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    background-color: white; /* White background */
    color: #333; /* Dark text */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    text-align: center;
    border: 2px solid #4CAF50; /* Green border */
}

/* Title */
h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Form Elements */
input[type="text"], input[type="date"], select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    transition: border 0.3s ease;
}

input[type="text"]:focus, input[type="date"]:focus, select:focus {
    border-color: #4CAF50; /* Green border when focused */
    outline: none;
}

/* Buttons */
button {
    padding: 12px 25px;
    background-color: #4CAF50; /* Green background */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    background-color: #45a049;
    color: white;
}

button:active {
    transform: scale(0.98);
}

/* Longer Add Task Button */
#addTaskBtn {
    width: 100%; /* Make it stretch to full width */
}

/* Task Section */
.tasks-section, .completed-tasks-section, .latest-task-section {
    display: none;
    margin-top: 30px;
}

.task-card {
    background-color: #fff;
    padding: 20px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.completed-task {
    background-color: #e1f7d5;
    text-decoration: line-through;
    opacity: 0.7;
}

.task-card h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.3rem;
}

.task-card p {
    font-size: 1.1rem;
    color: #555;
}

.task-card button {
    background-color: #2196F3;
    margin-top: 10px;
}

.task-card button:hover {
    background-color: #1976D2;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 20px;
}

.action-buttons button {
    padding: 10px 20px;
    background-color: #007BFF;
    width: 48%; /* Set width for two columns */
    margin-bottom: 10px; /* Spacing between rows */
}

.action-buttons button:hover {
    background-color: #0056b3;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 80%;
    text-align: center;
}

.modal-content p {
    font-size: 1.1em;
    color: #333;
}

.modal-button {
    margin-top: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-button:hover {
    background-color: #45a049;
}

/* Responsive Styles */
@media screen and (max-width: 600px) {
    h1 {
        font-size: 2em;
    }

    .task-card {
        padding: 15px;
    }

    .task-card h3 {
        font-size: 1.2rem;
    }

    .task-card p {
        font-size: 1rem;
    }

    .action-buttons button {
        width: 100%; /* Full width on small screens */
    }
}
