:root {
  --gp-shell-max: 1600px;
  --gp-side-collapsed: 68px;
  --gp-side-expanded: 268px;
  --gp-top-nav-height: 64px;
  --gp-rail-width: 320px;
  --gp-gap: 22px;
  --gp-surface-0: #060c1a;
  --gp-surface-1: #0a1224;
  --gp-surface-2: #0e172d;
  --gp-border: rgba(90, 110, 145, 0.28);
  --gp-border-strong: rgba(120, 149, 198, 0.48);
  --gp-text: #e5edf9;
  --gp-muted: #9cafcf;
}

body.single-game {
  background: linear-gradient(180deg, #080f20 0%, #030814 60%, #02060f 100%);
}

body.single-game #page > nav.sticky {
  min-height: var(--gp-top-nav-height);
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(9, 14, 27, 0.88), rgba(7, 11, 23, 0.95));
  border-bottom: 1px solid rgba(71, 85, 105, 0.45);
}

body.single-game #page > .max-w-\[1920px\].mx-auto.px-4.lg\:px-8.pt-3,
body.single-game #page > .flex.pt-4.px-4.lg\:px-8.max-w-\[1920px\].mx-auto.gap-8 {
  max-width: calc(var(--gp-shell-max) + var(--gp-side-collapsed));
}

/* Fixed desktop icon rail */
@media (min-width: 1024px) {
  body.single-game #sidebar-menu {
    position: fixed;
    left: 0;
    top: var(--gp-top-nav-height);
    height: calc(100vh - var(--gp-top-nav-height));
    width: var(--gp-side-collapsed);
    z-index: 45;
    transform: none;
    transition: width 220ms ease;
  }

  body.single-game #sidebar-menu:hover {
    width: var(--gp-side-expanded);
  }

  body.single-game #sidebar-menu > div {
    padding-inline: 0.5rem;
    overflow-x: hidden;
  }

  body.single-game #sidebar-menu a {
    justify-content: center;
  }

  body.single-game #sidebar-menu:hover a {
    justify-content: flex-start;
  }

  body.single-game #sidebar-menu .sidebar-link-text,
  body.single-game #sidebar-menu .sidebar-section-title {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 150ms ease, transform 150ms ease;
  }

  body.single-game #sidebar-menu:hover .sidebar-link-text,
  body.single-game #sidebar-menu:hover .sidebar-section-title {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  body.single-game #sidebar-menu .sidebar-taxonomy-group {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top-color: rgba(51, 65, 85, 0.22);
  }

  body.single-game #sidebar-menu:hover .sidebar-taxonomy-group {
    margin-top: 1.35rem;
    padding-top: 1.35rem;
    border-top-color: rgba(51, 65, 85, 0.82);
  }

  body.single-game #primary.site-main {
    margin-left: calc(var(--gp-side-collapsed) + 8px);
  }
}

.gp-page-shell {
  width: 100%;
}

.gp-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.gp-main-column {
  min-width: 0;
}

.gp-player-shell {
  border-radius: 18px;
  border: 1px solid var(--gp-border);
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.96), rgba(4, 9, 20, 0.98));
  box-shadow: 0 24px 42px rgba(2, 6, 23, 0.52);
  overflow: hidden;
}

.gp-player-container {
  position: relative;
}

.gp-player-aspect {
  position: relative;
  width: 100%;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.gp-player-aspect > * {
  position: absolute;
  inset: 0;
}

@supports not (aspect-ratio: 1 / 1) {
  .gp-player-aspect::before {
    content: "";
    display: block;
    padding-top: 56.25%;
  }
}

.gp-player-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b1220;
  background-position: center;
  background-size: cover;
}

.gp-player-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.75));
}

.gp-player-cta-wrap {
  position: relative;
  z-index: 2;
  text-align: center;
  display: grid;
  gap: 0.9rem;
  align-items: center;
  justify-items: center;
  padding: 1rem;
}

.gp-player-thumb {
  width: 128px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.gp-player-title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.gp-play-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #7054ff, #5a45dd);
  color: #fff;
  font-weight: 800;
  padding: 0.72rem 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(90, 69, 221, 0.46);
}

.gp-play-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gp-player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  background: linear-gradient(180deg, rgba(11, 18, 33, 0.95), rgba(8, 13, 24, 0.98));
}

.gp-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(71, 85, 105, 0.75);
  border-radius: 10px;
  padding: 0.45rem 0.58rem;
  color: #d8e3f6;
  background: rgba(15, 23, 42, 0.9);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.gp-control-btn:hover {
  border-color: var(--gp-border-strong);
  background: rgba(15, 23, 42, 0.7);
}

.gp-ad-row {
  margin-top: 14px;
}

.gp-mobile-related {
  display: none;
}

.gp-mobile-related-title {
  margin: 0;
  padding: 0.9rem 0.95rem 0.7rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.gp-mobile-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0 0.7rem 0.85rem;
}

.gp-mobile-related-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: #030712;
}

.gp-mobile-related-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gp-mobile-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gp-mobile-related-name {
  display: block;
  padding: 0.38rem 0.42rem 0.5rem;
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-mobile-related-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #9fb0cf;
  font-size: 0.72rem;
  padding: 0.35rem;
}

.gp-ad-slot {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px dashed rgba(99, 102, 241, 0.48);
  background: linear-gradient(180deg, rgba(18, 25, 48, 0.88), rgba(8, 13, 27, 0.96));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gp-ad-slot-label {
  color: rgba(219, 234, 254, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.gp-ad-leaderboard {
  min-height: 96px;
}

.gp-ad-inline {
  min-height: 120px;
}

.gp-ad-mpu {
  min-height: 250px;
}

.gp-ad-halfpage {
  min-height: 600px;
}

.gp-meta-card,
.gp-content-card,
.gp-right-rail-recommendations {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid var(--gp-border);
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.95), rgba(5, 10, 22, 0.98));
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.36);
  overflow: hidden;
}

.gp-breadcrumb-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  font-size: 0.75rem;
  color: var(--gp-muted);
  padding: 1rem 1rem 0.2rem;
}

.gp-breadcrumb-line a {
  color: #9ed0ff;
}

.gp-meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 1rem 0.4rem;
}

.gp-meta-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  color: #fff;
  letter-spacing: -0.02em;
}

.gp-share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(71, 85, 105, 0.78);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--gp-text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.72rem;
}

.gp-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0.8rem 1rem;
}

.gp-meta-grid div {
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 11px;
  padding: 0.6rem 0.7rem;
  background: rgba(15, 23, 42, 0.66);
}

.gp-meta-grid dt {
  margin: 0;
  color: var(--gp-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gp-meta-grid dd {
  margin: 0.18rem 0 0;
  color: var(--gp-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.gp-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}

.gp-tag-pill {
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  background: rgba(67, 56, 202, 0.16);
  color: #dbeafe;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.24rem 0.6rem;
}

.gp-content-stack {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.gp-content-card h3 {
  margin: 0;
  padding: 0.95rem 1rem 0.8rem;
  color: #fff;
  font-size: 1.14rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
}

.gp-readable-content {
  padding: 1rem;
  color: #d2def0;
  line-height: 1.82;
}

.gp-readable-content p,
.gp-readable-content li {
  color: #d2def0;
}

.gp-inline-game-list {
  padding: 0.95rem 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.gp-inline-game-list a {
  border: 1px solid rgba(56, 189, 248, 0.36);
  background: rgba(8, 47, 73, 0.2);
  border-radius: 999px;
  color: #cce6ff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
}

.gp-video-wrap {
  padding: 1rem;
}

.gp-video-wrap iframe,
.gp-video-wrap video {
  width: 100%;
  border: 0;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #000;
}

.gp-right-rail {
  min-width: 0;
}

.gp-right-rail-sticky {
  display: grid;
  gap: 0.9rem;
}

.gp-right-rail-recommendations h2 {
  margin: 0;
  padding: 0.82rem 0.92rem;
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(51, 65, 85, 0.75);
}

.gp-right-rail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.5rem;
}

.gp-right-rail-card {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: #020617;
  transition: transform 150ms ease, border-color 150ms ease;
}

.gp-right-rail-card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.68);
}

.gp-right-rail-card-thumb {
  display: block;
  aspect-ratio: 1 / 1;
}

.gp-right-rail-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gp-right-rail-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.3rem 0.36rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.gp-right-rail-badge {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  border-radius: 999px;
  padding: 0.1rem 0.38rem;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: rgba(59, 130, 246, 0.92);
}

.gp-right-rail-empty {
  margin: 0;
  padding: 0.8rem;
  color: var(--gp-muted);
  font-size: 0.85rem;
}

.gp-right-rail-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  color: #9fb0cf;
  padding: 0.35rem;
}

@media (min-width: 1280px) {
  .gp-main-grid {
    grid-template-columns: minmax(0, 1fr) var(--gp-rail-width);
    gap: var(--gp-gap);
  }

  .gp-right-rail-sticky {
    position: sticky;
    top: calc(var(--gp-top-nav-height) + 12px);
  }
}

@media (max-width: 1279px) {
  .gp-right-rail-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gp-right-rail-slot-tall {
    display: none;
  }
}

@media (max-width: 1023px) {
  body.single-game #primary.site-main {
    margin-left: 0;
  }

  .gp-mobile-related {
    display: block;
    margin-top: 14px;
    border-radius: 14px;
    border: 1px solid var(--gp-border);
    background: linear-gradient(180deg, rgba(10, 18, 36, 0.95), rgba(5, 10, 22, 0.98));
    box-shadow: 0 16px 26px rgba(2, 6, 23, 0.35);
    overflow: hidden;
  }

  .gp-meta-grid {
    grid-template-columns: 1fr;
  }

  .gp-right-rail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gp-page-shell {
    padding-inline: 0;
  }

  .gp-player-shell,
  .gp-meta-card,
  .gp-content-card,
  .gp-right-rail-recommendations {
    border-radius: 13px;
  }

  .gp-player-controls {
    gap: 0.38rem;
  }

  .gp-control-btn {
    padding: 0.4rem 0.5rem;
  }

  .gp-right-rail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-mobile-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-ad-leaderboard {
    min-height: 72px;
  }
}

body.gp-mobile-immersive-active {
  overflow: hidden;
}

body.gp-mobile-immersive-active #page > nav.sticky,
body.gp-mobile-immersive-active #sidebar-menu,
body.gp-mobile-immersive-active #mobile-bottom-nav,
body.gp-mobile-immersive-active footer,
body.gp-mobile-immersive-active #game-theater-overlay {
  display: none !important;
}

body.gp-mobile-immersive-active .gp-player-shell {
  border-radius: 0;
  border: 0;
}

body.gp-mobile-immersive-active #game-theater-wrap,
body.gp-mobile-immersive-active #game-player-container {
  position: fixed !important;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100dvh;
  background: #000;
}

body.gp-mobile-immersive-active #game-player-aspect {
  position: absolute;
  inset: 0 0 58px;
  width: 100%;
  height: auto;
  aspect-ratio: auto !important;
}

body.gp-mobile-immersive-active #game-frame-container,
body.gp-mobile-immersive-active #game-frame-container iframe {
  width: 100%;
  height: 100%;
}

body.gp-mobile-immersive-active .gp-player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  border-top: 1px solid rgba(71, 85, 105, 0.65);
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
}
