/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Professional Dark Theme Background */
body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    position: relative;
    color: #ffffff;
}

/* Subtle Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* ===== MAIN CONTAINER ===== */
.todo-container {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== HEADER STYLES ===== */
.app-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0;
    font-weight: 400;
}

/* ===== INPUT SECTION ===== */
.input-section .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.input-section .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.3);
    color: #ffffff;
    outline: none;
}

.input-section .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.add-btn {
    background: #94a3b8;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.add-btn:hover {
    background: #64748b;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.add-btn:active {
    transform: translateY(0);
}

/* ===== FILTER SECTION ===== */
.filter-section .btn-check:checked + .btn {
    background: #94a3b8;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.filter-section .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.filter-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

/* ===== TASK LIST ===== */
.task-list-header h5 {
    color: #ffffff;
    font-weight: 600;
}

.clear-completed {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transition: all 0.2s ease;
}

.clear-completed:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.8);
    color: #dc2626;
}

.task-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Task Item */
.task-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #94a3b8;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.task-item:hover::before {
    transform: scaleY(1);
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.task-item.completed {
    opacity: 0.7;
    background: rgba(34, 197, 94, 0.15);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.6);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.task-checkbox:hover {
    border-color: #94a3b8;
    background: rgba(148, 163, 184, 0.2);
}

.task-checkbox.checked {
    background: #22c55e;
    border-color: #22c55e;
}

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.task-text {
    color: #ffffff;
    font-size: 1rem;
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
}

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

.task-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.task-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.05);
}

.task-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem !important;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
}

/* ===== STATISTICS SECTION ===== */
.stats-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    padding: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    display: block;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    background: rgba(30, 30, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

.toast-header {
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.toast-body {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

.btn-close {
    filter: invert(1);
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.task-item {
    animation: slideIn 0.3s ease;
}

.task-item.removing {
    animation: fadeOut 0.3s ease forwards;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 576px) {
    .todo-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .task-item {
        padding: 0.75rem;
    }
    
    .task-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .filter-section .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .add-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.small {
    font-size: 0.875rem;
}

/* ===== FOCUS STATES ===== */
.btn:focus,
.form-control:focus,
.btn-check:focus + .btn {
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.4);
    outline: none;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== HOVER EFFECTS ===== */
.task-item {
    cursor: default;
}

.task-checkbox,
.task-btn {
    cursor: pointer;
}

/* ===== CUSTOM CONFIRMATION MODAL ===== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: rgba(30, 30, 40, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.confirm-modal-overlay.show .confirm-modal {
    transform: scale(1) translateY(0);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.confirm-modal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.confirm-modal-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.confirm-modal-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.confirm-modal-body {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.confirm-modal-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.confirm-modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.confirm-modal-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.confirm-modal-btn.confirm {
    background: #ef4444;
    color: #ffffff;
}

.confirm-modal-btn.confirm:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.confirm-modal-btn:active {
    transform: translateY(0);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}