/**
 * NextBall - Banner Shop Styles
 */

/* ============================================
   SHOP BUTTON
   ============================================ */
.btn-shop {
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #000 !important;
    font-weight: 700;
    border: none;
    text-shadow: none;
}

.btn-shop:hover {
    background: linear-gradient(135deg, #ffea00, #ffa500) !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ============================================
   SHOP MODAL
   ============================================ */
#shop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#shop-modal:not(.hidden) {
    display: flex;
}

.shop-panel {
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    background: linear-gradient(180deg, #12121a 0%, #0a0a12 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.1);
}

/* Header */
.shop-panel .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, transparent 50%, rgba(255, 215, 0, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.shop-panel .modal-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    font-size: 18px;
    font-weight: 700;
    color: #FFD700;
}

/* Tabs */
.shop-tabs {
    display: flex;
    padding: 0 30px;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shop-tabs .tab-btn {
    padding: 15px 25px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
}

.shop-tabs .tab-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.shop-tabs .tab-btn.active {
    color: #FFD700;
}

.shop-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

/* Content */
#shop-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px 30px;
}

#shop-content::-webkit-scrollbar {
    width: 8px;
}

#shop-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#shop-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

/* Loading */
.shop-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: rgba(255, 255, 255, 0.5);
}

.shop-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.shop-empty {
    text-align: center;
    padding: 60px 20px;
}

.shop-empty .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.shop-empty h3 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.shop-empty p {
    color: rgba(255, 255, 255, 0.4);
}

/* Section */
.shop-section {
    margin-bottom: 35px;
}

.rarity-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 3px solid currentColor;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rarity-icon {
    font-size: 12px;
}

/* ============================================
   BANNER GRID & CARDS
   ============================================ */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.banner-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.banner-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.banner-card.owned {
    border-color: rgba(0, 255, 100, 0.3);
}

.banner-card.equipped {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
}

/* Preview */
.banner-preview-container {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.banner-preview-container .player-banner-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    min-width: 180px;
}

.banner-preview-container .preview-rank {
    font-size: 16px;
}

.banner-preview-container .preview-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Info */
.banner-info {
    padding: 15px 18px;
    text-align: center;
}

.banner-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.banner-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    line-height: 1.4;
}

.banner-rarity {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* Actions */
.banner-actions {
    padding: 0 18px 18px;
}

.banner-actions .btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-actions .btn-buy {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
}

.banner-actions .btn-buy:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

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

.banner-actions .btn-equip {
    background: linear-gradient(135deg, #00FF64, #00CC50);
    color: #000;
}

.banner-actions .btn-equip:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.5);
}

.banner-actions .btn-equipped {
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
}

/* Footer */
.shop-panel .modal-footer {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.shop-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin: 0;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.shop-notification {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 2000;
    transform: translateX(150%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.shop-notification.show {
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #00FF64, #00CC50);
    color: #000;
}

.notification-error {
    background: linear-gradient(135deg, #FF4444, #CC0000);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
}

/* ============================================
   COIN REWARD POPUP
   ============================================ */
.coin-reward-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 40px 60px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 140, 0, 0.95));
    border-radius: 20px;
    text-align: center;
    z-index: 2000;
    animation: coin-popup 2.5s ease-out forwards;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.5);
}

.coin-reward-popup .coin-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.coin-reward-popup .coin-amount {
    font-size: 42px;
    font-weight: 900;
    color: #1a1a2e;
}

.coin-reward-popup .coin-label {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes coin-popup {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    25% { transform: translate(-50%, -50%) scale(1); }
    75% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -60%) scale(0.9); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .shop-panel {
        width: 98%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .shop-panel .modal-header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .shop-panel .modal-header h2 {
        font-size: 20px;
    }

    .shop-tabs {
        padding: 0 15px;
    }

    .shop-tabs .tab-btn {
        padding: 12px 18px;
        font-size: 12px;
    }

    #shop-content {
        padding: 15px;
    }

    .banner-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
