/* ========================================================================== */
/* MODULE 6 STYLES: COIN SHOP, FREE GIFT & WATCH AD (css/shop.css)             */
/* Senior Game Developer Architecture Standard - 100% Mobile Responsive UI    */
/* ========================================================================== */

.shop-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 20, 0.78);
    /* backdrop-filter removed for 60fps mobile performance */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 12px 16px 12px;
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.shop-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Coin Store Card with Safe Top Boundary for Banner */
.shop-card {
    position: relative;
    width: 88%;
    max-width: 330px;
    max-height: calc(86vh - 24px);
    background: linear-gradient(180deg, #2b1f47 0%, #171129 100%);
    border: 4.5px solid #7c4dff;
    border-radius: 34px;
    padding: 36px 10px 14px 10px;
    margin-top: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.7), inset 0 3px 6px rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.shop-header-banner {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    height: 48px;
    background: linear-gradient(180deg, #7c4dff 0%, #512da8 100%);
    border: 3px solid #ffffff;
    border-radius: 24px;
    box-shadow: 0 5px 0 #311b92, 0 8px 12px rgba(0,0,0,0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.shop-header-banner .banner-text {
    color: #ffea4c;
    font-family: 'Fredoka One', cursive;
    font-size: 23px;
    letter-spacing: 1px;
    -webkit-text-stroke: 2px #1b132b;
    paint-order: stroke fill;
    text-shadow: 0 3px 5px rgba(0,0,0,0.35);
}

.shop-scroll-wrapper {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    contain: layout paint style;
}

.shop-scroll-wrapper::-webkit-scrollbar {
    width: 4px;
}
.shop-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #7c4dff;
    border-radius: 4px;
}

.shop-section-title {
    color: #ffea4c;
    font-family: 'Fredoka One', cursive;
    font-size: 14.5px;
    letter-spacing: 0.5px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-packs-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shop-pack-item {
    position: relative;
    background: #241a3c;
    border: 2px solid #53398b;
    border-radius: 18px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.shop-pack-item.free-pack {
    border-color: #ffea4c;
}

.pack-popular-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffea4c 0%, #ff9d00 100%);
    border: 1.5px solid #ffffff;
    border-radius: 10px;
    padding: 1px 8px;
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 9.5px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.pack-free-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #7bed2f 0%, #26c014 100%);
    border: 1.5px solid #ffffff;
    border-radius: 10px;
    padding: 1px 8px;
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 9.5px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.pack-coin-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    margin-top: 2px;
}

.pack-amount {
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 17px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.pack-buy-btn {
    position: relative;
    width: 100%;
    height: 36px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(180deg, #7bed2f 0%, #26c014 100%);
    box-shadow: 0 4px 0 #1a850e, 0 6px 8px rgba(0,0,0,0.25), inset 0 2px 2px rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s ease;
}

.pack-buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0) 100%);
    border-radius: 18px 18px 50% 50% / 18px 18px 10px 10px;
    pointer-events: none;
}

.pack-buy-btn.btn-blue {
    background: linear-gradient(180deg, #52c4ff 0%, #1a94ff 100%);
    box-shadow: 0 4px 0 #0f6bbd, 0 6px 8px rgba(0,0,0,0.25), inset 0 2px 2px rgba(255,255,255,0.7);
}

.pack-buy-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1a850e;
}
.pack-buy-btn.btn-blue:active {
    box-shadow: 0 2px 0 #0f6bbd;
}

.pack-price-text {
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 14.5px;
    letter-spacing: 0.5px;
    z-index: 5;
    -webkit-text-stroke: 1.5px #1b132b;
    paint-order: stroke fill;
    text-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

/* -------------------------------------------------------------------------- */
/* FREE GIFT WATCH AD POPUP CARD (WOODEN FRAME CARD)                          */
/* -------------------------------------------------------------------------- */
.free-gift-card {
    position: relative;
    width: 86%;
    max-width: 320px;
    max-height: calc(86vh - 24px);
    background: linear-gradient(180deg, #5c3a21 0%, #3d2412 100%);
    border: 5px solid #8d562b;
    border-radius: 32px;
    padding: 34px 16px 20px 16px;
    margin-top: 18px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.75), inset 0 3px 6px rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.wooden-header-banner {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 74%;
    height: 48px;
    background: linear-gradient(180deg, #a66a38 0%, #6e421f 100%);
    border: 3px solid #fce8a6;
    border-radius: 20px;
    box-shadow: 0 5px 0 #422610, 0 8px 12px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-text-gold {
    color: #ffea4c;
    font-size: 25px;
    letter-spacing: 1px;
    -webkit-text-stroke: 2px #2d180a;
    paint-order: stroke fill;
    text-shadow: 0 3px 5px rgba(0,0,0,0.4);
}

.wooden-close-btn {
    position: absolute;
    top: -12px;
    right: -10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid #ffffff;
    background: linear-gradient(180deg, #ff5252 0%, #c62828 100%);
    box-shadow: 0 5px 0 #8e0000, 0 8px 12px rgba(0,0,0,0.35);
    color: #ffffff;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.wooden-close-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #8e0000;
}

.free-gift-message {
    color: #fce8a6;
    font-size: 15px;
    line-height: 1.3;
    margin-top: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.free-gift-graphic-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2px 0;
}

.free-gift-tv-img {
    width: 200px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
}

.action-btn-blue-watch {
    position: relative;
    width: 72%;
    height: 50px;
    border-radius: 25px;
    border: none;
    background: linear-gradient(180deg, #42a5f5 0%, #1e88e5 100%);
    box-shadow: 0 6px 0 #0d47a1, 0 10px 14px rgba(0,0,0,0.35), inset 0 2px 2px rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.1s ease;
}

.action-btn-blue-watch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0) 100%);
    border-radius: 24px 24px 50% 50% / 24px 24px 12px 12px;
    pointer-events: none;
}

.action-btn-blue-watch:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0d47a1;
}

.watch-btn-text {
    color: #ffffff;
    font-size: 24px;
    letter-spacing: 0.5px;
    z-index: 5;
    -webkit-text-stroke: 2px #0a3266;
    paint-order: stroke fill;
    text-shadow: 0 3px 5px rgba(0,0,0,0.4);
}

/* -------------------------------------------------------------------------- */
/* MEDIA QUERIES FOR SMALL SCREEN / COMPACT MOBILE DEVICES                    */
/* -------------------------------------------------------------------------- */
@media (max-height: 680px) {
    .shop-modal-overlay {
        padding: 24px 8px 10px 8px;
    }
    .shop-card {
        max-height: calc(90vh - 20px);
        margin-top: 14px;
        padding-top: 32px;
    }
    .shop-header-banner {
        height: 42px;
        top: -20px;
    }
    .shop-header-banner .banner-text {
        font-size: 20px;
    }
    .pack-coin-img {
        width: 40px;
        height: 40px;
    }
}
