:root {
    --bg-body: #dfe6f8;
    --bg-container: white;
    --bg-stats: #eff2ff;
    --bg-task: #f8f9ff;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.1);
}
body.dark-mode {
    --bg-body: #0C1222;
    --bg-container: #19243A;
    --bg-stats: #0f1624;
    --bg-task: #1a2332;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: #27374d;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-light: rgba(0, 0, 0, 0.3);
}



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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background-color: var(--bg-body);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
            transition: background-color 0.3s ease; 
        }
        .container {
            background: var(--bg-container);
            border-radius: 20px;
            box-shadow: 0 20px 60px var(--shadow);
            padding: 40px;
            width: 100%;
            max-width: 550px;
            position: relative;
            transition: background-color 0.3s ease, box-shadow 0.3s ease
        }
        h1 {
            color: var(--text-primary);
            text-align: center;
            margin-bottom: 10px;
            font-size: 2rem;
            font-weight: 500;
            transition: color 0.3s ease;

        }

        .stats {
            display: flex;
            justify-content: space-around;
            margin-bottom: 30px;
            padding: 15px;
            background: var(--bg-stats);
            border-radius: 10px;
            transition: background-color 0.3s ease;
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 1.5rem;
            font-weight: bold;
            color: #667eea;
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 5px;
            transition: color 0.3s ease;
        }

        .input-section {
            display: flex;
            gap: 10px;
            margin-bottom: 30px;
        }

        #taskInput {
            flex: 1;
            padding: 15px;
            border: 2px solid var(--border-color);
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.1s ease;
            background: var(--bg-container);
            color: var(--text-primary);
        }

        #taskInput:focus { box-shadow:0 12px 30px rgba(102, 126, 234, 0.10);transform:translateY(-2px);border-color: rgba(102,126,234,0.28);outline: none;
        }

        #addBtn {
            padding: 15px 30px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        #addBtn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        #addBtn:active {
            transform: translateY(0);
        }

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

        .task-item {
            background: var(--bg-task);
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s ease;
            animation: slideIn 0.3s ease;
        }

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

        .task-item:hover {
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        }

        .task-checkbox {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #667eea;
        }

        .task-text {
            flex: 1;
            font-size: 1rem;
            word-break: break-word;
            transition: color 0.3s ease;
            color: var(--text-primary);
        }

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

        .delete-btn {
            background: transparent; 
            border: none; 
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            color: var(--text-secondary);
            
        }

        
         .delete-btn:hover svg {
        transform: scale(1.1);
        transition: all 0.2s ease;
        }

        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: #999;
            transition: color 0.3s ease;
        }

        .empty-state-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }

        /* Responsive ke liye  */
        @media (max-width: 600px) {
            .container {
                padding: 25px;
            }

            h1 {
                font-size: 1.5rem;
            }

            .input-section {
                flex-direction: column;
            }

            #addBtn {
                width: 100%;
            }

            .stats {
                flex-direction: column;
                gap: 15px;
            }
        }
        /* ===== Theme Toggle Button ===== */
.theme-toggle {
    position: absolute;
    top: 30px;
    right: 40px;
    background: var(--bg-stats);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 3px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.toggle-slider {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    font-size: 12px;
}

body.dark-mode .toggle-slider {
    transform: translateX(30px);
}
    