/* Reset dan base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Container */
main {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.text-input, .date-input {
    padding: 15px;
    border: 2px solid #e1e5ee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.text-input:focus, .date-input:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

.text-input {
    flex: 2;
}

.add-btn {
    padding: 15px 30px;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    justify-content: center;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(75, 108, 183, 0.2);
}

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    color: #182848;
    display: flex;
    align-items: center;
    gap: 8px;
}

#filter-date {
    padding: 10px 15px;
    border: 2px solid #e1e5ee;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#filter-date:focus {
    outline: none;
    border-color: #4b6cb7;
    box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
}

.filter-info {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-left: auto;
}

/* Todo Section */
.todo-section h2 {
    color: #182848;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#task-count {
    font-size: 1rem;
    color: #4b6cb7;
    font-weight: normal;
}

.todo-list {
    list-style: none;
}

.todo-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border-left: 5px solid #4b6cb7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.todo-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    border-left-color: #28a745;
    opacity: 0.7;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.todo-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.todo-date {
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.delete-btn, .complete-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

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

.delete-btn:hover {
    background: #c82333;
}

.complete-btn {
    background: #28a745;
    color: white;
}

.complete-btn:hover {
    background: #218838;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.footer-note {
    font-size: 0.8rem;
    margin-top: 5px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .text-input, .date-input, .add-btn {
        width: 100%;
        min-width: auto;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-info {
        margin-left: 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .todo-actions {
        align-self: flex-end;
    }
}