* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #2c3e50;
}

.add-list-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.add-list-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.add-list-form button,
.add-item-form button {
    padding: 0.75rem 1.25rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
}

.add-list-form button:hover,
.add-item-form button:hover {
    background: #2980b9;
}

.list-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.list-header h2 {
    font-size: 1.25rem;
    color: #2c3e50;
}

.add-item-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.add-item-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.items {
    list-style: none;
}

.item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.toggle-form {
    display: inline;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #bbb;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.checkbox:hover {
    border-color: #3498db;
}

.item.completed .checkbox {
    background: #27ae60;
    border-color: #27ae60;
}

.item.completed .checkbox::after {
    content: "✓";
    color: white;
    font-size: 12px;
}

.item-text {
    flex: 1;
}

.item.completed .item-text {
    text-decoration: line-through;
    color: #999;
}

.btn-delete, .btn-delete-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #e74c3c;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.btn-delete:hover, .btn-delete-item:hover {
    background: #fde8e8;
}

.btn-delete-item {
    font-size: 1.2rem;
    padding: 0 0.25rem;
}

.lists {
    list-style: none;
    margin-top: 1rem;
}

.list-item {
    background: white;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.rename-form {
    display: flex;
    gap: 0.25rem;
}

.rename-form input {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rename-form button {
    padding: 0.25rem 0.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.list-item:hover {
    transform: translateX(5px);
}

.list-item a {
    display: block;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}
