/* Game emblems and game cards (homepage, /games.php).

   Emblem: the icon tile for a game.
   Loaded by includes/hooks/game_emblems.php with a ?v= of the file's mtime;
   not in custom.css, which WHMCS links with no version, so browsers keep
   serving a stale copy after a deploy. Colors come in as --e1/--e2; the glyph
   is a Font Awesome duotone icon, white with a softer second tone. Size the
   tile and set font-size on it; the glyph scales with it. */
.hxs-emblem {
    --e1: #60a5fa;
    --e2: #1d4ed8;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background:
        radial-gradient(120% 90% at 22% 12%, rgba(255, 255, 255, 0.3), transparent 55%),
        linear-gradient(145deg, var(--e1), var(--e2));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -12px 18px rgba(0, 0, 0, 0.22),
        0 8px 18px -10px var(--e2);
    color: #fff;
}
.hxs-emblem::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 7px);
    pointer-events: none;
}
.hxs-emblem i {
    position: relative;
    z-index: 1;
    font-size: 1.5em;
    --fa-primary-color: #fff;
    --fa-secondary-color: #fff;
    --fa-secondary-opacity: 0.42;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* Game card: the game's scene (game-art.php) across the top, the emblem
   overlapping its lower edge, then the name. Set --e1/--e2 on the card for the
   placeholder shown while the scene loads and the hover glow. The background
   is solid on purpose: seasonal critters pass behind cards, and a see-through
   card would show them. */
.hxs-gcard {
    --e1: #60a5fa;
    --e2: #1d4ed8;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #10141f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    color: inherit;
    text-decoration: none !important;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
a.hxs-gcard:hover,
.hxs-gcard:focus-within {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--e1) 55%, transparent);
    box-shadow: 0 18px 36px -22px var(--e2);
}
.hxs-gcard-art {
    display: block;
    position: relative;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: linear-gradient(160deg, color-mix(in srgb, var(--e2) 70%, #05070d), #05070d);
}
.hxs-gcard-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
a.hxs-gcard:hover .hxs-gcard-art img,
.hxs-gcard:focus-within .hxs-gcard-art img { transform: scale(1.045); }
.hxs-gcard-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 14px;
}
.hxs-gcard-head .hxs-emblem {
    width: 46px;
    height: 46px;
    font-size: 14px;
    margin-top: -22px;
    border: 3px solid #10141f;
    border-radius: 13px;
    box-sizing: content-box;
}
.hxs-gcard-text { display: flex; flex-direction: column; min-width: 0; flex: 1; padding-top: 10px; }
.hxs-gcard-name {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    line-height: 1.2;
}
.hxs-gcard-tag {
    font-size: 0.76rem;
    color: var(--hxs-text-muted, #9a9aaa);
    margin-top: 3px;
}
.hxs-gcard-go {
    flex-shrink: 0;
    padding-top: 10px;
    color: var(--hxs-text-muted, #9a9aaa);
    font-size: 0.8rem;
    transition: transform 0.18s ease, color 0.18s ease;
}
a.hxs-gcard:hover .hxs-gcard-go { transform: translateX(3px); color: var(--e1); }

@media (prefers-reduced-motion: reduce) {
    .hxs-gcard, .hxs-gcard-art img { transition: none; }
    a.hxs-gcard:hover, a.hxs-gcard:hover .hxs-gcard-art img { transform: none; }
}
