/* Toast уведомления */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    max-width: 600px;
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.toast {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(1, 157, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 102, 204, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 70px;
    display: flex;
    align-items: center;
    color: #ffffff;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    max-width: 580px;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(1, 157, 234, 0.03) 50%, transparent 70%);
    pointer-events: none;
    animation: shimmer 3s ease-in-out infinite;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(145deg, #1a2e1a, #0f3d0f);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(34, 197, 94, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(22, 163, 74, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    box-shadow: 
        0 20px 60px rgba(34, 197, 94, 0.25),
        0 8px 32px rgba(34, 197, 94, 0.15),
        0 0 0 1px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(145deg, #2e1a1a, #3d0f0f);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    box-shadow: 
        0 20px 60px rgba(239, 68, 68, 0.25),
        0 8px 32px rgba(239, 68, 68, 0.15),
        0 0 0 1px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(145deg, #2e2a1a, #3d330f);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(217, 119, 6, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    box-shadow: 
        0 20px 60px rgba(245, 158, 11, 0.25),
        0 8px 32px rgba(245, 158, 11, 0.15),
        0 0 0 1px rgba(245, 158, 11, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(145deg, #1a1e2e, #0f1d3d);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    box-shadow: 
        0 20px 60px rgba(59, 130, 246, 0.25),
        0 8px 32px rgba(59, 130, 246, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    font-weight: 600;
}

.toast-body {
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
}

.toast .btn-close {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.8;
    font-size: 18px;
    padding: 4px 8px;
    margin: 0;
    filter: brightness(0) invert(1);
}

.toast .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.toast-icon {
    font-size: 24px;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.toast-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
}

.toast-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toast-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.toast.success .toast-icon::before {
    content: "✓";
    color: #22c55e;
}

.toast.error .toast-icon::before {
    content: "✕";
    color: #ef4444;
}

.toast.warning .toast-icon::before {
    content: "⚠";
    color: #f59e0b;
}

.toast.info .toast-icon::before {
    content: "ℹ";
    color: #3b82f6;
}

/* Анимация появления */
@keyframes slideInUp {
    0% {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
        filter: blur(3px);
    }
    30% {
        transform: translateY(-8px) scale(0.98);
        opacity: 0.6;
        filter: blur(1px);
    }
    60% {
        transform: translateY(4px) scale(1.02);
        opacity: 0.9;
        filter: blur(0.5px);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    to {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
        filter: blur(3px);
    }
}

.toast.slide-in {
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.slide-out {
    animation: slideOutDown 0.4s ease-in;
}

/* Прогресс бар */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(59, 130, 246, 0.9));
    border-radius: 0 0 20px 20px;
    animation: progress 5s linear forwards;
    z-index: 1;
}

.toast.success .toast-progress {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.6), rgba(34, 197, 94, 0.9));
}

.toast.error .toast-progress {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.6), rgba(239, 68, 68, 0.9));
}

.toast.warning .toast-progress {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.6), rgba(245, 158, 11, 0.9));
}

.toast.info .toast-progress {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(59, 130, 246, 0.9));
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-container {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: 380px;
    }
    
    .toast {
        padding: 16px 18px;
        min-height: 65px;
        border-radius: 18px;
    }
    
    .toast-icon {
        width: 28px;
        height: 28px;
        font-size: 20px;
        margin-right: 14px;
    }
    
    .toast-title {
        font-size: 15px;
        margin-bottom: 5px;
    }
    
    .toast-message {
        font-size: 13px;
    }
    
    .toast-close {
        width: 28px;
        height: 28px;
        top: 14px;
        right: 14px;
        font-size: 12px;
    }
}