* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    animation: containerEntry 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

@keyframes containerEntry {
    from { 
        opacity: 0; 
        transform: scale(0.9) translateY(50px); 
        filter: blur(10px);
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
        filter: blur(0px);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); }
    to { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8)); }
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

#task-input {
    width: 100%;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#task-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#task-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.priority-selector {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.priority-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.priority-btn.active {
    transform: scale(1.1);
    color: #fff;
}

.priority-btn.high.active { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.priority-btn.medium.active { background: linear-gradient(135deg, #feca57, #ff9ff3); }
.priority-btn.low.active { background: linear-gradient(135deg, #48dbfb, #0abde3); }

.add-btn {
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.add-btn:hover::before {
    left: 100%;
}

.add-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.add-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.filter-section {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 14px;
    font-weight: 500;
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.task-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.task-list::-webkit-scrollbar {
    width: 6px;
}

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

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

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 20px;
    animation: taskSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    transition: all 0.3s ease;
}

.task-item.priority-high::before { background: linear-gradient(180deg, #ff6b6b, #ee5a52); }
.task-item.priority-medium::before { background: linear-gradient(180deg, #feca57, #ff9ff3); }
.task-item.priority-low::before { background: linear-gradient(180deg, #48dbfb, #0abde3); }

.task-item:hover {
    transform: translateX(10px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.task-item.completed {
    opacity: 0.6;
    transform: scale(0.98);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    opacity: 0.7;
}

@keyframes taskSlideIn {
    from { 
        opacity: 0; 
        transform: translateX(-50px) scale(0.9); 
        filter: blur(5px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
        filter: blur(0px);
    }
}

.task-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.task-checkbox.checked {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1.1);
}

.task-checkbox.checked::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
    animation: checkmark 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkmark {
    from { transform: scale(0) rotate(45deg); }
    to { transform: scale(1) rotate(0deg); }
}

.task-text {
    flex: 1;
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    line-height: 1.4;
}

.task-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.task-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 14px;
    font-weight: bold;
}

.edit-btn {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.delete-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.action-btn:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    animation: fadeIn 0.5s ease;
}

.empty-state::before {
    content: '✨';
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

.clear-completed {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.clear-btn {
    padding: 12px 24px;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
}

.clear-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }

    .header h1 {
        font-size: 28px;
    }

    .stats {
        gap: 15px;
    }

    .stat-item {
        padding: 12px 20px;
    }

    .input-section {
        flex-direction: column;
        gap: 15px;
    }

    .add-btn {
        padding: 16px 24px;
    }

    .task-item {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .task-content {
        width: 100%;
    }

    .task-actions {
        opacity: 1;
        align-self: flex-end;
    }

    .filter-section {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        padding: 10px 15px;
    }

    #task-input {
        padding: 15px 20px;
        font-size: 14px;
    }

    .add-btn {
        padding: 15px 20px;
        font-size: 14px;
    }

    .task-item {
        padding: 14px;
        margin-bottom: 12px;
    }

    .task-text {
        font-size: 14px;
    }

    .priority-selector {
        justify-content: center;
    }

    .priority-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}
