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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: #4a6fa5;
    color: white;
    padding: 30px 20px 20px;
    text-align: center;
}

header h1 {
    margin-bottom: 20px;
    font-weight: 300;
    font-size: 2.5rem;
}

.add-task {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.add-task input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.add-task button {
    padding: 12px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.add-task button:hover {
    background: #ff5252;
}

main {
    padding: 20px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #4a6fa5;
    color: white;
}

.filter-btn:hover:not(.active) {
    background: #e0e0e0;
}

#task-list {
    list-style: none;
    margin: 20px 0;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s ease-in;
}

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

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 16px;
    transition: all 0.3s;
}

.completed .task-text {
    text-decoration: line-through;
    color: #888;
}

.delete-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.delete-btn:hover {
    opacity: 1;
}

#empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    display: none;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

#clear-completed {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#task-count {
    color: #555;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .add-task {
        flex-direction: column;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Install button (for browsers that support it) */
#installButton {
    display: none;
    padding: 10px 15px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px auto;
}

/* Status bar for installation */
#status {
    text-align: center;
    padding: 10px;
    color: #4a6fa5;
}
