/* CrazyGames-style density and responsive refinements */
.cg-section-header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font: inherit;
}
.cg-section-header__link:hover { color: var(--cg-accent); }
:root:not([data-theme="light"]) .cg-section-header__link:hover {
  color: color-mix(in srgb, var(--cg-accent) 65%, white);
}
.cg-section-header__link .li-chevron-right {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  font-size: 1.2em;
  line-height: 1;
  vertical-align: middle;
  transition: transform .18s ease;
}
/* Keep the rounded Lucide shape, with a slightly heavier stroke only for section titles. */
.cg-section-header__link .li-chevron-right::before {
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  border: 0;
  transform: none;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cg-section-header__link:hover .li-chevron-right {
    animation: cg-section-chevron-nudge .56s ease-in-out;
  }
}
@keyframes cg-section-chevron-nudge {
  0%, 100% { transform: translateX(0); }
  42% { transform: translateX(3px); }
  74% { transform: translateX(-.6px); }
}
:root{--cg-gap:10px}
.cg-main{padding:18px 22px 52px}.cg-section{margin-bottom:28px}.cg-section-header{margin-bottom:11px}.cg-section-header h2{font-size:19px}.cg-featured-grid{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(2,126px);grid-auto-rows:126px;gap:var(--cg-gap);overflow:hidden}.cg-featured-grid .cg-game-card{min-height:0;height:100%;overflow:hidden;border-radius:var(--cg-cover-radius)}.cg-featured-grid .cg-game-card__link{height:100%}.cg-featured-grid .cg-game-card--hero{grid-column:span 2;grid-row:span 2}.cg-featured-grid .cg-game-card--wide{grid-column:span 2}.cg-featured-grid .cg-game-card__media{height:100%;aspect-ratio:auto;border-radius:var(--cg-cover-radius)}.cg-featured-grid .cg-game-card__body{position:absolute;z-index:2;left:0;right:0;bottom:0;padding:28px 9px 8px;background:linear-gradient(transparent,rgba(0,0,0,.82));pointer-events:none}.cg-featured-grid .cg-game-card__title{font-size:12px;text-shadow:0 1px 4px #000}.cg-featured-grid .cg-game-card__category{display:none}.cg-carousel{grid-auto-columns:clamp(168px,12.8vw,232px);gap:10px}.cg-carousel .cg-game-card__media{aspect-ratio:16/9;border-radius:var(--cg-cover-radius)}.cg-carousel .cg-game-card__body{padding-top:6px}.cg-carousel .cg-game-card__category{display:none}.cg-game-card__title{font-size:13px}.cg-game-grid{grid-template-columns:repeat(auto-fill,minmax(176px,1fr));gap:11px}.cg-game-grid .cg-game-card__media{aspect-ratio:16/9}.cg-game-card:hover img,.cg-game-card:focus-within img{transform:scale(1.02)}.cg-topbar{grid-template-columns:auto minmax(240px,640px) auto;align-items:center;overflow:hidden}.cg-brand{min-width:0}.cg-search{justify-self:stretch;width:100%;min-width:0}.cg-account-nav{justify-self:end;min-width:0;flex-wrap:nowrap}
/* 桌面端：将 Logo 内猫头水平中心对齐侧栏图标列中心（侧栏 68px 中线 34px） */
@media(min-width:821px){.cg-brand{margin-left:6px}.cg-brand img{width:160px;max-width:160px}}.cg-sidebar__link{height:42px}.cg-sidebar__link i{font-size:16px}.cg-section--deferred{content-visibility:auto;contain-intrinsic-size:auto 205px}.cg-seo-copy{margin-top:36px;content-visibility:auto;contain-intrinsic-size:auto 310px}
@media(min-width:1600px){.cg-featured-grid{grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(2,138px);grid-auto-rows:138px}.cg-carousel{grid-auto-columns:clamp(184px,12vw,246px)}}
@media(max-width:1200px){.cg-featured-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,124px)}.cg-featured-grid .cg-game-card:nth-child(n+10){display:none}.cg-topbar{grid-template-columns:auto minmax(0,1fr) auto}}
@media(max-width:820px){:root{--cg-topbar:56px}.cg-topbar{height:var(--cg-topbar);grid-template-columns:42px max-content minmax(0,1fr) auto;align-items:center;gap:8px;padding:0 10px;overflow:hidden}.cg-topbar>.cg-menu-btn,.cg-topbar>.cg-brand,.cg-topbar>.cg-search,.cg-topbar>.cg-account-nav{align-self:center;margin:0;min-height:0}.cg-menu-btn{display:grid;place-items:center;width:42px;min-width:42px;height:42px}.cg-brand{width:auto;min-width:0;max-width:148px}.cg-brand img{width:148px;max-width:100%;max-height:30px;height:auto}.cg-search{height:36px;min-width:0;justify-self:stretch}.cg-account-nav{gap:2px}.cg-account-nav .cg-icon-btn,.cg-account-nav .cg-login-btn,.cg-locale-switcher .site-locale-switcher__btn{width:36px;min-width:36px;height:36px;padding:0}.cg-main{margin-top:var(--cg-topbar);padding:13px 10px 44px}.cg-sidebar{top:var(--cg-topbar)}.cg-section{margin-bottom:24px}.cg-section--deferred{contain-intrinsic-size:auto 165px}.cg-section-header{margin-bottom:9px;padding:0 2px}.cg-section-header h2{font-size:17px}.cg-section-header>a{font-size:12px}.cg-featured-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,108px);grid-auto-rows:108px;gap:7px}.cg-featured-grid .cg-game-card--hero{grid-column:span 2;grid-row:span 2}.cg-featured-grid .cg-game-card--wide{grid-column:span 2}.cg-featured-grid .cg-game-card:nth-child(n+9){display:none}.cg-featured-grid .cg-game-card__body{padding:22px 6px 5px}.cg-carousel{grid-auto-columns:42vw;gap:8px;margin-right:-10px;padding-right:10px}.cg-carousel .cg-game-card__title{font-size:11px}.cg-game-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.cg-game-card__badge{left:5px;top:5px;padding:3px 5px;font-size:8px}.cg-favorite-btn{right:5px;top:5px;width:28px;height:28px}.cg-cookie{font-size:12px}}
@media(max-width:640px){.cg-topbar{grid-template-columns:40px max-content minmax(0,1fr) auto;gap:6px;padding:0 8px}.cg-brand{max-width:120px}.cg-brand img{width:120px;max-height:26px}.cg-account-nav .cg-login-btn{display:none}.cg-locale-switcher .site-locale-switcher__btn{width:36px;min-width:36px}}
.cg-search__suggestions{max-height:min(420px,60vh);overflow-y:auto}.cg-search__suggestions .cg-search__heading{padding:7px 12px;color:var(--cg-subtle);font-size:11px;font-weight:600;text-transform:uppercase}.cg-search__suggestions .cg-search__empty{padding:12px;color:var(--cg-muted)}.cg-search__suggestions .cg-search__game{min-width:0;min-height:52px;padding:5px 10px}.cg-search__game img{width:38px;height:38px;flex:0 0 38px;object-fit:cover;border-radius:var(--cg-thumbnail-radius);background:var(--cg-surface-2)}.cg-search__game-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cg-search__game-title strong{color:#fff}.cg-search__suggestions .cg-search__all{border-top:1px solid var(--cg-stroke);margin-top:4px;color:#fff}
@media(max-width:520px){.cg-search__suggestions{max-height:min(310px,45dvh)}.cg-search__suggestions .cg-search__game{min-height:48px}:root{--cg-topbar:54px}.cg-topbar{height:var(--cg-topbar);grid-template-columns:36px max-content minmax(0,1fr) auto;gap:6px;padding:0 8px}.cg-menu-btn{width:36px;min-width:36px;height:36px}.cg-brand{max-width:104px}.cg-brand img{width:104px;max-width:100%;max-height:24px}.cg-brand__mark{width:32px;height:32px}.cg-search{height:34px;padding-left:10px}.cg-search i{font-size:12px}.cg-search input{font-size:12px}.cg-account-nav .cg-icon-btn,.cg-account-nav .cg-login-btn{display:none}.cg-locale-switcher .site-locale-switcher__btn{width:34px;min-width:34px;height:34px}.cg-main{margin-top:var(--cg-topbar);padding-top:10px}.cg-sidebar{top:var(--cg-topbar)}.cg-featured-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,82px);grid-auto-rows:82px}.cg-featured-grid .cg-game-card--hero{grid-column:span 2;grid-row:span 2}.cg-featured-grid .cg-game-card__title{font-size:10px}.cg-featured-grid .cg-game-card:nth-child(n+9){display:none}.cg-carousel{grid-auto-columns:46vw}.cg-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cg-page-heading h1{font-size:26px}.cg-seo-copy{font-size:13px}.cg-player-stage{height:52vh;min-height:300px}}
@media(max-width:360px){.cg-featured-grid{grid-template-rows:repeat(3,74px);grid-auto-rows:74px}.cg-carousel{grid-auto-columns:48vw}.cg-game-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Keep the header dropdown visible below the top bar at every viewport width. */
.cg-topbar{overflow:visible}
/* Store links in the top bar and next to the footer brand. */
.cg-app-downloads{display:flex;align-items:center;gap:6px;flex-shrink:0}.cg-app-download{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:28px;padding:4px 8px;border:0;background:transparent;color:#fff;font-size:11px;font-weight:500;white-space:nowrap}.cg-app-download:hover{text-decoration:underline}.cg-app-download:focus-visible{outline:2px solid var(--cg-accent);outline-offset:2px}.cg-app-download[hidden]{display:none!important}.cg-app-download .cg-store-icon{width:15px;height:15px;flex:none}
.cg-topbar .cg-app-download{width:36px;min-width:36px;height:36px;padding:0}.cg-topbar .cg-app-download span{display:none}.cg-topbar .cg-app-download .cg-store-icon{width:20px;height:20px}
@media(max-width:520px){.cg-topbar .cg-app-download{width:34px;min-width:34px;height:34px}}
@media(max-width:820px){.cg-topbar{overflow:visible}}
/* Dot-grid styles preserve the authored geometry; each group repeats its tiles without truncation. */
.cg-section--dot{position:relative;z-index:1}.cg-section--dot:has(.cg-game-card:hover),.cg-section--dot:focus-within{z-index:2;content-visibility:visible}
.cg-dot-scroll{--dot-cell:clamp(168px,12.8vw,232px);display:flex;align-items:flex-start;gap:var(--cg-gap);max-width:100%;overflow-x:auto;overflow-y:hidden;padding-block:56px;margin-block:-56px;scrollbar-width:none;-ms-overflow-style:none;outline-offset:3px}
.cg-dot-scroll::-webkit-scrollbar{display:none}
.cg-dot-scroll:focus-visible{outline:2px solid var(--cg-accent)}
.cg-dot-group{--dot-gap:9px;display:grid;grid-template-columns:repeat(var(--dot-columns),var(--dot-cell));grid-template-rows:repeat(var(--dot-rows),calc(var(--dot-cell)*.5625));gap:var(--dot-gap);width:max-content;flex:none}
.cg-dot-tile{min-width:0;min-height:0;position:relative}.cg-dot-tile>.cg-game-card{height:100%;min-height:0}.cg-dot-tile .cg-game-card__link{height:100%}.cg-dot-tile .cg-game-card__media{height:100%;aspect-ratio:auto}.cg-dot-tile .cg-game-card__body{position:absolute;left:0;right:0;bottom:0;padding:18px 7px 5px;background:linear-gradient(transparent,rgba(0,0,0,.82));pointer-events:none}.cg-dot-tile .cg-game-card__category{display:none}.cg-dot-tile .cg-game-card__title{font-size:11px}
.cg-dot-tile .cg-game-card__body{visibility:hidden}.cg-dot-tile .cg-game-card:is(:hover, :focus-within) .cg-game-card__body{visibility:visible}

@media(min-width:1600px){.cg-dot-scroll{--dot-cell:clamp(184px,12vw,246px)}}
@media(max-width:820px){.cg-dot-group{--dot-gap:8px}.cg-dot-tile--single .cg-game-card__link{border:0}.cg-dot-scroll{--dot-cell:42vw;padding-block:16px;margin-block:-16px}}
@media(max-width:520px){.cg-dot-scroll{--dot-cell:46vw}}
@media(max-width:360px){.cg-dot-scroll{--dot-cell:48vw}}

/* Align the header with the scroll viewport independently of tile dimensions. */
:is(.cg-section--deferred, .cg-library-strip) > .cg-section-header { padding-inline: 0; }

/* Separate the recent-games cards from the following home section heading. */
.cg-library-strip:not([hidden]){margin-bottom:22px}
/* Continue playing uses image-only cards; desktop hover and keyboard focus reveal the title inside the card. */
.cg-library-strip .cg-game-card__body{position:absolute;inset:0;visibility:hidden;pointer-events:none}
@media(min-width:821px) and (hover:hover) and (pointer:fine){.cg-library-strip .cg-game-card:hover .cg-game-card__body,.cg-library-strip .cg-game-card:focus-within .cg-game-card__body{visibility:visible}}
/* Home rows keep horizontal scrolling without a visible scrollbar; inset room prevents hover cards from being clipped. */
.cg-section--deferred .cg-carousel,.cg-library-strip .cg-carousel{padding:14px 0 16px;margin:-14px 0 -16px;scrollbar-width:none;-ms-overflow-style:none}
.cg-section--deferred .cg-carousel::-webkit-scrollbar,.cg-library-strip .cg-carousel::-webkit-scrollbar{display:none}
.cg-featured-grid{overflow:visible}
/* The card grows above the grid without changing its allocated track. */
.cg-game-card__stats{display:none}
@media(min-width:821px) and (hover:hover) and (pointer:fine){
  /* Give the scaled first cover room without moving the resting grid. */
  .cg-dot-scroll,
  :is(.cg-section--deferred, .cg-library-strip) .cg-carousel {
    --cg-hover-gutter: 20px;
    max-width: none;
    margin-inline-start: calc(-1 * var(--cg-hover-gutter));
    padding-inline-start: var(--cg-hover-gutter);
    scroll-padding-inline-start: var(--cg-hover-gutter);
  }
  #cgRecentGames {
    padding-bottom: 56px;
    margin-bottom: -56px;
  }
  .cg-dot-tile:hover,.cg-dot-tile:focus-within{z-index:80}
  .cg-featured-grid .cg-game-card{overflow:visible}
  .cg-game-card{z-index:1;isolation:isolate;transition:transform .19s ease}
  .cg-game-card:hover,.cg-game-card:focus-within{z-index:80;transform:scale(1.05)}
  .cg-game-card__link{position:relative;z-index:1;overflow:hidden;border:2px solid transparent;border-radius:calc(var(--cg-cover-radius) + 2px);transition:border-color .19s ease,box-shadow .19s ease,background .19s ease}
  .cg-game-card:hover .cg-game-card__link,.cg-game-card:focus-within .cg-game-card__link{border-color:var(--cg-accent);background:var(--cg-accent);box-shadow:0 20px 38px rgba(0,0,0,.65)}
  .cg-game-card__media,.cg-featured-grid .cg-game-card__media{border-radius:var(--cg-cover-radius);transition:border-radius .19s ease}
  .cg-game-card:hover .cg-game-card__media,.cg-game-card:focus-within .cg-game-card__media{border-radius:var(--cg-cover-radius) var(--cg-cover-radius) 0 0}
  .cg-game-card:hover img,.cg-game-card:focus-within img{transform:none;filter:none}
  .cg-game-card__shade,.cg-game-card__play{display:none}
  .cg-game-card:is(:hover, :focus-within) .cg-game-card__body,
  .cg-category-listing .cg-game-card--category:is(:hover, :focus-within) .cg-game-card__body,
  .cg-listing-page .cg-recent-page .cg-game-card:is(:hover, :focus-within) .cg-game-card__body {
    position:absolute;
    z-index:2;
    inset:0;
    justify-content:flex-end;
    gap:6px;
    padding:0 12px 11px;
    background:var(--cg-cover-hover);
    opacity:1;
    pointer-events:none;
  }
  .cg-game-card:is(:hover, :focus-within) .cg-game-card__title {
    color:#fff;
    font-size:clamp(12px, 1.2vw, 17px);
    line-height:1.25;
    font-weight:600;
    text-shadow:0 1px 4px rgba(0,0,0,.65);
  }
  .cg-game-card--compact:hover .cg-game-card__title,.cg-game-card--compact:focus-within .cg-game-card__title{font-size:12px}
  .cg-game-card:hover .cg-game-card__category,.cg-game-card:focus-within .cg-game-card__category{display:none}
  .cg-game-card:is(:hover, :focus-within) .cg-game-card__stats {
    display:flex;
    align-items:center;
    gap:clamp(5px,.6vw,9px);
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
    color:rgba(255,255,255,.84);
    font-size:clamp(9px,.8vw,11px);
    font-weight:500;
    line-height:1.35;
    font-variant-numeric:tabular-nums;
  }
  .cg-game-card--compact:hover .cg-game-card__stats,.cg-game-card--compact:focus-within .cg-game-card__stats{font-size:9px;gap:5px}
  .cg-game-card--compact .cg-game-card__pill{max-width:30%;padding:2px 5px}
  .cg-game-card__pill {
    min-width:0;
    max-width:42%;
    overflow:hidden;
    text-overflow:ellipsis;
    padding:2px 6px;
    border-radius:5px;
    background:rgba(255,255,255,.16);
    color:#fff;
  }
  .cg-game-card__year,.cg-game-card__metric{flex:none}
  .cg-game-card__year{color:rgba(255,255,255,.74)}
  .cg-game-card__metric{display:inline-flex;align-items:center;gap:4px;margin-inline-start:auto}
  .cg-game-card__metric + .cg-game-card__metric{margin-inline-start:0}
  .cg-game-card__metric i{font-size:.9em}
  .cg-like-btn,.cg-favorite-btn {
    top:8px;
    width:28px;
    height:28px;
    border-radius:8px;
    background:rgba(12,12,12,.76);
    color:#fff;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
    font-size:15px;
  }
  .cg-like-btn{position:absolute;z-index:90;right:40px;border:0;cursor:pointer;opacity:0}
  .cg-favorite-btn{right:8px}
  .cg-game-card:hover .cg-like-btn,.cg-game-card:focus-within .cg-like-btn,.cg-like-btn[aria-pressed="true"]{opacity:1}
  .cg-like-btn[aria-pressed="true"]{background:var(--cg-accent)}
  .cg-game-card:hover .cg-favorite-btn,.cg-game-card:focus-within .cg-favorite-btn{z-index:90}
  .cg-featured-grid .cg-game-card:hover .cg-game-card__title,.cg-featured-grid .cg-game-card:focus-within .cg-game-card__title{font-size:clamp(12px,1.2vw,17px)}
  .cg-featured-grid .cg-game-card--compact:hover .cg-game-card__title,.cg-featured-grid .cg-game-card--compact:focus-within .cg-game-card__title{font-size:12px}
  .cg-carousel{overflow-x:auto;overflow-y:hidden}
  .cg-game-grid,.cg-featured-grid,.cg-section--page,.cg-section--deferred,.cg-player-recommendations{overflow:visible}
}
/* Narrow windows need the same card-relative like control as desktop hover cards. */
@media(max-width:820px){
  .cg-game-card .cg-like-btn{position:absolute;z-index:4;right:39px;top:5px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(12,13,20,.8);color:#fff;cursor:pointer;opacity:1}
  .cg-game-card .cg-like-btn[aria-pressed="true"]{background:var(--cg-accent)}
}
@media(prefers-reduced-motion:reduce){.cg-game-card,.cg-game-card__link,.cg-game-card__body{transition:none!important}}

.cg-topbar .cg-search,
.cg-topbar .cg-login-btn {
  border-radius: 999px;
}
@media (min-width: 821px) {
  .cg-topbar .cg-login-btn {
    padding-inline: 20px;
  }
}
.cg-topbar .cg-search > button {
  border-radius: 0 999px 999px 0;
}

/* Trim the thin baked-in frame before fitting catalog artwork to each card. */
:is(.cg-game-card__media, .cg-library-item, .cg-search__game) img[src*="/assets/icons/game/"] {
  object-view-box: inset(1.5% var(--cg-art-trim-right, 1.5%) var(--cg-art-trim-bottom, 1.5%) 1.5%);
}
img[src$="/MarketSort.jpg"] {
  --cg-art-trim-right: 2.5%;
}
img[src$="/SubwaySurfers_vegas.jpg"] {
  --cg-art-trim-bottom: 2.5%;
}

@media (max-width: 820px), (hover: none), (pointer: coarse) {
  .cg-dot-tile .cg-game-card__link {
    overflow: hidden;
    position: relative;
    border-radius: var(--cg-cover-radius);
  }
  /* Do not paint the hover accent behind rounded artwork on narrow layouts. */
  .cg-main .cg-game-card:is(:hover, :focus-within) .cg-game-card__link,
  .cg-library-strip .cg-game-card:is(:hover, :focus-within) .cg-game-card__link {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
}
.cg-sidebar__link:is(:hover, :focus-visible, .active, [aria-current="page"]) {
  border-radius: 18px;
  corner-shape: superellipse(2);
}
