/* --- Variables Globales --- */
:root {
    --bg-gradient: linear-gradient(135deg, #4fb3cc 0%, #6214af 100%);
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-color: #fff;
    --accent-color: #ffd700; 
    --danger-color: #ff6b6b;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

/* --- Tarjeta Principal (Glassmorphism) --- */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px); 
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.app-header h1 {
    font-size: 1.8rem;
    text-align: center;
}

#fecha {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* --- Formulario --- */
form {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 50px;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

#btn-agregar {
    background: var(--accent-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    font-weight: bold;
    transition: transform 0.2s;
}

#btn-agregar:hover {
    transform: scale(1.1);
}

/* --- Lista de Tareas --- */
ul {
    list-style: none;
    max-height: 250px;
    overflow-y: auto; /* Scroll si hay muchas tareas */
}

/* Scrollbar personalizado */
ul::-webkit-scrollbar { width: 5px; }
ul::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 10px; }

li {
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

li.completada {
    text-decoration: line-through;
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.1);
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s;
}
.btn-delete:hover { transform: scale(1.2); }

/* --- Footer --- */
.stats {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
}

#btn-limpiar {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
}
#btn-limpiar:hover { text-decoration: underline; color: #fff; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}