/* css/shop-system.css */

/* HUD Shop Trigger */
.hud-currency.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-currency.clickable:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(244, 197, 66, 0.6));
}

.shop-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.shop-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.shop-modal-content {
    background: linear-gradient(170deg, #0f1a2e 0%, #0a0f1e 100%);
    border: 1px solid rgba(244, 197, 66, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(244, 197, 66, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.shop-modal-overlay.active .shop-modal-content {
    transform: scale(1);
}

.shop-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, rgba(244, 197, 66, 0.05), transparent);
}

.shop-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #f4c542;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.shop-balance-bar {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.coin-display {
    color: #f4c542;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(244, 197, 66, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(244, 197, 66, 0.2);
}

.shop-tabs {
    display: flex;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
}

.shop-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.shop-tab:hover {
    color: #fff;
}

.shop-tab.active {
    color: #f4c542;
}

.shop-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f4c542;
    box-shadow: 0 -2px 10px rgba(244, 197, 66, 0.5);
}

.shop-grid {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 197, 66, 0.3) transparent;
}

.shop-grid::-webkit-scrollbar {
    width: 6px;
}

.shop-grid::-webkit-scrollbar-thumb {
    background: rgba(244, 197, 66, 0.3);
    border-radius: 3px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.shop-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(244, 197, 66, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.shop-item.owned {
    opacity: 0.7;
}

.shop-item.owned::after {
    content: 'OWNED';
    position: absolute;
    top: 15px;
    right: -25px;
    background: #4ade80;
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 30px;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.shop-item-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.shop-item-info h3 {
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 5px 0;
}

.shop-item-type {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.shop-item-action {
    margin-top: auto;
    width: 100%;
}

.shop-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shop-btn.buy {
    background: linear-gradient(135deg, #f4c542, #ffb700);
    color: #000;
}

.shop-btn.buy:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(244, 197, 66, 0.4);
}

.shop-btn.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .shop-header {
        padding: 20px;
    }
    .shop-header h2 {
        font-size: 1.4rem;
    }
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 15px;
        gap: 15px;
    }
    .shop-item {
        padding: 15px;
    }
    .shop-item-icon {
        font-size: 2.5rem;
    }
}
