body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.bg-white {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1), 
                0 10px 20px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

input[type="text"] {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
                0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input[type="text"]:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1),
                inset 0 2px 4px rgba(0, 0, 0, 0.1),
                0 8px 25px rgba(139, 92, 246, 0.15) !important;
    transform: translateY(-1px);
}

.bg-purple-600 {
    background: linear-gradient(145deg, #8b5cf6, #7c3aed) !important;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3),
                0 4px 8px rgba(139, 92, 246, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
}

.bg-purple-600::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.bg-purple-600:hover::before {
    left: 100%;
}

.bg-purple-600:hover {
    background: linear-gradient(145deg, #7c3aed, #6d28d9) !important;
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.4),
                0 6px 12px rgba(139, 92, 246, 0.3) !important;
    transform: translateY(-2px) !important;
}

.bg-red-500 {
    background: linear-gradient(145deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3),
                0 4px 8px rgba(239, 68, 68, 0.2);
}

.bg-red-500:hover {
    background: linear-gradient(145deg, #dc2626, #b91c1c) !important;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-2px) !important;
}

.task-list {
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
    padding-right: 8px;
}

.task-list::-webkit-scrollbar {
    width: 6px;
}

.task-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.task-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 3px;
    transition: background 0.3s;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.task-item {
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1),
                0 4px 8px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.5s;
}

.task-item:hover::before {
    left: 100%;
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15),
                0 8px 16px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(139, 92, 246, 0.3) !important;
}

#progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed, #6d28d9) !important;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

#progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.bg-gray-200 {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#message-box .bg-white {
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-spin {
    border-color: rgba(139, 92, 246, 0.2) !important;
    border-top-color: #8b5cf6 !important;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1 {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="checkbox"]:checked {
    background: linear-gradient(145deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.line-through {
    position: relative;
    color: rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease;
}

.line-through::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    transform: scaleX(0);
    transform-origin: left;
    animation: strikethrough 0.3s ease forwards;
}

@keyframes strikethrough {
    to {
        transform: scaleX(1);
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem !important;
    }
    
    .bg-white {
        padding: 1.5rem !important;
        margin: 0.5rem;
        border-radius: 24px !important;
    }
    
    h1 {
        font-size: 2rem !important;
        text-align: center;
    }
    
    .task-item {
        padding: 1rem !important;
    }
    
    input[type="text"] {
        padding: 0.75rem !important;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    button {
        padding: 0.75rem 1.5rem !important;
        font-size: 14px !important;
    }
}

.rounded-3xl, .rounded-xl, .rounded-lg {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

button:active {
    animation: pulse 0.15s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, 
                transform 0.2s ease, box-shadow 0.2s ease;
}
