/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    padding: 30px 20px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    color: white;
    padding: 30px 35px;
    border-radius: 16px;
    margin-bottom: 25px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

header h1 i {
    color: #90caf9;
}

header p {
    opacity: 0.8;
    font-weight: 300;
    margin-top: 4px;
    font-size: 0.95rem;
}

/* ===== FORM ===== */
.form-container {
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.form-container h2 {
    color: #1a237e;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e7f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: 0.3s;
    background: #fafcff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0d47a1;
    background: white;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.3);
}

/* ===== STATS ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    background: white;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a237e;
}

.stat-label {
    font-size: 0.75rem;
    color: #78909c;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FILTERS ===== */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e0e7f0;
    background: white;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #78909c;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover {
    border-color: #0d47a1;
    color: #0d47a1;
}

.filter-btn.active {
    background: #0d47a1;
    border-color: #0d47a1;
    color: white;
}

/* ===== TODO LIST ===== */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: 0.3s;
}

.todo-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.todo-item.done {
    opacity: 0.6;
}

.todo-item.done .todo-title {
    text-decoration: line-through;
    color: #78909c;
}

/* Checkbox */
.todo-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #b0bec5;
    background: transparent;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.todo-check:hover {
    border-color: #0d47a1;
}

.todo-check.checked {
    background: #2e7d32;
    border-color: #2e7d32;
    color: white;
}

.todo-check.checked i {
    font-size: 0.65rem;
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-title {
    font-weight: 600;
    color: #1a237e;
    font-size: 0.95rem;
}

.todo-desc {
    font-size: 0.8rem;
    color: #78909c;
    margin-top: 2px;
}

.todo-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.todo-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-edit {
    background: #e3f2fd;
    color: #0d47a1;
}

.btn-edit:hover {
    background: #0d47a1;
    color: white;
}

.btn-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background: #c62828;
    color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: none;
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 16px;
}

.empty-state i {
    font-size: 3rem;
    color: #b0bec5;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: #1a237e;
    font-size: 1.1rem;
}

.empty-state p {
    color: #78909c;
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 95%;
    animation: slideIn 0.25s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef3f8;
}

.modal-header h3 {
    color: #1a237e;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #78909c;
    cursor: pointer;
    transition: 0.3s;
    padding: 0 4px;
}

.close-btn:hover {
    color: #d32f2f;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 15px;
}

.btn-cancel {
    background: #e0e7f0;
    color: #1a237e;
}

.btn-cancel:hover {
    background: #c5ced9;
}

.btn-save {
    background: #0d47a1;
    color: white;
}

.btn-save:hover {
    background: #1565c0;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    body {
        padding: 15px 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 18px 20px;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-num {
        font-size: 1.3rem;
    }

    .todo-item {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .todo-actions {
        margin-left: auto;
    }

    .modal-content {
        padding: 20px;
    }
}