@keyframes winSlideIn {
    0% {
        opacity: 0;
        transform: translateX(calc(100% + 24px)) scale(.92);
    }
    70% {
        transform: translateX(-6px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes winSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
        margin-bottom: 0;
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100% + 24px)) scale(.9);
        max-height: 0;
        margin-bottom: -12px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes winProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

@keyframes winIconPop {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(8deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes winAmountGlow {
    0%, 100% {
        text-shadow: 0 0 6px rgba(126, 172, 47, .4);
    }
    50% {
        text-shadow: 0 0 12px rgba(255, 255, 0, .6);
    }
}

#win-notifications-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 360px;
}

.win-notification {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 16px 12px;
    background: linear-gradient(135deg, rgba(29, 66, 104, .97) 0%, rgba(15, 40, 64, .98) 100%);
    border: 1px solid rgba(126, 172, 47, .45);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .45),
                0 0 0 1px rgba(255, 255, 255, .05) inset,
                0 0 20px rgba(126, 172, 47, .12);
    min-width: 300px;
    max-width: 360px;
    pointer-events: auto;
    opacity: 0;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: winSlideIn .55s cubic-bezier(.22, 1.2, .36, 1) forwards;
}

.win-notification.hiding {
    animation: winSlideOut .35s ease forwards;
}

.win-notification__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #7eac2f 0%, #ff0 50%, #7eac2f 100%);
    border-radius: 14px 0 0 14px;
}

.win-notification__icon {
    position: absolute;
    top: -6px;
    right: 36px;
    font-size: 16px;
    line-height: 1;
    background: linear-gradient(135deg, #7eac2f, #5a8a1a);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    animation: winIconPop .5s cubic-bezier(.22, 1.4, .36, 1) .15s both;
}

.win-notification__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7eac2f, #ff0);
    transform-origin: left center;
    animation: winProgress 4s linear forwards;
    border-radius: 0 0 14px 14px;
}

.win-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    cursor: pointer;
    padding-left: 6px;
    transition: opacity .2s ease;
}

.win-link:hover {
    opacity: .92;
}

.win-link:hover .win-amount {
    animation: winAmountGlow 1s ease infinite;
}

.win-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(126, 172, 47, .6);
    box-shadow: 0 0 0 3px rgba(29, 66, 104, .8),
                0 2px 8px rgba(0, 0, 0, .3);
    flex-shrink: 0;
    transition: border-color .2s ease, transform .2s ease;
}

.win-link:hover .win-avatar {
    border-color: #ff0;
    transform: scale(1.05);
}

.win-content {
    flex: 1;
    min-width: 0;
}

.win-text {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    line-height: 1.35;
    margin-bottom: 3px;
}

.win-name {
    color: #fff;
    font-weight: 700;
}

.win-amount {
    color: #ff0;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .01em;
}

.win-game {
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.win-close {
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    color: rgba(255, 255, 255, .6);
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.win-close:hover {
    background: rgba(208, 94, 14, .7);
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}

@media (max-width: 768px) {
    #win-notifications-container {
        top: auto;
        bottom: 100px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .win-notification {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 12px 12px 14px 10px;
    }

    .win-avatar {
        width: 40px;
        height: 40px;
    }

    .win-text {
        font-size: 13px;
    }

    .win-amount {
        font-size: 14px;
    }

    .win-game {
        font-size: 10px;
    }

    .win-notification__icon {
        right: 32px;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
}
