.alert-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: alert-fade-in 0.2s ease;
}

.alert-modal {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 
        0 20px 60px -10px rgba(0, 0, 0, 0.15),
        0 10px 40px -15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 32px;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Noto Sans", "Helvetica Neue", Arial,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji",
        sans-serif;
}

.alert-modal.alert-show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.alert-modal.alert-update-pulse {
    animation: update-pulse 0.4s ease;
}

.alert-top-border {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    border-radius: 0 0 12px 12px;
    transition: width 0.4s ease;
}

.alert-modal:hover .alert-top-border {
    width: 80%;
}

.alert-top-border.alert-success {
    background: linear-gradient(90deg, #10b981 0%, #22c55e 50%, #10b981 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

.alert-top-border.alert-error {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease infinite;
}

.alert-icon {
    width: 72px;
    height: 72px;
    margin: 8px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    animation: alert-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.alert-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    opacity: 0.4;
    animation: ripple 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.alert-icon-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.alert-icon-success::before {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.2), transparent);
}

.alert-icon-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.alert-icon-error::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.2), transparent);
}

.alert-svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.alert-message {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin: 12px 0;
    line-height: 1.6;
    letter-spacing: -0.01em;
    text-align: center;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.alert-message.alert-multiple {
    text-align: left;
}

.alert-message::-webkit-scrollbar {
    width: 6px;
}

.alert-message::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.alert-message::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.alert-message::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.alert-close-btn {
    margin-top: 16px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.alert-close-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.alert-close-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.alert-close-btn:hover::before {
    width: 300px;
    height: 300px;
}

.alert-close-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.alert-body-overflow-hidden {
    overflow: hidden !important;
}

@keyframes alert-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes alert-pulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

@keyframes update-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .alert-modal {
        width: 320px;
        padding: 24px;
    }
    
    .alert-icon {
        width: 64px;
        height: 64px;
    }
    
    .alert-message {
        font-size: 15px;
    }
    
    .alert-close-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}