.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-width: 100%;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    max-width: 400px;
    min-width: 280px;
    min-height: 80px;
    padding: 16px 20px 16px 24px;
    border-radius: 12px;
    background: rgba(15, 17, 25, 0.85);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    pointer-events: auto;
    overflow: hidden;
    border: 1px solid rgba(90, 95, 110, 0.12);
    position: relative;
}

/* Полностью меняем дизайн индикатора - теперь это градиентная заливка слева */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    opacity: 0.9;
}

/* Улучшенные градиенты для индикаторов */
.toast.info::before {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
}

.toast.success::before {
    background: linear-gradient(135deg, #4ade80, #10b981);
}

.toast.warning::before {
    background: linear-gradient(135deg, #ffba08, #e85d04);
}

.toast.error::before {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.toast.primary::before {
    background: linear-gradient(135deg, #ff66aa, #d9168c);
}

/* Добавляем дополнительный эффект свечения по границе */
.toast {
    position: relative;
}

.toast::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.toast.info::after {
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.25);
}

.toast.success::after {
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.25);
}

.toast.warning::after {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.toast.error::after {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.toast.primary::after {
    box-shadow: 0 0 15px rgba(255, 102, 170, 0.25);
}

.toast:hover::after {
    opacity: 0.8;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 42px;
    height: 42px;
    margin-right: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: 24px;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Иконка с улучшенным эффектом */
.toast.show .toast-icon {
    animation: iconPulse 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPulse {
    0% { transform: scale(0.7) rotate(-15deg); opacity: 0.5; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Обновленные стили для иконок разных типов уведомлений */
.toast.info .toast-icon {
    background-color: rgba(76, 201, 240, 0.15);
    box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234cc9f0'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.toast.success .toast-icon {
    background-color: rgba(74, 222, 128, 0.15);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234ade80'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/%3E%3C/svg%3E");
}

.toast.warning .toast-icon {
    background-color: rgba(245, 158, 11, 0.15);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}

.toast.error .toast-icon {
    background-color: rgba(239, 68, 68, 0.15);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
}

.toast.primary .toast-icon {
    background-color: rgba(255, 102, 170, 0.15);
    box-shadow: 0 0 0 1px rgba(255, 102, 170, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff66aa'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.toast-content {
    flex: 1;
    overflow: hidden;
}

.toast-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Более яркие цвета для заголовков */
.toast.info .toast-title {
    color: #4cc9f0;
    text-shadow: 0 0 8px rgba(76, 201, 240, 0.3);
}

.toast.success .toast-title {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.toast.warning .toast-title {
    color: #ffba08;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.toast.error .toast-title {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.toast.primary .toast-title {
    color: #ff66aa;
    text-shadow: 0 0 8px rgba(255, 102, 170, 0.3);
}

.toast-message {
    color: rgba(230, 230, 250, 0.95);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    word-break: break-word;
}

.toast-close {
    width: 24px;
    height: 24px;
    margin-left: 30px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-size: cover;
    flex-shrink: 0;
    transform: scale(1);
    border-radius: 50%;
}

.toast-close:hover {
    opacity: 1;
    transform: scale(1.15) rotate(90deg);
    background-color: rgba(255, 255, 255, 0.1);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.toast-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    animation: toast-progress 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Улучшенные градиенты для прогресс-бара */
.toast.info .toast-progress::after {
    background: linear-gradient(90deg, #4361ee, #4cc9f0);
}

.toast.success .toast-progress::after {
    background: linear-gradient(90deg, #10b981, #4ade80);
}

.toast.warning .toast-progress::after {
    background: linear-gradient(90deg, #e85d04, #ffba08);
}

.toast.error .toast-progress::after {
    background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.toast.primary .toast-progress::after {
    background: linear-gradient(90deg, #d9168c, #ff66aa);
}

@keyframes toast-progress {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Улучшенные анимации появления и исчезновения */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-out {
    animation: fadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(15px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-15px) scale(0.95); }
}

/* Эффекты наведения для тостов */
.toast:hover {
    transform: translateX(0) translateY(-3px);
}

/* Мерцающий эффект для primary тостов */
.toast.primary {
    animation: primaryPulse 2s infinite alternate;
}

@keyframes primaryPulse {
    0% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4); }
    100% { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 102, 170, 0.3); }
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .toast-container {
        bottom: 15px;
        right: 15px;
        left: 15px;
        align-items: stretch;
    }
    
    .toast {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .toast {
        min-height: 70px;
        padding: 12px 12px 12px 18px;
        border-radius: 10px;
    }
    
    .toast::before {
        width: 3px;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    
    .toast-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .toast-title {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-progress {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
}