body {
    font-family: Poppins, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: lightblue;
    margin: 0;
}

h1 {
    color: blue;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

.container {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.input-group,
.filter-group {
    display: flex;
    justify-content: center;
    /* CENTRA ORIZZONTALMENTE */
    gap: 10px;
    /* spazio tra i bottoni */
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* va a capo su schermi piccoli */
}

input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

select,
button {
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

button {
    background: rgb(23, 23, 118);
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: lightsteelblue;
    color: blue;
}

.filter-btn {
    background: #ccc;
    color: black;
}

.filter-btn.active[data-category="default"] {
    background: #3498db;
    color: #fff;
}

.filter-btn.active[data-category="lavoro"] {
    background: #e74c3c;
    color: #fff;
}

.filter-btn.active[data-category="studio"] {
    background: #9b59b6;
    color: #fff;
}

.filter-btn.active[data-category="tempo-libero"] {
    background: #2ecc71;
    color: #fff;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    transition: background 0.2s, border-left-width 0.2s;
}

li:hover {
    background: #f0f0f0;
    transition: background 0.8s, border-left 0.14s ease;
}

/* Testo e spunta */
.task-text {
    flex: 1;
    margin: 0 10px;
    cursor: pointer;
}

.completed .task-text {
    text-decoration: line-through;
    color: green;
    opacity: 0.7;
}

/* Bottone rimuovi (X) */
.remove-btn {
    color: red;
    cursor: pointer;
    font-weight: bold;
}

/* Bottone completa (✔) */
.complete-btn {
    color: green;
    cursor: pointer;
    font-weight: bold;
    visibility: hidden;
    /* apparirà solo quando clicchi sul testo */
}

/* Mostra spunta al completamento */
.completed .complete-btn {
    visibility: visible;
    opacity: 0.6;
    background: #f7f7f7;
}

/* Colori per categoria */
li[data-category="lavoro"] {
    border-left: 5px solid #e74c3c;
}

li[data-category="studio"] {
    border-left: 5px solid #9b59b6;

}

li[data-category="tempo-libero"] {
    border-left: 5px solid #2ecc71;
}

li[data-category="default"] {
    border-left: 5px solid #3498db;
}

/* Aumento spessore all'hover */
li[data-category="lavoro"]:hover {
    border-left: 14px solid #e74c3c;
}

li[data-category="studio"]:hover {
    border-left: 14px solid #9b59b6;
}

li[data-category="tempo-libero"]:hover {
    border-left: 14px solid #2ecc71;
}

li[data-category="default"]:hover {
    border-left: 14px solid #3498db;
}

/* Responsive */
@media (max-width: 500px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2rem;
    }

    input,
    select,
    button {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}