/* Spend Bill Gates 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(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(59, 130, 246, 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: 1rem;
    font-weight: bold;
    color: #10b981;
}

.item-price.luxury {
    color: #a855f7;
}

.item-price.expensive {
    color: #ef4444;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 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(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quantity-btn.buy:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.quantity-btn.sell:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.quantity-display {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    min-width: 2rem;
    text-align: center;
}

/* Animations */
.item-purchased {
    animation: purchased 0.3s ease;
}

.item-sold {
    animation: sold 0.3s ease;
}

@keyframes purchased {
    0% {
        transform: scale(1);
        border-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        border-color: rgba(34, 197, 94, 0.6);
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    }
    100% {
        transform: scale(1);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

@keyframes sold {
    0% {
        transform: scale(1);
        border-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        border-color: rgba(239, 68, 68, 0.6);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    }
    100% {
        transform: scale(1);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Money Display */
.money-change {
    animation: moneyPulse 0.5s ease;
}

.low-money {
    color: #ef4444 !important;
    animation: lowMoneyBlink 1s infinite;
}

@keyframes moneyPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes lowMoneyBlink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Category Headers */
.category-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(59, 130, 246, 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, #3b82f6, #a855f7);
    -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);
    margin-bottom: 0.5rem;
}

.receipt-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.receipt-total {
    border-top: 2px solid rgba(59, 130, 246, 0.3);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Timer Styles */
.timer-running {
    animation: timerPulse 2s infinite;
}

@keyframes timerPulse {
    0% {
        color: #fbbf24;
    }
    50% {
        color: #f59e0b;
    }
    100% {
        color: #fbbf24;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .shopping-item {
        padding: 1rem;
    }

    .quantity-controls {
        gap: 0.5rem;
    }

    .quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .quantity-display {
        font-size: 1rem;
        min-width: 1.5rem;
    }
}

/* Game Header Styles */
.game-header {
    position: relative;
}

/* Print Styles */
@media print {
    .shopping-item,
    .game-header,
    #floating-money {
        display: none !important;
    }

    #receipt-content {
        display: block !important;
    }
}
