:root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #222;
    --muted: #666;
    --accent: #3acfcf;
    --success: #4caf50;
    --danger: #e53935;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(900px, 92%);
    margin: 2rem auto;
    flex: 1;
}

.site-header {
    text-align: center;
    padding: 1.5rem;
    background: var(--card);
    box-shadow: var(--shadow);
}

.site-header h1 {
    color: var(--accent);
}

.site-footer {
    text-align: center;
    padding: 1rem;
    font-size: .9rem;
    color: var(--muted);
    background: var(--card);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* Add task form */
.add-task,
.filters {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.add-task input,
.add-task select,
.filters select {
    flex: 1;
    padding: .7rem 1rem;
    border-radius: var(--radius);
    border: 1px solid #ddd;
    background: #fff;
    color: var(--text);
    font-size: .95rem;
}

.add-task select,
.filters select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23666' height='20' width='20' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 16px;
}

.add-task button {
    padding: .7rem 1.2rem;
    border-radius: var(--radius);
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

.add-task button:hover {
    background: #2fb5b5;
}

/* Task list */
.task-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.task {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn .3s ease;
}

.task.completed {
    opacity: .7;
    text-decoration: line-through;
}

.task-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.task-title {
    font-weight: 600;
}

.task-meta {
    font-size: .85rem;
    color: var(--muted);
}

.task-actions {
    display: flex;
    gap: .5rem;
}

.task-actions button {
    border: none;
    padding: .5rem .8rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
    color: #fff;
}

.task-actions .done {
    background: var(--success);
}

.task-actions .delete {
    background: var(--danger);
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-state {
    text-align: center;
    margin-top: 2rem;
    color: var(--muted);
    font-size: 1.1rem;
    opacity: .8;
}