/* Loyang2 Animation Styles */

.cardAnchor {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

.anim_flight_hidden {
    visibility: hidden !important;
}

.anim_fill_img,
.flying_card_token > img,
.flying_transferred_veg > img,
.flying_planted_veg > img,
.growing_planted_veg > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.flying_planted_veg,
.flying_transferred_veg {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    will-change: transform, opacity;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}

.growing_planted_veg {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    transform-origin: center bottom;
    will-change: transform, opacity, filter;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Cash badges for paying/earning cash */
.floating_cash_badge {
    position: fixed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: bold;
    z-index: 10001;
    pointer-events: none;
    box-sizing: border-box;
    will-change: transform, opacity;
    user-select: none;
}

.floating_cash_badge .coin_icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.floating_cash_badge.earned {
    background: rgba(30, 80, 20, 0.94);
    color: #ffe066;
    border: 2px solid #f0cf55;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 10px rgba(240, 207, 85, 0.6);
}

.floating_cash_badge.spent {
    background: rgba(110, 25, 20, 0.94);
    color: #ffffff;
    border: 2px solid #e57373;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 10px rgba(229, 115, 115, 0.5);
}

/* Card flight animations */
.flying_card_token {
    position: absolute;
    pointer-events: none;
    z-index: 10002;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 16px rgba(255, 235, 150, 0.45);
    will-change: transform, opacity;
    overflow: hidden;
}

.flying_card_token img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Card reveal & draw flight animation */
.flying_draw_card_token {
    position: absolute;
    pointer-events: none;
    z-index: 10003;
    perspective: 1000px;
    will-change: transform, opacity;
}

.flying_draw_card_inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.flying_card_face {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
}

.flying_card_face_back {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.flying_card_face_front {
    transform: rotateY(180deg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 215, 0, 0.5);
}

.flying_card_face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .flying_planted_veg,
    .flying_transferred_veg,
    .growing_planted_veg,
    .floating_cash_badge,
    .flying_card_token,
    .flying_draw_card_token,
    .flying_draw_card_inner {
        animation: none !important;
        transition: none !important;
    }
}
