/* Shop Styles - Casino/Pachinko Parlor Feel */
/* Designed to fit on single screen without scrolling */

#shop-screen {
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.shop-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 95vw;
    max-height: 100vh;
    padding: clamp(8px, 1.5vh, 24px);
    gap: clamp(6px, 1vh, 16px);
    box-sizing: border-box;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(6px, 1vh, 16px) clamp(12px, 2vh, 24px);
    background: var(--bg-medium);
    flex-shrink: 0;
    box-shadow:
        inset -4px -4px 0 0 #0a0a0f,
        inset 4px 4px 0 0 #2a2a3a,
        0 0 0 3px var(--gold),
        4px 4px 0 0 rgba(0, 0, 0, 0.4);
}

.shop-header h2 {
    font-family: var(--font-pixel);
    font-size: clamp(12px, 2vh, 24px);
    color: var(--gold);
    text-shadow:
        0 0 10px var(--gold),
        3px 3px 0 #8B4513;
    letter-spacing: 3px;
}

.shop-money {
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
    font-family: var(--font-pixel);
    font-size: clamp(12px, 1.8vh, 22px);
    color: var(--gold);
    text-shadow: 2px 2px 0 #8B4513;
}

.money-icon {
    font-size: clamp(14px, 2vh, 24px);
    animation: coin-pulse 2s infinite;
}

@keyframes coin-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.shop-sections {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(6px, 1vh, 16px);
    min-height: 0;
    overflow: hidden;
}

.shop-section {
    background: var(--bg-medium);
    padding: clamp(6px, 1vh, 16px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow:
        inset -4px -4px 0 0 #0a0a0f,
        inset 4px 4px 0 0 #2a2a3a,
        0 0 0 3px var(--border-color),
        4px 4px 0 0 rgba(0, 0, 0, 0.4);
}

.shop-section .section-header {
    flex-shrink: 0;
    margin-bottom: clamp(4px, 0.8vh, 12px);
}

.shop-items {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 0.8vh, 12px);
    justify-content: center;
    align-content: flex-start;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--gap-xs);
}

/* Shop Card - For Sale */
.shop-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.shop-card.sold {
    opacity: 0.3;
    pointer-events: none;
}

.shop-card .card-cost {
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    animation: cost-bounce 2s infinite;
}

@keyframes cost-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.shop-card:hover .card-cost {
    animation: cost-shake 0.3s ease;
}

@keyframes cost-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Pack Display */
.pack {
    width: clamp(100px, 12vw, 140px);
    height: clamp(140px, 16vw, 200px);
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-medium) 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 
        inset -4px -4px 0 0 #0a0a0f,
        inset 4px 4px 0 0 #2a2a3a,
        0 0 0 3px var(--border-color),
        0 8px 0 0 rgba(0, 0, 0, 0.4),
        0 12px 20px rgba(0, 0, 0, 0.3);
}

.pack::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            rgba(255, 255, 255, 0.03) 4px,
            rgba(255, 255, 255, 0.03) 8px
        );
    border-radius: 8px;
}

.pack:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 
        inset -4px -4px 0 0 #1a1a2f,
        inset 4px 4px 0 0 #3a3a5a,
        0 0 0 3px var(--blue-medium),
        0 15px 0 0 rgba(0, 0, 0, 0.3),
        0 25px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(59, 130, 246, 0.3);
}

/* Pack Types */
.pack.arcana {
    background: linear-gradient(180deg, #2d1f3d 0%, #1a1025 100%);
    box-shadow: 
        inset -4px -4px 0 0 #1a1025,
        inset 4px 4px 0 0 #4a3a6a,
        0 0 0 3px var(--purple),
        0 8px 0 0 #0d0812,
        0 12px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(139, 92, 246, 0.2);
}

.pack.celestial {
    background: linear-gradient(180deg, #1e3a5f 0%, #0c1929 100%);
    box-shadow: 
        inset -4px -4px 0 0 #0c1929,
        inset 4px 4px 0 0 #2a5a8f,
        0 0 0 3px var(--cyan),
        0 8px 0 0 #060d14,
        0 12px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(34, 211, 238, 0.2);
}

.pack.spectral {
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a25 100%);
    animation: spectral-shimmer 3s infinite;
}

.pack.standard {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
}

.pack-icon {
    font-size: clamp(32px, 5vh, 48px);
    z-index: 2;
}

.pack-name {
    font-family: var(--font-pixel);
    font-size: clamp(7px, 0.9vh, 10px);
    color: var(--text-medium);
    text-transform: uppercase;
    text-align: center;
    z-index: 2;
}

.pack-info {
    font-family: var(--font-retro);
    font-size: clamp(12px, 1.5vh, 16px);
    color: var(--text-dim);
    z-index: 2;
}

.pack-cost {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold) 0%, #f59e0b 100%);
    padding: 4px 12px;
    font-family: var(--font-pixel);
    font-size: clamp(8px, 1vh, 12px);
    color: #1c1917;
    font-weight: bold;
    z-index: 10;
    box-shadow: 
        inset -2px -2px 0 0 #92400e,
        inset 2px 2px 0 0 #fde68a,
        0 2px 0 0 #78350f;
}

/* Shop Actions */
.shop-actions {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 1.5vh, 24px);
    padding: clamp(6px, 1vh, 16px);
    flex-shrink: 0;
}

/* Voucher Display */
.voucher {
    width: clamp(120px, 15vw, 180px);
    height: clamp(70px, 9vw, 100px);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 
        inset -3px -3px 0 0 #d97706,
        inset 3px 3px 0 0 #fef9c3,
        0 0 0 2px #92400e,
        4px 4px 0 0 rgba(0, 0, 0, 0.4);
    /* Ticket perforations */
    background-image: 
        radial-gradient(circle at 0% 50%, var(--bg-dark) 8px, transparent 8px),
        radial-gradient(circle at 100% 50%, var(--bg-dark) 8px, transparent 8px);
}

.voucher:hover {
    transform: translateY(-8px) rotate(-2deg) scale(1.05);
    box-shadow: 
        inset -3px -3px 0 0 #b45309,
        inset 3px 3px 0 0 #fffbeb,
        0 0 0 2px var(--gold),
        6px 6px 0 0 rgba(0, 0, 0, 0.4),
        0 0 20px rgba(251, 191, 36, 0.4);
}

.voucher-name {
    font-family: var(--font-pixel);
    font-size: clamp(8px, 1vh, 12px);
    color: #78350f;
    text-transform: uppercase;
    text-align: center;
}

.voucher-effect {
    font-family: var(--font-retro);
    font-size: clamp(10px, 1.2vh, 14px);
    color: #92400e;
    text-align: center;
}

/* Pack Opening Animation */
.pack-opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.pack-cards {
    display: flex;
    gap: var(--gap-md);
    perspective: var(--perspective);
}

.pack-cards .card {
    animation: pack-reveal 0.6s ease forwards;
    animation-delay: calc(var(--card-index) * 0.2s);
    opacity: 0;
    transform: translateY(-100px) rotateY(180deg);
}

@keyframes pack-reveal {
    0% {
        opacity: 0;
        transform: translateY(-100px) rotateY(180deg) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(20px) rotateY(90deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0deg) scale(1);
    }
}

/* Sold Out Badge */
.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: var(--red);
    color: white;
    font-family: var(--font-pixel);
    font-size: clamp(10px, 1.2vh, 14px);
    padding: 4px 12px;
    text-transform: uppercase;
    z-index: 20;
    box-shadow: 0 2px 0 0 #7f1d1d;
}

/* Reroll Counter */
.reroll-cost {
    font-family: var(--font-pixel);
    color: var(--gold);
}

/* Skip Button */
.shop-skip {
    position: absolute;
    bottom: var(--gap-lg);
    right: var(--gap-lg);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.shop-skip:hover {
    opacity: 1;
}
