html {
  color-scheme: dark;
  background: #050708;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

body.game-page-body {
  --game-accent: #ec1c24;
  min-width: 320px;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 76% 16%, color-mix(in srgb, var(--game-accent) 20%, transparent), transparent 30%),
    radial-gradient(circle at 18% 88%, rgba(37, 101, 115, .18), transparent 36%),
    #050708;
  font-family: var(--body);
  font-size: clamp(15px, .82vw, 28px);
}

.game-page-body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.game-page-skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .75rem 1rem;
  color: #050708;
  background: var(--white);
  border-radius: .5rem;
  transform: translateY(-180%);
}

.game-page-skip:focus { transform: none; }

.game-page-header {
  width: 100%;
  height: var(--header, 76px);
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(4, 7, 9, .88);
  backdrop-filter: blur(18px);
  will-change: opacity, transform;
  animation: gamePageHeaderEnter .62s cubic-bezier(.2,.8,.2,1) .04s both;
}

.game-page-header .site-header__inner {
  width: min(96vw, 100% - 2rem);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 1.7vw, 2.6rem);
}

.game-page-brand {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.game-page-brand img {
  content: url("../images/brand/animart-bilgi-oyunlari-transparent-final.png");
  width: auto;
  height: 52px;
  max-width: min(25vw, 264px);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: left center;
}

.game-page-brand span { display: none; }

.game-page-nav {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-left: auto;
}

.game-page-nav a,
.game-page-back {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 5px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.game-page-nav a:hover,
.game-page-nav a:focus-visible,
.game-page-back:hover,
.game-page-back:focus-visible {
  border-color: var(--game-accent);
  background: color-mix(in srgb, var(--game-accent) 15%, transparent);
  transform: translateY(-1px);
}

.game-page-main {
  width: 100%;
  height: calc(100dvh - var(--header, 76px));
  padding: clamp(16px, 2.1dvh, 42px) 0;
  display: grid;
  place-items: center;
  will-change: opacity, transform;
  animation: gamePageMainEnter .78s cubic-bezier(.16,1,.3,1) .1s both;
}

@keyframes gamePageHeaderEnter {
  from { opacity: 0; transform: translate3d(0,-100%,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

@keyframes gamePageMainEnter {
  from { opacity: 0; transform: translate3d(0,-7.5dvh,0); filter: blur(5px); }
  62% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: translate3d(0,0,0); filter: blur(0); }
}

.game-page-body--leaving {
  pointer-events: none;
}

.game-page-body--leaving .game-page-main {
  animation: gamePageMainExit .56s cubic-bezier(.7,0,.84,0) both;
}

.game-page-body--leaving .game-page-header {
  animation: gamePageHeaderExit .46s cubic-bezier(.7,0,.84,0) .06s both;
}

@keyframes gamePageMainExit {
  from {
    opacity: 1;
    transform: translate3d(0,0,0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translate3d(0,-9dvh,0) scale(.992);
    filter: blur(5px);
  }
}

@keyframes gamePageHeaderExit {
  from { opacity: 1; transform: translate3d(0,0,0); }
  to { opacity: 0; transform: translate3d(0,-100%,0); }
}

.game-page {
  width: calc(100% - clamp(2rem, 4vw, 7rem));
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--game-accent) 58%, rgba(255,255,255,.18));
  border-radius: clamp(18px, 1.5vw, 38px);
  background: rgba(8, 11, 14, .94);
  box-shadow: 0 2.5rem 7rem rgba(0,0,0,.48), 0 0 5rem color-mix(in srgb, var(--game-accent) 10%, transparent);
}

.game-page__visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background: #0a0d10;
}

.game-page__cover,
.game-page__cover picture,
.game-page__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-page__cover img {
  object-fit: cover;
  object-position: center;
  filter: saturate(.96) contrast(1.05);
}

.game-page__visual::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(to bottom, rgba(0,0,0,.05) 25%, rgba(0,0,0,.18) 56%, rgba(0,0,0,.88) 100%), linear-gradient(90deg, transparent 70%, rgba(5,7,8,.32));
}

.game-page__logo {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(42%, 39dvh);
  max-height: 46%;
  object-fit: contain;
  filter: drop-shadow(0 1.5rem 2rem rgba(0,0,0,.6));
  transform: translate(-50%, -52%);
}

.game-page__presentation {
  position: absolute;
  z-index: 3;
  right: clamp(1.2rem, 2vw, 3rem);
  bottom: clamp(1.2rem, 2vw, 3rem);
  left: clamp(1.2rem, 2vw, 3rem);
  min-height: clamp(52px, 6.2dvh, 92px);
  border: 1px solid color-mix(in srgb, var(--game-accent) 80%, white);
  border-radius: 999px;
  color: white;
  background: color-mix(in srgb, var(--game-accent) 52%, rgba(5,7,8,.72));
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: .035em;
  cursor: pointer;
}

.game-page__content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: var(--game-accent) rgba(255,255,255,.08);
  scrollbar-width: thin;
  padding: clamp(1.5rem, 3.3vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.game-page__content::-webkit-scrollbar { width: .55rem; }
.game-page__content::-webkit-scrollbar-track { background: rgba(255,255,255,.06); }
.game-page__content::-webkit-scrollbar-thumb { background: var(--game-accent); border-radius: 1rem; }

.game-page__category {
  width: fit-content;
  margin: 0 0 clamp(.7rem, 1.2dvh, 1.2rem);
  padding: .48rem .78rem;
  border: 1px solid color-mix(in srgb, var(--game-accent) 75%, white);
  border-radius: .32rem;
  color: color-mix(in srgb, var(--game-accent) 82%, white);
  background: color-mix(in srgb, var(--game-accent) 10%, transparent);
  font-family: var(--display);
  font-size: clamp(.82rem, .82vw, 1.4rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-page__title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.7rem, 5.4vw, 9rem);
  font-weight: 800;
  line-height: .82;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.game-page__subtitle {
  margin: clamp(1rem, 1.8dvh, 1.7rem) 0 clamp(1rem, 1.8dvh, 1.7rem);
  color: color-mix(in srgb, var(--game-accent) 84%, white);
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.75vw, 3rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: .015em;
}

.game-page__copy {
  max-width: 62ch;
  color: #d6d8db;
  font-size: clamp(.98rem, .92vw, 1.6rem);
  font-weight: 590;
  line-height: 1.5;
}

.game-page__copy p { margin: 0 0 .85em; }

.game-page__participants {
  margin: .15rem 0 1.15rem;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.06vw, 1.8rem);
  font-weight: 800;
}

.game-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.game-page__action {
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.25rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.035);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .025em;
  text-decoration: none;
  text-transform: uppercase;
}

.game-page__action--primary {
  flex: 1 1 14rem;
  border-color: color-mix(in srgb, var(--game-accent) 75%, white);
  background: var(--game-accent);
  color: #07090a;
  box-shadow: 0 1rem 2.4rem color-mix(in srgb, var(--game-accent) 20%, transparent);
}

.game-page__action[hidden] { display: none; }

.game-page-dialog {
  width: min(88vw, 1500px);
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--game-accent) 70%, white);
  border-radius: 1rem;
  color: white;
  background: #050708;
  box-shadow: 0 2rem 7rem #000;
}

.game-page-dialog::backdrop { background: rgba(0,0,0,.9); backdrop-filter: blur(12px); }
.game-page-dialog__bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; }
.game-page-dialog__bar h2 { margin: 0; font: 800 1.25rem var(--display); }
.game-page-dialog__bar button { width: 2.4rem; height: 2.4rem; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: white; background: transparent; cursor: pointer; }
.game-page-dialog iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

@media (max-width: 900px), (max-height: 650px) and (orientation: landscape) {
  html { height: auto; overflow: auto; }
  body.game-page-body { overflow: auto; }
  .game-page-header { height: auto; min-height: 68px; }
  .game-page-main { height: auto; min-height: calc(100dvh - 68px); padding: 1rem 0; }
  .game-page { height: auto; min-height: calc(100dvh - 100px); grid-template-columns: 1fr; }
  .game-page__visual { min-height: min(58dvh, 620px); }
  .game-page__content { overflow: visible; justify-content: flex-start; }
  .game-page-nav a:first-child { display: none; }
}

@media (max-width: 560px) {
  .game-page-header .site-header__inner,
  .game-page { width: min(94vw, 100% - 1rem); }
  .game-page-brand img { height: 42px; max-width: min(48vw, 230px); }
  .game-page-nav a { padding-inline: .8rem; font-size: .84rem; }
  .game-page__visual { min-height: 48dvh; }
  .game-page__title { font-size: clamp(3.3rem, 19vw, 5.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
