/* ============================================
   NOTIFICATION SYSTEM
   Система уведомлений для игры
   ============================================ */

/* Контейнер уведомлений */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Отдельное уведомление */
.notification {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 8px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

.notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Анимация появления */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Анимация исчезновения */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification.hiding {
    animation: slideOut 0.3s ease forwards;
}

/* Иконка уведомления */
.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Контент уведомления */
.notification-content {
    flex: 1;
    color: #fff;
}

.notification-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Кнопка закрытия */
.notification-close {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.2s ease;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: rgba(255, 255, 255, 1);
}

/* Типы уведомлений */

/* Success - Зеленый */
.notification.success {
    border-left-color: #28a745;
}

.notification.success .notification-icon {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

/* Error - Красный */
.notification.error {
    border-left-color: #dc3545;
}

.notification.error .notification-icon {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Warning - Оранжевый */
.notification.warning {
    border-left-color: #ffc107;
}

.notification.warning .notification-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Info - Голубой */
.notification.info {
    border-left-color: #17a2b8;
}

.notification.info .notification-icon {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
}

/* Прогресс-бар автозакрытия */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    animation: progress linear;
}

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

/* Адаптивность */
@media screen and (max-width: 768px) {
    .notification-container {
        top: 60px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        max-width: 100%;
    }
}

/* Achievement Notification - Специальный стиль для достижений */
.notification.achievement-notification {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(20, 20, 20, 0.95) 100%);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.notification.achievement-notification .notification-icon {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-size: 28px;
    animation: achievement-pulse 2s infinite;
}

@keyframes achievement-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

.notification.achievement-notification .notification-title {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.notification.achievement-notification .achievement-reward {
    color: #00ff88;
    font-weight: 600;
    font-size: 12px;
}

.notification.achievement-notification:hover {
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}
