body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

input, button {
    border: none;
    padding: 10px;
    font-size: 16px;
}

button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

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

.add-form, .header, .add-zone {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.add-form input, .header input, .add-zone input {
    flex: 1;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.header input {
    font-weight: bold;
}

.header a {
    margin-right: 20px;
    color: #333;
    text-decoration: none;
    font-size: 24px;
    padding: 10px;
}

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

.lists li {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.list-name {
    flex: 1;
    text-decoration: none;
    color: #333;
    font-size: 18px;
}

.items-count {
    margin-left: 8px;
    color: #999;
    font-size: 14px;
    font-weight: normal;
}

.delete-form {
    margin: 0;
}

.delete-form button {
    background-color: #dc3545;
}

.delete-form button:hover {
    background-color: #c82333;
}

#items-list {
    flex: 1;
    overflow-y: auto;
}

.item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.2s;
}

.item .drag-handle {
    margin-right: 12px;
    color: #999;
    cursor: grab;
    font-size: 18px;
}

.item .drag-handle:active {
    cursor: grabbing;
}

.item span {
    flex: 1;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #e0e0e0 !important;
}

.sortable-chosen {
    background-color: #f0f0f0;
}

.item.marked {
    order: 999;
    color: gray;
    padding-left: 30px;
}

.item.marked span {
    text-decoration: line-through;
}

.add-zone button:last-child {
    background-color: #dc3545;
    margin-left: 10px;
}

.add-zone button:last-child:hover {
    background-color: #c82333;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    background-color: white;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
    color: #333;
}

.toolbar button:hover {
    color: #000;
}

.dark {
    background-color: #121212;
    color: #ffffff;
}

.dark .add-form, .dark .header, .dark .add-zone, .dark .toolbar {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dark input {
    background-color: #333;
    color: #ffffff;
    border: 1px solid #444;
}

.dark .header a, .dark .toolbar button {
    color: #ffffff;
}

.dark .lists li, .dark .item {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}

.dark .list-name {
    color: #ffffff;
}

.dark .items-count {
    color: #666;
}

.dark .item.marked {
    color: #aaaaaa;
}

.dark .item.marked span {
    color: #aaaaaa;
}

.dark .delete-form button {
    color: #ffffff;
}

.dark .item .drag-handle {
    color: #666;
}

.dark .sortable-ghost {
    background-color: #333 !important;
}

.dark .sortable-chosen {
    background-color: #2a2a2a;
}
