/* Spend Elon Musk Money Game Styles */

/* Shopping Item Card */
.shopping-item {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shopping-item:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(34, 197, 94, 0.15);
}

.shopping-item.luxury {
    border-color: rgba(168, 85, 247, 0.3);
}

.shopping-item.luxury:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(168, 85, 247, 0.15);
}

.shopping-item.expensive {
    border-color: rgba(239, 68, 68, 0.3);
}

.shopping-item.expensive:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(239, 68, 68, 0.15);
}

/* Item Image */
.item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Price Display */
.item-price {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-price.luxury {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-price.expensive {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quantity-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    transform: scale(1.05);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quantity-btn.sell {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.quantity-btn.sell:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.quantity-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    min-width: 60px;
    text-align: center;
}

/* Money Display Animation */
.money-change {
    animation: moneyPulse 0.5s ease-in-out;
}

@keyframes moneyPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Timer Styles */
.timer-running {
    color: #10b981;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Category Headers */
.category-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Money Display */
#floating-money {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#floating-money.animate-fade-in {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile responsiveness for floating display */
@media (max-width: 640px) {
    #floating-money {
        right: 1rem !important;
        top: 1rem !important;
        padding: 0.75rem !important;
    }

    #floating-money .text-lg {
        font-size: 1rem !important;
    }

    #floating-money .text-2xl {
        font-size: 1.5rem !important;
    }
}

/* Receipt Styles */
.receipt-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-total {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shopping-item {
        padding: 1rem;
    }

    .item-image {
        width: 60px;
        height: 60px;
    }

    .item-price {
        font-size: 1rem;
    }

    .quantity-btn {
        width: 35px;
        height: 35px;
    }

    .quantity-display {
        font-size: 1.25rem;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .shopping-item {
        padding: 0.75rem;
    }

    .quantity-controls {
        gap: 0.5rem;
    }
}

/* Animations for item purchase */
.item-purchased {
    animation: purchaseFlash 0.3s ease-in-out;
}

@keyframes purchaseFlash {
    0% {
        background-color: rgba(34, 197, 94, 0.1);
    }
    50% {
        background-color: rgba(34, 197, 94, 0.3);
    }
    100% {
        background-color: rgba(15, 23, 42, 0.8);
    }
}

.item-sold {
    animation: sellFlash 0.3s ease-in-out;
}

@keyframes sellFlash {
    0% {
        background-color: rgba(239, 68, 68, 0.1);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.3);
    }
    100% {
        background-color: rgba(15, 23, 42, 0.8);
    }
}

/* Low money warning */
.low-money {
    color: #ef4444 !important;
    animation: lowMoneyPulse 1s infinite;
}

@keyframes lowMoneyPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}
