/**
 * ===========================================
 * GAME SHOP - Beautiful Fantasy RPG Theme
 * Inspired by: BG3, WoW, Genshin Impact, Diablo
 * Mobile-First Design
 * ===========================================
 */

/* ===================== ROOT VARIABLES ===================== */
:root {
    /* WoW Rarity Colors */
    --rarity-poor: #9d9d9d;
    --rarity-common: #ffffff;
    --rarity-uncommon: #1eff00;
    --rarity-rare: #0070dd;
    --rarity-epic: #a335ee;
    --rarity-legendary: #ff8000;

    /* Shop Theme Colors */
    --shop-bg-darkest: #0d0a14;
    --shop-bg-dark: #15111f;
    --shop-bg-medium: #1e1829;
    --shop-bg-card: #241d32;
    --shop-gold: #d4a84b;
    --shop-gold-bright: #f5d98a;
    --shop-gold-dark: #8b6914;
    --shop-arcane: #7c3aed;
    --shop-arcane-glow: #a78bfa;
    --shop-cyan: #06b6d4;
    --shop-text: #f0e6d3;
    --shop-text-dim: #a89b8c;
    --shop-text-muted: #6b5f52;
    --shop-border: rgba(212, 168, 75, 0.2);
    --shop-border-strong: rgba(212, 168, 75, 0.4);
    --shop-glass: rgba(30, 24, 41, 0.85);
}

/* ===================== MAIN CONTAINER ===================== */
.game-shop {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 168, 75, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, var(--shop-bg-darkest) 0%, var(--shop-bg-dark) 100%);
    padding-bottom: 100px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.game-shop-container {
    max-width: 100%;
    padding: 12px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .game-shop-container {
        max-width: 720px;
        padding: 20px;
    }
}

/* ===================== HEADER / BALANCE BAR ===================== */
.shop-header {
    background: var(--shop-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--shop-border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.shop-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--shop-gold), transparent);
}

.shop-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.shop-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--shop-gold);
    text-shadow: 0 2px 8px rgba(212, 168, 75, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-title-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(212, 168, 75, 0.5));
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 168, 75, 0.1);
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    padding: 8px 16px;
}

.shop-balance-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 6px rgba(212, 168, 75, 0.6));
}

.shop-balance-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--shop-gold-bright);
    font-variant-numeric: tabular-nums;
}

.shop-mage-badge {
    background: linear-gradient(135deg, var(--shop-arcane), #5b21b6);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

/* ===================== FEATURED BANNER ===================== */
.shop-featured {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 180px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(212, 168, 75, 0.1) 100%),
        var(--shop-bg-card);
    border: 2px solid var(--shop-border-strong);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(212, 168, 75, 0.1) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.shop-featured:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .shop-featured:hover {
        transform: translateY(-4px);
        border-color: var(--shop-gold);
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(212, 168, 75, 0.2);
    }
}

.shop-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    z-index: 2;
}

.shop-featured-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.shop-featured-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.shop-featured-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 20px rgba(212, 168, 75, 0.5));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.shop-featured-info {
    flex: 1;
}

.shop-featured-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.shop-featured-rarity {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.shop-featured-desc {
    font-size: 0.8rem;
    color: var(--shop-text-dim);
    margin-top: 8px;
    line-height: 1.4;
}

.shop-featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.shop-featured-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shop-featured-price-original {
    font-size: 0.8rem;
    color: var(--shop-text-muted);
    text-decoration: line-through;
}

.shop-featured-price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--shop-gold-bright);
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-featured-btn {
    background: linear-gradient(135deg, var(--shop-gold), var(--shop-gold-dark));
    color: var(--shop-bg-darkest);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-featured-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(212, 168, 75, 0.4);
}

/* ===================== CATEGORY TABS ===================== */
.shop-categories {
    display: flex;
    gap: 8px;
    padding: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.shop-categories::-webkit-scrollbar {
    display: none;
}

/* ULTRA HIGH SPECIFICITY - Nuclear option to override everything */
html body .sunwell-lobby .game-shop .game-shop-container .shop-categories button.shop-category-btn,
html body .game-shop .shop-categories button.shop-category-btn,
html body button.shop-category-btn[data-category],
.shop-category-btn,
.game-shop .shop-category-btn,
.game-shop .shop-categories .shop-category-btn,
button.shop-category-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 12px 16px !important;
    min-width: 72px !important;
    background: #1a1525 !important;
    background-color: #1a1525 !important;
    background-image: none !important;
    border: 2px solid #4a4060 !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.shop-category-btn:active {
    transform: scale(0.95);
}

.shop-category-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

/* Active state with high specificity */
html body .sunwell-lobby .game-shop .shop-categories button.shop-category-btn.active,
html body .game-shop .shop-categories button.shop-category-btn.active,
html body button.shop-category-btn.active[data-category],
.shop-category-btn.active {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.35), rgba(180, 140, 60, 0.25)) !important;
    background-color: rgba(180, 140, 60, 0.25) !important;
    border-color: var(--shop-gold) !important;
    border: 2px solid #d4a84b !important;
    color: var(--shop-gold) !important;
    color: #d4a84b !important;
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3) !important;
}

.shop-category-btn.active .shop-category-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px currentColor);
}

@media (hover: hover) {
    .shop-category-btn:hover:not(.active) {
        border-color: var(--shop-border-strong);
        color: var(--shop-text);
    }
}

/* ===================== SECTION DIVIDER ===================== */
.shop-section {
    margin-bottom: 24px;
}

.shop-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.shop-section-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 6px currentColor);
    color: var(--shop-gold);
}

.shop-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--shop-text);
}

.shop-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--shop-border-strong), transparent);
}

.shop-section-count {
    font-size: 0.75rem;
    color: var(--shop-text-muted);
    background: var(--shop-bg-card);
    padding: 4px 10px;
    border-radius: 20px;
}

/* ===================== PRODUCT GRID ===================== */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 400px) {
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* ===================== PRODUCT CARD ===================== */
.shop-card {
    position: relative;
    background: var(--shop-bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rarity border glow */
.shop-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--card-rarity-color, var(--rarity-common)), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.shop-card:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .shop-card:hover {
        transform: translateY(-6px);
        box-shadow:
            0 16px 32px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(var(--card-rarity-rgb, 255, 255, 255), 0.15);
    }
}

/* Rarity specific colors */
.shop-card.rarity-common { --card-rarity-color: var(--rarity-common); --card-rarity-rgb: 255, 255, 255; }
.shop-card.rarity-uncommon { --card-rarity-color: var(--rarity-uncommon); --card-rarity-rgb: 30, 255, 0; }
.shop-card.rarity-rare { --card-rarity-color: var(--rarity-rare); --card-rarity-rgb: 0, 112, 221; }
.shop-card.rarity-epic { --card-rarity-color: var(--rarity-epic); --card-rarity-rgb: 163, 53, 238; }
.shop-card.rarity-legendary { --card-rarity-color: var(--rarity-legendary); --card-rarity-rgb: 255, 128, 0; }

/* Card inner content */
.shop-card-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 200px;
}

/* Card badges */
.shop-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.shop-card-badge.sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.shop-card-badge.hot {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.5);
}

.shop-card-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

/* Icon area */
.shop-card-icon-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin-bottom: 12px;
}

.shop-card-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shop-card:hover .shop-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Image icons for units with custom images */
.shop-item-image-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    border-radius: 8px;
}

.shop-featured-icon .shop-item-image-icon {
    width: 80px;
    height: 80px;
}

.shop-modal-image-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Rarity indicator bar */
.shop-card-rarity-bar {
    height: 3px;
    border-radius: 2px;
    margin-bottom: 12px;
    background: var(--card-rarity-color, var(--rarity-common));
    box-shadow: 0 0 8px var(--card-rarity-color, var(--rarity-common));
}

/* Card info */
.shop-card-name {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 4px;
    line-height: 1.3;
    /* Truncate long names */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-type {
    font-size: 0.7rem;
    color: var(--shop-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.shop-card-stats {
    font-size: 0.7rem;
    color: var(--shop-cyan);
    margin-bottom: auto;
    padding-bottom: 12px;
}

/* Card footer */
.shop-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--shop-border);
    margin-top: auto;
}

.shop-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shop-card-price-original {
    font-size: 0.65rem;
    color: var(--shop-text-muted);
    text-decoration: line-through;
}

.shop-card-price-current {
    font-size: 1rem;
    font-weight: 700;
    color: var(--shop-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-card-price-icon {
    font-size: 0.9rem;
}

.shop-card-buy {
    background: linear-gradient(135deg, var(--shop-arcane), #5b21b6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-card-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
}

.shop-card-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================== EMPTY STATE ===================== */
.shop-empty {
    text-align: center;
    padding: 60px 20px;
}

.shop-empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 16px;
}

.shop-empty-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--shop-text-dim);
    margin-bottom: 8px;
}

.shop-empty-text {
    font-size: 0.9rem;
    color: var(--shop-text-muted);
}

/* ===================== LOADING STATE ===================== */
.shop-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.shop-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--shop-border);
    border-top-color: var(--shop-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.shop-loading-text {
    color: var(--shop-text-dim);
    font-size: 0.9rem;
}

/* ===================== PURCHASE MODAL ===================== */
.shop-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.shop-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shop-modal {
    background: linear-gradient(180deg, var(--shop-bg-medium), var(--shop-bg-dark));
    border: 2px solid var(--shop-border-strong);
    border-radius: 20px;
    max-width: 340px;
    width: 100%;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 168, 75, 0.1);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px); /* Dynamic viewport height for mobile */
    overflow-y: auto;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.shop-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--shop-bg-card);
    border: 1px solid var(--shop-border);
    color: var(--shop-text);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.shop-modal-close:hover {
    background: var(--shop-arcane);
    border-color: var(--shop-arcane);
    transform: rotate(90deg);
}

/* Modal Header */
.shop-modal-header {
    padding: 16px 16px 0;
    text-align: center;
}

.shop-modal-icon {
    font-size: 2.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
    height: 56px;
}

.shop-modal-icon img {
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

.shop-modal-name {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.shop-modal-rarity {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal Body */
.shop-modal-body {
    padding: 12px 16px;
}

.shop-modal-desc {
    text-align: center;
    color: var(--shop-text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.shop-modal-stats {
    background: var(--shop-bg-card);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.shop-modal-stat {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--shop-border);
}

.shop-modal-stat:last-child {
    border-bottom: none;
}

.shop-modal-stat-label {
    color: var(--shop-text-muted);
    font-size: 0.75rem;
}

.shop-modal-stat-value {
    color: var(--shop-cyan);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Modal Footer */
.shop-modal-footer {
    padding: 0 16px 16px;
}

.shop-modal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(212, 168, 75, 0.1);
    border: 1px solid var(--shop-border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.shop-modal-price-label {
    color: var(--shop-text-dim);
    font-size: 0.8rem;
}

.shop-modal-price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--shop-gold-bright);
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-modal-balance {
    text-align: center;
    font-size: 0.75rem;
    color: var(--shop-text-muted);
    margin-bottom: 10px;
}

.shop-modal-balance.insufficient {
    color: #ef4444;
}

.shop-modal-confirm {
    width: 100%;
    background: linear-gradient(135deg, var(--shop-gold), var(--shop-gold-dark));
    color: var(--shop-bg-darkest);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-modal-confirm:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(212, 168, 75, 0.4);
}

.shop-modal-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================== SUCCESS OVERLAY ===================== */
.shop-success {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 10, 20, 0.98);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.shop-success.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.shop-success-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-success-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 8px 24px rgba(212, 168, 75, 0.5));
}

@keyframes successPop {
    0% { transform: scale(0) rotate(-20deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

.shop-success-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--shop-gold);
    text-align: center;
    margin-bottom: 8px;
}

.shop-success-text {
    color: var(--shop-text-dim);
    text-align: center;
    font-size: 1rem;
}

/* Particles effect */
.shop-success::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--shop-gold) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, var(--shop-arcane) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, var(--shop-gold) 1px, transparent 1px),
        radial-gradient(circle at 60% 80%, var(--shop-arcane) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: particles 2s linear infinite;
    opacity: 0.3;
}

@keyframes particles {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* ===================== SCROLLBAR STYLING ===================== */
.game-shop ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.game-shop ::-webkit-scrollbar-track {
    background: var(--shop-bg-dark);
}

.game-shop ::-webkit-scrollbar-thumb {
    background: var(--shop-border-strong);
    border-radius: 3px;
}

.game-shop ::-webkit-scrollbar-thumb:hover {
    background: var(--shop-gold);
}

/* ===================== TOUCH OPTIMIZATIONS ===================== */
@media (pointer: coarse) {
    .shop-card,
    .shop-category-btn,
    .shop-featured {
        -webkit-tap-highlight-color: transparent;
    }

    .shop-card-buy,
    .shop-modal-confirm,
    .shop-featured-btn {
        min-height: 44px;
    }
}

/* ===================== SAFE AREA (iOS) ===================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .game-shop {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
}
