:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #22c55e;
    --danger: #ef4444;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body {
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 20px;
    color: var(--text-main);
}
.todo-wrapper {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.app-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}
#current-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}
.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
#todo-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #f1f5f9;
    border-radius: var(--radius);
    outline: none;
    font-size: 1rem;
    transition: all 0.2s ease;
}
#todo-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
#add-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
#add-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.filter-section {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #ffffff;
    margin-bottom: 12px;
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    animation: slideUp 0.3s ease forwards;
    transition: 0.2s;
}
.task-item:hover {
    border-color: var(--primary);
}
.task-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.task-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--success);
    cursor: pointer;
}
.task-item.completed {
    background: #f8fafc;
    opacity: 0.6;
}
.task-item.completed .task-text {
    text-decoration: line-through;
}
.delete-btn {
    background: #fff1f2;
    color: var(--danger);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.2s;
}
.delete-btn:hover {
    background: var(--danger);
    color: white;
}
.app-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}
#clear-completed {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
}
@media (max-width: 480px) {
    body { padding: 10px; }
    .todo-wrapper { padding: 1.5rem; }
}
@media (max-height: 600px) {
    body { align-items: flex-start; padding-top: 20px; }
}
.task-container::-webkit-scrollbar { width: 4px; }
.task-container::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
button, .filter-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}