#fortnite-gift-showcase { width: 100%; margin: 0; padding: 0 18px; color: #f5f7fb; box-sizing: border-box; }
#fortnite-gift-showcase * { box-sizing: border-box; letter-spacing: 0; }
#fortnite-gift-showcase [hidden] { display: none !important; }

/* Translucent Glassmorphic Cyan Button (تصميم زجاجي شفاف أسطوري) */
#fortnite-gift-showcase button {
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 10px;
    min-height: 36px;
    padding: 7px 12px;
    background: rgba(34, 211, 238, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #e0f7ff;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
#fortnite-gift-showcase button:hover {
    background: rgba(34, 211, 238, 0.32);
    border-color: rgba(56, 189, 248, 0.9);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45), 0 0 16px rgba(34, 211, 238, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
    color: #ffffff;
}
#fortnite-gift-showcase button:active {
    transform: translateY(0);
    background: rgba(34, 211, 238, 0.22);
}
#fortnite-gift-showcase button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none !important;
}
#fortnite-gift-showcase button span {
    color: #e0f7ff !important;
    white-space: nowrap;
    transition: color 0.2s ease;
}
#fortnite-gift-showcase button i {
    color: #38bdf8 !important;
    font-size: 12px;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
    transition: transform 0.2s ease, color 0.2s ease;
}
#fortnite-gift-showcase button:hover span {
    color: #ffffff !important;
}
#fortnite-gift-showcase button:hover i {
    color: #ffffff !important;
    transform: scale(1.15);
}
#fortnite-gift-showcase button:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

#fortnite-gift-showcase .fg-featured {
    max-width: 1100px;
    margin-inline: auto;
    padding-top: 18px;
}
#fortnite-gift-showcase h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
    color: #e0f2fe;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: start;
}
#fortnite-gift-showcase h3::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #38bdf8, #818cf8);
    display: inline-block;
}

/* 5 Cards on the same row */
#fortnite-gift-showcase .fg-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

/* Compact Full-bleed Card with Image Fill */
#fortnite-gift-showcase .fg-card {
    min-width: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: #0b111e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-align: start;
    height: 236px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}
#fortnite-gift-showcase .fg-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Image Fill covering the entire card background */
#fortnite-gift-showcase .fg-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: #111a2e;
}
#fortnite-gift-showcase .fg-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#fortnite-gift-showcase .fg-card:hover .fg-art img {
    transform: scale(1.06);
}

/* Atmospheric gradient overlay for readable overlaid text */
#fortnite-gift-showcase .fg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(8, 12, 22, 0.12) 0%, rgba(8, 12, 22, 0.45) 45%, rgba(6, 10, 18, 0.94) 100%);
    pointer-events: none;
    transition: background 0.28s ease;
}
#fortnite-gift-showcase .fg-card:hover::before {
    background: linear-gradient(180deg, rgba(8, 12, 22, 0.06) 0%, rgba(8, 12, 22, 0.38) 40%, rgba(6, 10, 18, 0.96) 100%);
}

/* The 5th card: "اختار أي جيفت" */
#fortnite-gift-showcase .fg-custom-card {
    border-color: rgba(168, 85, 247, 0.35);
    background: radial-gradient(circle at 50% 25%, rgba(168, 85, 247, 0.22), transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.18), transparent 50%),
                linear-gradient(145deg, #13122c 0%, #090e1a 100%);
}
#fortnite-gift-showcase .fg-custom-card:hover {
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(168, 85, 247, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}
#fortnite-gift-showcase .fg-custom-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding-bottom: 72px;
}
#fortnite-gift-showcase .fg-custom-art i {
    font-size: 46px;
    color: #c084fc;
    filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.6));
    transition: transform 0.3s ease;
}
#fortnite-gift-showcase .fg-custom-card:hover .fg-custom-art i {
    transform: scale(1.1) rotate(5deg);
    color: #e9d5ff;
}

/* Card Body Overlay (Name, V-Bucks, Price, Button) */
#fortnite-gift-showcase .fg-card-body {
    position: relative;
    z-index: 3;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
#fortnite-gift-showcase h4 {
    margin: 0 0 4px;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: auto;
}
#fortnite-gift-showcase .fg-price {
    display: flex;
    gap: 4px;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}
#fortnite-gift-showcase .fg-price strong {
    color: #ffd447;
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    font-family: 'Cairo', var(--font-family, sans-serif);
    white-space: nowrap;
}
#fortnite-gift-showcase .fg-price small {
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}
#fortnite-gift-showcase .fg-custom-card .fg-price strong {
    font-size: 13px;
    color: #e9d5ff;
}
#fortnite-gift-showcase .fg-custom-card .fg-price small {
    color: #cbd5e1;
}

/* Custom card button tint */
#fortnite-gift-showcase .fg-custom-card button {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(192, 132, 252, 0.5);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
#fortnite-gift-showcase .fg-custom-card button i {
    color: #c084fc !important;
    filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.6));
}
#fortnite-gift-showcase .fg-custom-card button:hover {
    background: rgba(168, 85, 247, 0.34);
    border-color: rgba(192, 132, 252, 0.9);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.45), 0 0 16px rgba(192, 132, 252, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.55);
}

#fortnite-gift-showcase .fg-status:empty { display: none; }
.fortnite-gifts-embed { scroll-margin-top: 100px; }
#fortnite-ad-container { position: relative; }
/* The shared game banner rules use important negative margins. */
#fortnite #fortnite-ad-container { margin-top: 24px !important; }
#fortnite-ad-container [hidden] { display: none !important; }
#fortnite-ad-container .fg-banner-action { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
#fortnite-ad-container .fg-banner-controls { display: none !important; }
#fortnite #fortnite-ad-container .game-header-ad-badge { top: 10px !important; bottom: auto !important; right: 10px !important; padding: 6px 10px !important; }
#fortnite-ad-container button:focus-visible { outline: 2px solid #67e8f9; outline-offset: -3px; }

@media (max-width: 768px) {
    #fortnite #fortnite-ad-container { margin-top: 60px !important; }
}

/* Keeping all cards on the same line across all screen sizes */
@media (max-width: 960px) {
    #fortnite-gift-showcase .fg-grid {
        grid-template-columns: repeat(5, minmax(136px, 1fr));
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        gap: 8px;
        scrollbar-width: thin;
    }
    #fortnite-gift-showcase .fg-grid::-webkit-scrollbar {
        height: 5px;
    }
    #fortnite-gift-showcase .fg-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.04);
        border-radius: 999px;
    }
    #fortnite-gift-showcase .fg-grid::-webkit-scrollbar-thumb {
        background: rgba(56, 189, 248, 0.35);
        border-radius: 999px;
    }
    #fortnite-gift-showcase .fg-card {
        scroll-snap-align: start;
        min-width: 136px;
        height: 224px;
    }
}
@media (max-width: 640px) {
    #fortnite-gift-showcase {
        padding-inline: 10px;
    }
    #fortnite-gift-showcase .fg-card {
        min-width: 130px;
        height: 218px;
    }
    #fortnite-gift-showcase .fg-card-body {
        padding: 9px;
    }
    #fortnite-gift-showcase h4 {
        font-size: 12.5px;
    }
    #fortnite-gift-showcase .fg-price strong {
        font-size: 14px;
    }
    #fortnite-gift-showcase .fg-price small {
        font-size: 10px;
    }
    #fortnite-gift-showcase .fg-card button {
        min-height: 33px;
        font-size: 11.5px;
        padding: 6px 4px;
    }
}
