@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    padding: 20px;
}

h1 {
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.container {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 40px);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.task-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
    min-height: 200px;
}

.task-list::-webkit-scrollbar {
    width: 8px;
}

.task-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.task-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 10px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.7);
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    min-height: 250px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: clamp(18px, 4vw, 22px);
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.empty-state p {
    font-size: clamp(13px, 3vw, 15px);
    color: rgba(255, 255, 255, 0.5);
}


.task-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    border-left: 4px solid rgba(16, 185, 129, 0.6);
    padding: clamp(14px, 3vw, 20px);
    margin-bottom: 14px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.task-item:hover {
    transform: translateY(-3px) translateX(2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.25);
    background: rgba(255, 255, 255, 0.12);
    border-left-width: 5px;
}

.task-item:hover::before {
    opacity: 1;
}

.task-item h3 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: clamp(16px, 3.5vw, 20px);
    font-weight: 600;
    line-height: 1.4;
}

.task-item p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(12px, 2.5vw, 14px);
    line-height: 1.6;
}

.task-item strong {
    color: #10b981;
    font-weight: 600;
}

.task-item button {
    margin-right: 10px;
    margin-top: 14px;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.task-item button:active {
    transform: scale(0.95);
}

.task-item button:first-of-type {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    color: white;
}

.task-item button:first-of-type:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.task-item button:last-of-type {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    color: white;
}

.task-item button:last-of-type:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}


.task-item.top-priority {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-left-color: #10b981;
    border-left-width: 6px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
    }
    50% {
        box-shadow: 0 6px 28px rgba(16, 185, 129, 0.5);
    }
}

.task-item.top-priority::after {
    content: '⭐ TOP PRIORITY';
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.task-item.completed {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(107, 114, 128, 0.5);
}

.task-item.completed::before {
    display: none;
}

.task-item.completed h3 {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
}

.task-item.completed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.2);
}

.btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
    backdrop-filter: blur(5px);
    color: white;
    padding: clamp(14px, 3vw, 18px);
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

.btn:active {
    transform: translateY(-1px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: clamp(24px, 5vw, 40px);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 10px;
}

.modal-content h2 {
    margin: 0 0 28px 0;
    color: #ffffff;
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 700;
}

#task-form label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: clamp(13px, 2.5vw, 14px);
}

#task-form input {
    width: 100%;
    padding: 13px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#task-form input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

#task-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#task-form input[type="number"] {
    appearance: textfield;
}

#task-form input[type="number"]::-webkit-inner-spin-button,
#task-form input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 30px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.form-buttons button {
    flex: 1;
    padding: clamp(13px, 3vw, 15px);
    border: none;
    border-radius: 10px;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
}

.form-buttons button[type="submit"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.form-buttons button[type="submit"]:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(5, 150, 105, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.form-buttons button[type="button"] {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-buttons button[type="button"]:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.form-buttons button:active {
    transform: scale(0.97);
}


@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .container {
        max-height: 95vh;
        padding: 20px;
    }
    
    .task-item {
        padding: 14px;
    }
    
    .task-item button {
        padding: 8px 14px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .task-item.top-priority::after {
        font-size: 9px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .container {
        padding: 16px;
        border-radius: 16px;
    }
    
    .task-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .task-item h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .task-item p {
        font-size: 12px;
        margin: 6px 0;
    }
    
    .task-item button {
        padding: 7px 12px;
        margin-top: 10px;
    }
    
    .task-item.top-priority::after {
        top: 8px;
        right: 8px;
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-buttons button {
        width: 100%;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .empty-state {
        padding: 40px 16px;
    }
}