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

:root {
    --bg-dark: #0a0e27;
    --bg-card: #1a1f3a;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}


.header {
    background: var(--bg-card);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats {
    display: flex;
    gap: 2rem;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}


.add-task-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-input {
    flex: 1;
    padding: 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-priority {
    padding: 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    min-width: 150px;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}


.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

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

/* Tasks Grid */
.tasks-grid {
    display: grid;
    gap: 1rem;
}

.task-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    animation: slideIn 0.3s ease;
}

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

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

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

.task-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary);
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text);
}

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

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.priority-low { background: rgba(16, 185, 129, 0.2); color: var(--success); }

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }
.icon-btn.delete:hover { background: var(--danger); }


.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state i { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }


.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }


@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; }
    .stats { width: 100%; justify-content: space-around; }
    .input-group { flex-direction: column; }
    .select-priority { width: 100%; }
    .filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
    .filter-btn { white-space: nowrap; }
}


.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index:1000; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background: var(--bg-card); padding: 2rem; border-radius: 20px; max-width: 500px; width: 90%; box-shadow: var(--shadow-lg); animation: modalSlide 0.3s ease; }
@keyframes modalSlide { from { opacity:0; transform: scale(0.9); } to { opacity:1; transform: scale(1); } }
.modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.5rem; }
.modal-title { font-size:1.5rem; font-weight:600; }
.close-modal { background:none; border:none; color:var(--text); font-size:1.5rem; cursor:pointer; }
