:root {
            --primary: #2563eb;
            --accent: #10b981;
            --bg: #ffffff;
            --surface: #f8fafc;
            --text: #0f172a;
            --text-muted: #64748b;
            --border: #e2e8f0;
            --shadow: rgba(15, 23, 42, 0.08);
            --priority-high: #dc2626;
            --priority-medium: #f59e0b;
            --priority-low: #3b82f6;
        }

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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--surface);
            color: var(--text);
            line-height: 1.6;
            min-height: 100vh;
            padding: 16px;
        }

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

        header {
            text-align: center;
            padding: 32px 0 24px;
        }

        .app-title {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-bottom: 8px;
        }

        .app-icon {
            font-size: clamp(32px, 5vw, 40px);
            line-height: 1;
        }

        h1 {
            font-size: clamp(28px, 5vw, 36px);
            font-weight: 600;
            color: var(--text);
        }

        .tagline {
            font-size: clamp(14px, 2.5vw, 16px);
            color: var(--text-muted);
            font-weight: 400;
        }

        .add-task-section {
            background: var(--bg);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 1px 3px var(--shadow);
            margin-bottom: 24px;
        }

        .task-input-wrapper {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
        }

        #taskInput {
            flex: 1;
            padding: 14px 16px;
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: clamp(15px, 2.5vw, 16px);
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            transition: all 0.2s ease;
            min-height: 48px;
        }

        #taskInput:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        #taskInput::placeholder {
            color: var(--text-muted);
        }

        #addTaskBtn {
            padding: 14px 24px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: clamp(15px, 2.5vw, 16px);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            min-height: 48px;
            min-width: 48px;
            font-family: inherit;
        }

        #addTaskBtn:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        }

        #addTaskBtn:active {
            transform: translateY(0) scale(0.97);
        }

        .task-options {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .option-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .option-group label {
            font-size: clamp(13px, 2.5vw, 14px);
            color: var(--text-muted);
            font-weight: 500;
        }

        #dueDateInput {
            padding: 8px 12px;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: clamp(13px, 2.5vw, 14px);
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            transition: all 0.2s ease;
        }

        #dueDateInput:focus {
            outline: none;
            border-color: var(--primary);
        }

        #prioritySelect {
            padding: 8px 12px;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: clamp(13px, 2.5vw, 14px);
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        #prioritySelect:focus {
            outline: none;
            border-color: var(--primary);
        }

        .filter-section {
            background: var(--bg);
            border-radius: 16px;
            padding: 16px 20px;
            box-shadow: 0 1px 3px var(--shadow);
            margin-bottom: 24px;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }

        .filter-label {
            font-size: clamp(13px, 2.5vw, 14px);
            color: var(--text-muted);
            font-weight: 500;
        }

        .filter-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 8px 16px;
            background: var(--surface);
            color: var(--text-muted);
            border: 2px solid transparent;
            border-radius: 8px;
            font-size: clamp(13px, 2.5vw, 14px);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: inherit;
        }

        .filter-btn:hover {
            background: #e2e8f0;
        }

        .filter-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .sort-select {
            padding: 8px 12px;
            border: 2px solid var(--border);
            border-radius: 8px;
            font-size: clamp(13px, 2.5vw, 14px);
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .sort-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        .tasks-section {
            background: var(--bg);
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 1px 3px var(--shadow);
            min-height: 200px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }

        .section-title {
            font-size: clamp(16px, 2.5vw, 18px);
            font-weight: 600;
            color: var(--text);
        }

        .task-count {
            font-size: clamp(13px, 2.5vw, 14px);
            color: var(--text-muted);
            background: var(--surface);
            padding: 4px 12px;
            border-radius: 20px;
        }

        #taskList {
            list-style: none;
        }

        .task-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 16px;
            background: var(--surface);
            border-radius: 12px;
            margin-bottom: 8px;
            transition: all 0.2s ease;
            border: 2px solid transparent;
            position: relative;
        }

        .task-item:hover {
            background: #f1f5f9;
            border-color: var(--border);
        }

        .task-item.completed {
            opacity: 0.6;
        }

        .task-item.completed .task-text {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        .task-item.editing {
            background: #fff;
            border-color: var(--primary);
        }

        .priority-indicator {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            border-radius: 12px 0 0 12px;
        }

        .priority-indicator.high {
            background: var(--priority-high);
        }

        .priority-indicator.medium {
            background: var(--priority-medium);
        }

        .priority-indicator.low {
            background: var(--priority-low);
        }

        .task-checkbox {
            appearance: none;
            width: 24px;
            height: 24px;
            min-width: 24px;
            margin-top: 2px;
            border: 2px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            background: var(--bg);
        }

        .task-checkbox:hover {
            border-color: var(--primary);
        }

        .task-checkbox:checked {
            background: var(--accent);
            border-color: var(--accent);
        }

        .task-checkbox:checked::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 14px;
            font-weight: 600;
        }

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

        .task-text {
            font-size: clamp(14px, 2.5vw, 16px);
            color: var(--text);
            word-break: break-word;
            margin-bottom: 4px;
        }

        .task-meta {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 8px;
        }

        .task-badge {
            font-size: clamp(11px, 2.5vw, 12px);
            padding: 4px 8px;
            border-radius: 6px;
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .task-badge.due-date {
            background: #dbeafe;
            color: #1e40af;
        }

        .task-badge.due-date.overdue {
            background: #fee2e2;
            color: #991b1b;
        }

        .task-badge.priority {
            color: white;
        }

        .task-badge.priority.high {
            background: var(--priority-high);
        }

        .task-badge.priority.medium {
            background: var(--priority-medium);
        }

        .task-badge.priority.low {
            background: var(--priority-low);
        }

        .task-edit-input {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid var(--primary);
            border-radius: 8px;
            font-size: clamp(14px, 2.5vw, 16px);
            font-family: inherit;
            color: var(--text);
            background: var(--bg);
            margin-bottom: 8px;
        }

        .task-edit-input:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .task-actions {
            display: flex;
            gap: 4px;
        }

        .task-btn {
            padding: 8px 12px;
            background: transparent;
            color: var(--text-muted);
            border: none;
            border-radius: 8px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 36px;
            min-height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .task-btn.edit-btn:hover {
            background: #dbeafe;
            color: #1e40af;
        }

        .task-btn.delete-btn:hover {
            background: #fee2e2;
            color: #dc2626;
        }

        .task-btn.save-btn {
            background: var(--accent);
            color: white;
            font-size: 14px;
        }

        .task-btn.save-btn:hover {
            background: #059669;
        }

        .task-btn.cancel-btn {
            background: var(--surface);
            color: var(--text-muted);
            font-size: 14px;
        }

        .task-btn.cancel-btn:hover {
            background: #e2e8f0;
        }

        .task-btn:active {
            transform: scale(0.97);
        }

        .empty-state {
            text-align: center;
            padding: 48px 24px;
        }

        .empty-icon {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.3;
        }

        .empty-text {
            font-size: clamp(15px, 2.5vw, 16px);
            color: var(--text-muted);
            margin-bottom: 8px;
        }

        .empty-subtext {
            font-size: clamp(13px, 2.5vw, 14px);
            color: var(--text-muted);
            opacity: 0.8;
        }

        .stats {
            display: flex;
            gap: 12px;
            margin-top: 24px;
            flex-wrap: wrap;
        }

        .stat-card {
            flex: 1;
            min-width: 140px;
            background: var(--surface);
            padding: 16px;
            border-radius: 12px;
            text-align: center;
        }

        .stat-value {
            font-size: clamp(24px, 4vw, 32px);
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: clamp(12px, 2.5vw, 14px);
            color: var(--text-muted);
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }

        .shake {
            animation: shake 0.3s ease;
        }

        @keyframes successFlash {
            0% { background-color: var(--surface); }
            50% { background-color: rgba(16, 185, 129, 0.15); }
            100% { background-color: var(--surface); }
        }

        .success-flash {
            animation: successFlash 0.5s ease;
        }

        @media (max-width: 480px) {
            body {
                padding: 12px;
            }

            header {
                padding: 24px 0 16px;
            }

            .add-task-section,
            .tasks-section {
                padding: 16px;
            }

            .task-input-wrapper {
                flex-direction: column;
            }

            #addTaskBtn {
                width: 100%;
            }

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

            .option-group {
                width: 100%;
            }

            #dueDateInput,
            #prioritySelect {
                flex: 1;
            }

            .filter-section {
                flex-direction: column;
                align-items: flex-start;
            }

            .stats {
                flex-direction: column;
            }

            .stat-card {
                min-width: 100%;
            }
        }

#__wc_fb_btn{position:fixed;bottom:18px;right:18px;z-index:99999;background:#1a1a2e;border:1px solid rgba(255,255,255,0.12);border-radius:24px;padding:8px 14px;font-size:12px;color:#e2e8f0;cursor:pointer;font-family:system-ui,-apple-system,sans-serif;box-shadow:0 4px 16px rgba(0,0,0,0.3);display:flex;align-items:center;gap:6px;transition:all 0.2s;user-select:none}
#__wc_fb_btn:hover{background:#252540;border-color:rgba(255,255,255,0.2);transform:translateY(-1px)}
#__wc_fb_panel{position:fixed;bottom:64px;right:18px;z-index:99999;background:#0f1624;border:1px solid #1a2d45;border-radius:12px;padding:16px;width:260px;box-shadow:0 8px 32px rgba(0,0,0,0.5);display:none;font-family:system-ui,-apple-system,sans-serif}
#__wc_fb_panel.open{display:block}
.__wc_fb_title{font-size:13px;color:#e2e8f0;margin-bottom:12px;font-weight:500}
.__wc_fb_emojis{display:flex;justify-content:space-around;margin-bottom:12px}
.__wc_fb_emoji{font-size:26px;cursor:pointer;padding:6px;border-radius:8px;transition:all 0.15s;border:2px solid transparent}
.__wc_fb_emoji:hover{background:rgba(255,255,255,0.08);transform:scale(1.1)}
.__wc_fb_emoji.selected{border-color:rgba(196,168,74,0.6);background:rgba(196,168,74,0.08)}
.__wc_fb_prompt{font-size:11px;color:#4a6a90;margin-bottom:6px}
.__wc_fb_ta{width:100%;background:rgba(255,255,255,0.04);border:1px solid #1e2d45;border-radius:6px;padding:8px;color:#e2e8f0;font-size:11px;font-family:system-ui,-apple-system,sans-serif;resize:none;outline:none;box-sizing:border-box;line-height:1.5}
.__wc_fb_ta:focus{border-color:#2a4060}
.__wc_fb_actions{display:flex;gap:6px;margin-top:8px;justify-content:flex-end}
.__wc_fb_skip{font-size:11px;color:#2a4060;cursor:pointer;padding:4px 8px;background:transparent;border:none}
.__wc_fb_send{font-size:11px;color:#c4a84a;background:rgba(196,168,74,0.08);border:0.5px solid rgba(196,168,74,0.3);border-radius:4px;padding:5px 12px;cursor:pointer;font-family:system-ui}
.__wc_fb_send:hover{background:rgba(196,168,74,0.15)}
.__wc_fb_thanks{text-align:center;padding:8px 0;font-size:13px;color:#4ade80}