/* Live Chat Overlay inside the Video Player */
.live-chat-overlay {
    position: absolute;
    bottom: 120px;
    left: 15px;
    width: 65%;
    height: 250px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 15;
    pointer-events: none; /* Let clicks pass through to the video */
}

.chat-message {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 6px 12px;
    margin-bottom: 8px;
    color: white;
    font-size: 0.85rem;
    align-self: flex-start;
    animation: slideInLeft 0.3s ease-out;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.8);
}

.chat-message.gift-alert {
    background: linear-gradient(90deg, rgba(255,44,85,0.8) 0%, rgba(255,165,0,0.8) 100%);
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.3);
}

.chat-username {
    color: #ffd700;
    font-weight: bold;
    margin-right: 5px;
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-30px); opacity: 0; }
}

/* Screen-wide Gift Animations */
.gift-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Small Gift: Fly from bottom to top right */
.gift-rose {
    position: absolute;
    bottom: 50px;
    left: 50%;
    font-size: 3rem;
    animation: flyUpRight 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes flyUpRight {
    0% { transform: translate(-50%, 0) scale(0.5); opacity: 1; }
    50% { transform: translate(50px, -300px) scale(1.5); opacity: 1; }
    100% { transform: translate(100px, -600px) scale(1); opacity: 0; }
}

/* Huge Gift: Lion/Car popping in center */
.gift-lion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    animation: lionRoar 3s ease-in-out forwards;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

@keyframes lionRoar {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
