body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: grid;
    grid-template-areas:
        "header"
        "flash"
        "lists"
        "tasks";
    grid-gap: 20px;
}

header {
    grid-area: header;
    background: #fff;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    color: #007bff;
}

header nav a {
    color: #007bff;
    text-decoration: none;
    margin-left: 15px;
}

.flash-messages {
    grid-area: flash;
    list-style: none;
    padding: 0;
}
.flash-messages .danger {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
}
.flash-messages .success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
}

#task-lists-container, #tasks-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#task-lists-container {
    grid-area: lists;
}

#tasks-container {
    grid-area: tasks;
}

h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-top: 0;
}

input[type="text"], input[type="date"], input[type="number"], select {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

ul {
    list-style: none;
    padding: 0;
}

.task-list-item, #pending-tasks li, #done-tasks li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-name-clickable {
    cursor: pointer;
    font-weight: bold;
}
.list-name-clickable:hover {
    color: #0056b3;
}

.task-display {
    flex-grow: 1;
}

.task-details {
    font-size: 0.8em;
    color: #666;
    margin: 0 10px;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
