* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
}

.lists-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.list-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.list-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.list-actions {
    display: flex;
    gap: 10px;
}

.list-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.list-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #888;
}

.items-container {
    margin-top: 20px;
}

.item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: start;
    gap: 12px;
    transition: background 0.2s ease;
}

.item:hover {
    background: #e9ecef;
}

.item.completed {
    opacity: 0.6;
}

.item.completed .item-title {
    text-decoration: line-through;
}

.item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
}

.item-content {
    flex: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 5px;
}

.item-title {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.item-priority {
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.item-priority.low {
    background: #d4edda;
    color: #155724;
}

.item-priority.medium {
    background: #fff3cd;
    color: #856404;
}

.item-priority.high {
    background: #f8d7da;
    color: #721c24;
}

.item-description {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.item-meta {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.85em;
    color: #888;
}

.item-actions {
    display: flex;
    gap: 5px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 0.85em;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
    padding: 5px 10px;
    font-size: 0.85em;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85em;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #667eea;
    padding: 5px;
    transition: color 0.2s ease;
}

.btn-icon:hover {
    color: #5568d3;
}

.btn-add-item {
    width: 100%;
    margin-top: 15px;
    background: #f0f0f0;
    color: #667eea;
    border: 2px dashed #667eea;
}

.btn-add-item:hover {
    background: #667eea;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
    font-size: 1.2em;
}

.empty-state h2 {
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    header h1 {
        font-size: 2em;
    }

    .lists-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

