/* --- Global Styles & Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

/* --- Main App Container --- */
.container {
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #444;
}

/* --- Auth Forms (Login/Register) --- */
/* This section is new */
#auth-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#auth-container input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

#auth-container button {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#auth-container button:hover {
    background-color: #dc2626;
}

#auth-container p {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

#auth-container a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* --- To-Do Header & Logout Button --- */
/* This section is new */
#todo-container .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#todo-container .header h1 {
    text-align: left; /* Override centered h1 */
}

#logout-btn {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}

#logout-btn:hover {
    background-color: #f3f4f6;
    border-color: #ccc;
}


/* --- Task Input Form --- */
#task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#task-input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

#task-form button {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#task-form button:hover {
    background-color: #dc2626;
}

/* --- Task List --- */
#task-list {
    list-style: none;
}

#task-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid #eee;
}

#task-list li:last-child {
    border-bottom: none;
}

#task-list li span {
    margin: 0 1rem;
}

#task-list li.completed span {
    text-decoration: line-through;
    color: #999;
}

#task-list li button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
}

.complete-btn {
    color: #888;
}

#task-list li.completed .complete-btn {
    color: #22c55e;
}

.delete-btn {
    color: #ef4444;
}