/* Reset básico y tipografía */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Contenedor centrado */
.contenedor {
    max-width: 560px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 2rem;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
}

/* Formulario nueva tarea */
.formulario-nueva {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.formulario-nueva input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s;
}

.formulario-nueva input[type="text"]:focus {
    border-color: #0071e3;
}

.formulario-nueva button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    background: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.formulario-nueva button:hover {
    background: #0077ed;
}

/* Mensaje cuando no hay tareas */
.vacio {
    text-align: center;
    color: #86868b;
    padding: 2rem 0;
}

/* Lista */
.lista-tareas {
    list-style: none;
}

.lista-tareas li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f2;
}

.lista-tareas li:last-child {
    border-bottom: none;
}

.lista-tareas li.completada .titulo {
    color: #86868b;
    text-decoration: line-through;
}

.titulo {
    flex: 1;
    font-size: 1rem;
    word-break: break-word;
}

/* Botón circular de check */
.check {
    width: 24px;
    height: 24px;
    border: 2px solid #d2d2d7;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #ffffff;
    transition: all 0.15s;
    padding: 0;
}

.completada .check {
    background: #34c759;
    border-color: #34c759;
}

.check:hover {
    border-color: #0071e3;
}

/* Botón borrar */
.borrar button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #86868b;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
    padding: 0;
}

.borrar button:hover {
    background: #ffe5e5;
    color: #ff3b30;
}

/* Los formularios inline no rompen el flex */
.toggle, .borrar {
    display: flex;
}
