/* Trade Central Animations */

/* Card selection animation */
.card.selected {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Trade offer creation animation */
@keyframes tradeOfferPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.trade-offer-new {
    animation: tradeOfferPulse 1.5s ease-in-out;
}

/* Trade completion animation */
@keyframes tradeComplete {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(0.5) translateY(100px); }
}

.trade-complete {
    animation: tradeComplete 0.8s forwards;
}

/* Card transfer animation */
@keyframes cardTransfer {
    0% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateX(var(--transfer-distance, 300px)) scale(0.8) translateY(-50px);
        opacity: 0.7;
    }
    100% { 
        transform: translateX(var(--transfer-distance, 300px)) scale(0) translateY(0);
        opacity: 0;
    }
}

.card-transferring {
    animation: cardTransfer 1s forwards;
    pointer-events: none;
}

/* Card receiving animation */
@keyframes cardReceive {
    0% { 
        transform: translateX(var(--receive-distance, -300px)) scale(0);
        opacity: 0;
    }
    70% { 
        transform: translateX(0) scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.card-receiving {
    animation: cardReceive 1s forwards;
}

/* Shine effect for cards */
@keyframes cardShine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.card.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: cardShine 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

/* Random offer refresh animation */
@keyframes refreshSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.refresh-spinning {
    animation: refreshSpin 0.8s ease-in-out;
}

/* Trade confirmation animation */
@keyframes confirmPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 255, 0, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 255, 0, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 255, 0, 0); }
}

.trade-confirm-pulse {
    animation: confirmPulse 1s ease-in-out;
}

/* Trade cancel animation */
@keyframes cancelShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.trade-cancel-shake {
    animation: cancelShake 0.5s ease-in-out;
}

/* Floating notification for trade events */
@keyframes floatNotification {
    0% { transform: translateY(20px); opacity: 0; }
    10% { transform: translateY(0); opacity: 1; }
    90% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-20px); opacity: 0; }
}

.trade-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    animation: floatNotification 3s forwards;
}

/* Card hover effect in trade view */
.trade-card-container .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trade-card-container .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* Trade section transition */
.trade-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.trade-section.active-section {
    opacity: 1;
    transform: translateY(0);
}
/* Trade animation overlay */
.trade-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.trade-animation-card {
    position: absolute;
    transition: transform 1s ease, opacity 1s ease;
}

/* Trade animation text */
.trade-animation-text {
    position: absolute;
    font-size: 3rem;
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.7);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
    z-index: 10;
}

.trade-animation-text.animate-text {
    opacity: 1;
    transform: scale(1);
    animation: pulseText 1.5s ease-in-out;
}

@keyframes pulseText {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.trade-animation-card.offered-card {
    transform: translateX(-150px) rotate(-5deg);
}

.trade-animation-card.received-card {
    transform: translateX(150px) rotate(5deg);
    opacity: 0;
}

.trade-animation-card.offered-card.animate-out {
    transform: translateX(-300px) rotate(-15deg);
    opacity: 0;
}

.trade-animation-card.received-card.animate-in {
    transform: translateX(0) rotate(0);
    opacity: 1;
}

/* Trade particles */
.trade-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes particleFade {
    0% {
        transform: scale(0) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(-100px);
        opacity: 0;
    }
}

/* Fade-in animation for trade lists */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}