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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: #f5f5f5;
            padding: 20px;
            line-height: 1.5;
        }

        .container {
            max-width: 680px;
            margin: 0 auto;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            overflow: hidden;
        }

        .header {
            background: #2c3e50;
            color: white;
            padding: 24px 28px;
            border-bottom: 3px solid #34495e;
            position: relative;
        }

        .header h1 {
            font-size: 26px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .header p {
            font-size: 14px;
            opacity: 0.85;
        }

        .theme-toggle {
            position: absolute;
            top: 24px;
            right: 28px;
            background: rgba(255,255,255,0.2);
            border: none;
            padding: 8px 12px;
            border-radius: 5px;
            color: white;
            cursor: pointer;
            font-size: 20px;
            transition: background 0.2s;
        }

        .theme-toggle:hover {
            background: rgba(255,255,255,0.3);
        }

        .add-task {
            padding: 24px 28px;
            border-bottom: 1px solid #e8e8e8;
        }

        .input-group {
            display: flex;
            gap: 10px;
            margin-bottom: 12px;
        }

        #taskInput {
            flex: 1;
            padding: 12px 14px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 15px;
            transition: border 0.2s;
        }

        #taskInput:focus {
            outline: none;
            border-color: #3498db;
        }

        .priority-group {
            display: flex;
            gap: 8px;
            align-items: center;
            font-size: 13px;
            color: #7f8c8d;
        }

        .priority-btn {
            padding: 6px 12px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s;
        }

        .priority-btn.active {
            border-color: #3498db;
            background: #3498db;
            color: white;
        }

        .priority-btn.high.active {
            border-color: #e74c3c;
            background: #e74c3c;
        }

        .priority-btn.medium.active {
            border-color: #f39c12;
            background: #f39c12;
        }

        .priority-btn.low.active {
            border-color: #95a5a6;
            background: #95a5a6;
        }

        #addBtn {
            padding: 12px 24px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
        }

        #addBtn:hover {
            background: #2980b9;
        }

        #addBtn:active {
            transform: translateY(1px);
        }

        .filters {
            padding: 16px 28px;
            background: #fafafa;
            border-bottom: 1px solid #e8e8e8;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }

        .filter-btn {
            padding: 8px 16px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

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

        .filter-btn.active {
            background: #3498db;
            color: white;
            border-color: #3498db;
        }

        .search-box {
            flex: 1;
            min-width: 200px;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }

        .search-box:focus {
            outline: none;
            border-color: #3498db;
        }

        .tasks-list {
            padding: 16px 28px 28px;
            min-height: 200px;
        }

        .task-item {
            padding: 16px;
            margin-bottom: 10px;
            background: #fafafa;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 14px;
            transition: all 0.2s;
            border-left: 4px solid transparent;
        }

        .task-item.priority-high {
            border-left-color: #e74c3c;
        }

        .task-item.priority-medium {
            border-left-color: #f39c12;
        }

        .task-item.priority-low {
            border-left-color: #95a5a6;
        }

        .task-item:hover {
            background: #f0f0f0;
            transform: translateX(2px);
        }

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

        .task-item.completed .task-text {
            text-decoration: line-through;
            color: #7f8c8d;
        }

        .checkbox {
            width: 20px;
            height: 20px;
            cursor: pointer;
            flex-shrink: 0;
        }

        .task-content {
            flex: 1;
        }

        .task-text {
            font-size: 15px;
            color: #2c3e50;
            margin-bottom: 4px;
        }

        .task-meta {
            font-size: 12px;
            color: #95a5a6;
            display: flex;
            gap: 12px;
        }

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

        .action-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            font-size: 13px;
            cursor: pointer;
            opacity: 0;
            transition: all 0.2s;
        }

        .task-item:hover .action-btn {
            opacity: 1;
        }

        .edit-btn {
            background: #3498db;
            color: white;
        }

        .edit-btn:hover {
            background: #2980b9;
        }

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

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

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #95a5a6;
        }

        .empty-state svg {
            width: 80px;
            height: 80px;
            margin-bottom: 16px;
            opacity: 0.4;
        }

        .stats {
            padding: 16px 28px;
            background: #ecf0f1;
            font-size: 14px;
            color: #7f8c8d;
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
        }

        .clear-completed {
            padding: 6px 14px;
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 13px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .clear-completed:hover {
            background: #c0392b;
        }

        .edit-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .edit-modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 28px;
            border-radius: 8px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        }

        .modal-content h3 {
            margin-bottom: 16px;
            color: #2c3e50;
        }

        .modal-content input {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 15px;
            margin-bottom: 16px;
        }

        .modal-content input:focus {
            outline: none;
            border-color: #3498db;
        }

        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .modal-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
        }

        .modal-btn.save {
            background: #3498db;
            color: white;
        }

        .modal-btn.save:hover {
            background: #2980b9;
        }

        .modal-btn.cancel {
            background: #ecf0f1;
            color: #7f8c8d;
        }

        .modal-btn.cancel:hover {
            background: #bdc3c7;
        }

        body.dark-mode {
            background: #1a1a1a;
        }

        .dark-mode .container {
            background: #2c2c2c;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }

        .dark-mode .add-task,
        .dark-mode .filters {
            border-color: #3a3a3a;
        }

        .dark-mode .filters {
            background: #252525;
        }

        .dark-mode #taskInput,
        .dark-mode .search-box {
            background: #3a3a3a;
            border-color: #4a4a4a;
            color: #e0e0e0;
        }

        .dark-mode .filter-btn,
        .dark-mode .priority-btn {
            background: #3a3a3a;
            border-color: #4a4a4a;
            color: #e0e0e0;
        }

        .dark-mode .filter-btn:hover,
        .dark-mode .priority-btn:hover {
            background: #4a4a4a;
        }

        .dark-mode .task-item {
            background: #3a3a3a;
        }

        .dark-mode .task-item:hover {
            background: #404040;
        }

        .dark-mode .task-text {
            color: #e0e0e0;
        }

        .dark-mode .stats {
            background: #252525;
        }

        .dark-mode .modal-content {
            background: #2c2c2c;
            color: #e0e0e0;
        }

        .dark-mode .modal-content h3 {
            color: #e0e0e0;
        }

        .dark-mode .modal-content input {
            background: #3a3a3a;
            border-color: #4a4a4a;
            color: #e0e0e0;
        }

        @media (max-width: 600px) {
            body {
                padding: 0;
            }
            
            .container {
                border-radius: 0;
            }

            .filters {
                flex-wrap: wrap;
            }

            .search-box {
                width: 100%;
            }
        }