body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

header {
    background-color: #4A90E2;
    color: white;
    padding: 1.2rem 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

header .current-list-name-display {
    font-size: 0.9rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

main {
    padding: 1rem;
}

section {
    margin-bottom: 1.5rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

section h2 {
    margin-top: 0;
    color: #4A90E2;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    font-size: 1.2rem;
}

#addItemForm input[type="text"],
#addItemForm select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

#addItemForm .type-and-add {
    display: flex;
    gap: 0.75rem;
}

#addItemForm select {
    flex-grow: 1;
}

#addItemForm button {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

#addItemForm button:hover {
    background-color: #4cae4c;
}

.item-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #eee;
    word-break: break-word;
}

.item-list li:last-child {
    border-bottom: none;
}

.item-list .item-content {
    flex-grow: 1;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.item-list input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #4A90E2;
}

.item-list .delete-btn {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

.item-list .delete-btn:hover {
    color: #c9302c;
}

.item-list .completed .item-content {
    text-decoration: line-through;
    color: #aaa;
}

/* Placeholder message */
.item-list .placeholder {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Save/Load Section Styles */
.save-load-section {
    background-color: #e9ecef; /* Light grey background for this section */
}

.save-load-section h2, .save-load-section h3 {
    color: #343a40; /* Darker heading color for this section */
}

#saveListForm {
    display: flex;
    flex-direction: column; 
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#saveListForm input[type="text"] {
    width: 100%; 
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; 
}

#saveListForm button {
    background-color: #007bff; 
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    width: 100%; 
}

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

#savedListsContainer li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#savedListsContainer li:hover {
    background-color: #f8f9fa;
}

#savedListsContainer .saved-list-name {
    flex-grow: 1;
    color: #007bff;
    font-weight: 500;
}

#savedListsContainer .delete-list-btn {
    background: none;
    border: none;
    color: #dc3545; 
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

#savedListsContainer .delete-list-btn:hover {
    color: #c82333;
}