/* ==========================================
   PREMIUM CUSTOM TOAST ALERTS (ANIMATSIYALI)
   ========================================== */
#toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100% - 40px);
}

.custom-toast {
    pointer-events: auto;
    background: rgba(14, 14, 14, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 16px 18px 14px 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transform: translateX(110%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-toast.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.toast-hide {
    transform: translateX(110%) scale(0.95);
    opacity: 0;
}

/* Turlari bo'yicha chap chiziq va ranglar */
.custom-toast.toast-success {
    border-left: 4px solid #00e676;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 230, 118, 0.15);
}
.custom-toast.toast-warning {
    border-left: 4px solid #ffb300;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 179, 0, 0.15);
}
.custom-toast.toast-error {
    border-left: 4px solid #ff4d4d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 77, 77, 0.15);
}
.custom-toast.toast-info {
    border-left: 4px solid #29b6f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(41, 182, 246, 0.15);
}

/* Ikonkalar */
.toast-icon {
    font-size: 20px;
    margin-top: 1px;
    flex-shrink: 0;
}
.toast-success .toast-icon { color: #00e676; }
.toast-warning .toast-icon { color: #ffb300; }
.toast-error .toast-icon { color: #ff4d4d; }
.toast-info .toast-icon { color: #29b6f6; }

/* Matn qismi */
.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.toast-message {
    font-size: 12.5px;
    color: #cccccc;
    line-height: 1.5;
    font-weight: 500;
    white-space: pre-line;
}

/* Yopish tugmasi */
.toast-close {
    background: transparent;
    border: none;
    color: #666666;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* Pastki vaqt animatsiyasi (progress bar) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress-bar { background: #00e676; }
.toast-warning .toast-progress-bar { background: #ffb300; }
.toast-error .toast-progress-bar { background: #ff4d4d; }
.toast-info .toast-progress-bar { background: #29b6f6; }

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Mobil qurilmalarda markazga joylashishi */
@media screen and (max-width: 768px) {
    #toast-container {
        top: 18px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 30px);
        max-width: 360px;
    }

    .custom-toast {
        padding: 14px 16px 12px 16px;
        transform: translateY(-50px) scale(0.9);
    }

    .custom-toast.toast-show {
        transform: translateY(0) scale(1);
    }

    .custom-toast.toast-hide {
        transform: translateY(-50px) scale(0.9);
    }
}
