:root {
  color-scheme: dark;
  --bg: #111827;
  --panel: #1a2234;
  --surface: #1b273d;
  --edge: #303d55;
  --text: #f3f7ff;
  --muted: #b6c4db;
  --lime: #c2ff6a;
  --lime-dark: #17230e;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; line-height: 1.55; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
:where(section, main)[id] { scroll-margin-block-start: 1rem; }

.shell { width: min(100% - 3rem, 90.75rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  inset: 0 auto auto 1rem;
  z-index: 2;
  transform: translateY(-120%);
  padding: .6rem .9rem;
  color: var(--lime-dark);
  background: var(--lime);
}
.skip-link:focus { transform: none; }
.site-header {
  background: #101829;
  border-bottom: 1px solid #26324a;
}
.topbar, .footer-inner {
  min-height: 4.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem 1.25rem;
}
.topbar { width: calc(100% - 6rem); min-height: 6rem; }
.brand, .footer-brand { font-weight: 800; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .85rem; font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem); }
.brand img { width: 3rem; height: 3rem; border-radius: .6rem; display: block; }
.top-nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.15rem; }
.top-nav a, .site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.top-nav a:hover, .site-footer a:hover { color: var(--lime); }
.top-nav { align-items: center; }
.language-selector { position: relative; margin-inline-start: auto; }
.language-trigger {
  position: relative;
  min-height: 2.75rem;
  padding: 0 1rem 0 .2rem;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: .9rem;
  font-weight: 650;
}
.language-trigger::after {
  content: "";
  position: absolute;
  inset: 1.05rem .2rem auto auto;
  width: .38rem;
  height: .38rem;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  rotate: 45deg;
}
.language-options {
  min-width: 9rem;
  margin: 0;
  padding: .35rem;
  list-style: none;
}
.language-trigger:not([hidden]) + .language-options {
  position: absolute;
  z-index: 5;
  top: 100%;
  inset-inline-end: 0;
  border: 1px solid var(--edge);
  border-radius: .55rem;
  background: var(--panel);
  box-shadow: 0 .6rem 1.2rem #060b1760;
}
.language-options a { display: flex; padding-inline: .6rem; border-radius: .3rem; }
.language-options [aria-current="page"] { color: var(--lime); font-weight: 800; background: var(--surface); }

.play-area { padding-block-start: .25rem; }
h1, h2, h3, p { margin-block-start: 0; }
.play-area h1 {
  margin: 0 0 1.625rem;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.03em;
}
.game-board, .recommendation-grid .card-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.5rem;
}
.game-board { align-items: start; }
.recommendation-rail { grid-column: span 2; }
.card-list { margin: 0; padding: 0; list-style: none; }
.recommendation-rail .card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.recommendation-grid { margin-block-start: 1.5rem; }
.card-list li { min-inline-size: 0; }
.game-card {
  position: relative;
  display: block;
  height: 11.25rem;
  border-radius: .5rem;
  overflow: clip;
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
  box-shadow: 0 .25rem .55rem #070b1540;
}
.game-card:hover { background: #25324a; }
.game-card img {
  display: block;
  width: 100%;
  height: 6rem;
  object-fit: cover;
  background: #27334b;
}
.game-card time {
  position: absolute;
  inset: 3.95rem .5rem auto auto;
  border-radius: .2rem;
  padding: .16rem .4rem;
  color: #e7edf8;
  background: #111827dc;
  font-size: .72rem;
}
.game-card h3 {
  margin: .45rem .5rem .22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ff7a74;
  font-size: .9rem;
  line-height: 1.3;
}
.game-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: clip;
  margin: 0 .5rem .4rem;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
}
.player {
  --stage-ratio: 40 / 17;
  grid-column: span 4;
  min-inline-size: 0;
  overflow: hidden;
  border-radius: 0 0 .55rem .55rem;
  background: var(--panel);
  box-shadow: 0 .25rem .65rem #070b154d;
}
.player--ragdoll { --stage-ratio: 16 / 9; }
.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--stage-ratio);
  background: #050608;
  isolation: isolate;
}
.game-frame iframe, .game-cover, .game-loading {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.game-cover {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(.7rem, 2.5vw, 1.7rem);
  background: radial-gradient(ellipse at 50% 35%, #51668a 0%, #1b2b46 48%, #0e182b 82%);
}
.game-cover img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
}
.game-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#080e1a25, #080e1a91);
  pointer-events: none;
}
.play-button {
  z-index: 1;
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  gap: .7rem;
  border: 0;
  border-radius: .65rem;
  padding: .6rem clamp(.95rem, 2.4vw, 1.45rem);
  color: var(--lime-dark);
  background: var(--lime);
  font-weight: 850;
  box-shadow: 0 .35rem 1rem #080d1870;
}
.play-button:hover { background: #d6ffac; }
.play-icon {
  width: .7rem;
  height: .85rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.game-loading { place-content: center; justify-items: center; gap: .9rem; color: var(--muted); }
.game-loading:not([hidden]) { display: grid; }
.game-loading progress { width: min(11rem, 55vw); accent-color: var(--lime); }
.game-frame:fullscreen { width: 100%; height: 100%; }
.game-frame:fullscreen iframe { background: #080e1a; }
[data-player-expanded] { overflow: hidden; }
[data-player-expanded] .player::before {
  content: "";
  display: block;
  aspect-ratio: var(--stage-ratio);
}
.game-frame[data-expanded] {
  position: fixed;
  z-index: 10;
  inset: 0;
  height: 100%;
  height: 100dvh;
  aspect-ratio: auto;
}
.game-frame[data-expanded] iframe {
  inset: 3.25rem 0 0;
  height: calc(100% - 3.25rem);
}
.exit-expanded {
  position: absolute;
  z-index: 1;
  top: .4rem;
  right: .6rem;
  min-height: 2.5rem;
  padding: .35rem .75rem;
  border: 1px solid #8295b4;
  border-radius: .45rem;
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-weight: 700;
}
.player-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-block-size: 11.25rem;
  padding: 1.65rem .75rem 1.25rem;
}
.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: .5rem 1.25rem;
}
.player-bar > div { flex: 1 1 17rem; min-inline-size: 0; }
.player-bar h2 { margin: 0 0 .22rem; font-size: 1.125rem; line-height: 1.25; }
.player-bar p { margin: 0; color: var(--muted); font-size: .8rem; }
.player-bar .keyboard-note {
  display: none;
  margin-block-start: .3rem;
  color: var(--lime);
}
.player-actions, .comment-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.player-actions { justify-content: center; gap: .5rem; padding-inline: clamp(0rem, 1.5vw, 1.5rem); }
.ui-icon-definitions { position: absolute; }
.ui-icon {
  flex: none;
  width: .95rem;
  height: .95rem;
  fill: currentColor;
  pointer-events: none;
}
.player-actions :is(button, a), .fullscreen-button, .discussion button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .38rem .8rem;
  border: 1px solid var(--edge);
  border-radius: .55rem;
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-weight: 700;
}
.player-actions :is(button, a) {
  flex: 1 0 auto;
  gap: .42em;
  min-height: 2.5rem;
  border: 0;
  border-radius: 999px;
  font-size: .75rem;
  text-decoration: none;
}
.player-actions :is(button, a):hover { filter: brightness(1.15); }
.discussion button:hover, .fullscreen-button:hover { border-color: var(--lime); }
.player-actions [aria-pressed="true"] { color: var(--lime); border-color: var(--lime); }
.player-actions .share-icon-only { flex: 0 0 2.5rem; padding: 0; }
.fullscreen-button { gap: .55rem; background: transparent; border-color: #a6b3cc; }
.player-actions .share-facebook { background: #3b5998; }
.player-actions .share-x { background: #050608; }
.player-actions .share-email { background: #515e73; }
.player-actions .share-whatsapp { background: #147a44; }
.player-actions .share-copy { background: #a0cf4f; color: #17230e; }
.player-actions .share-reddit { background: #b13615; }
.player-actions .share-linkedin { background: #006995; }
.share-message { position: absolute; inset: auto .75rem .17rem auto; margin: 0; font-size: .74rem; }
.share-message:empty { display: none; }
.credit { margin: .65rem 0 0; color: var(--muted); font-size: .82rem; }
.credit a:hover { color: var(--lime); }

.game-guide { margin-block-start: clamp(2rem, 5.5vw, 5.5rem); }
.about-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: .5rem;
}
.about-game img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .55rem; }
.about-game h2 { font-size: clamp(1.35rem, 1rem + 1.35vw, 2rem); margin-bottom: .6rem; }
.section-panel, .info-page {
  margin-block: 1.15rem;
  padding: clamp(1rem, 3.4vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: .95rem;
}
.section-panel h2, .info-page h1 {
  margin-bottom: .65rem;
  font-size: clamp(1.35rem, 1.15rem + 1vw, 2rem);
  letter-spacing: -.033em;
  line-height: 1.2;
}
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.control-card { padding: .9rem 1rem; background: var(--surface); border-radius: .6rem; }
.control-card h3 { margin-bottom: .45rem; font-size: .95rem; color: var(--lime); }
.control-card dl { margin: 0; }
.control-card dl div { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; min-height: 2rem; }
.control-card dt { color: var(--muted); }
.control-card dd { margin: 0; font-size: .9rem; }
kbd {
  display: inline-block;
  background: #10182a;
  padding: .06rem .38rem;
  border: 1px solid #536381;
  border-radius: .3rem;
  line-height: 1.4;
  color: var(--text);
}
.prose > * { max-width: 78ch; }
.prose :is(p, li), .faq p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.prose h2:not(:first-child) { margin-top: 1.6rem; }
.prose h3 { margin-block: 1.1rem .5rem; font-size: 1.1rem; }
.prose a { color: var(--lime); text-underline-offset: .16em; }
.prose > :last-child { margin-block-end: 0; }
.info-page { margin-block: 2rem; min-height: 18rem; overflow-wrap: anywhere; }
.faq details { border-bottom: 1px solid var(--edge); }
.faq details:last-child { border-bottom: 0; }
.faq summary { min-height: 2.75rem; padding: .8rem .1rem; cursor: pointer; font-weight: 700; }
.faq summary::marker { color: var(--lime); }
.faq details p { max-width: 66ch; padding-inline-start: 1.15rem; }
.return-to-game { display: flex; justify-content: center; margin-block: 1.75rem; }
.return-to-game a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .45rem 1rem;
  border-radius: .55rem;
  color: var(--lime-dark);
  background: var(--lime);
  font-weight: 800;
  text-decoration: none;
}
.discussion form { display: grid; max-width: 42rem; gap: .55rem; }
.discussion label { font-size: .9rem; font-weight: 700; }
.discussion label span, .comment time { color: var(--muted); font-weight: 400; }
.discussion :is(input, textarea) {
  min-height: 2.75rem;
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid #536381;
  border-radius: .45rem;
  color: var(--text);
  background: #10182a;
}
.discussion input { max-width: 23rem; }
.discussion textarea { resize: vertical; }
.discussion [data-gf-comment-msg]:empty, .discussion [data-gf-reply-to]:empty,
.discussion form:not([data-gf-replying]) [data-gf-reply-cancel],
.comment:not([data-gf-owner]) [data-gf-c-owner] { display: none; }
.comment { margin-block-start: .9rem; padding: .8rem; border: 1px solid var(--edge); border-radius: .55rem; }
.comment p { overflow-wrap: anywhere; }
.comment[data-gf-owner] { border-color: #a0bb6c; }
.comment [data-gf-c-owner] { color: var(--lime); font-size: .8rem; }
.site-footer { margin-block-start: 2rem; border-top: 1px solid var(--edge); }
.footer-inner { padding-block: .4rem; }

@media (max-width: 40rem), (pointer: coarse) {
  .player-bar .keyboard-note { display: block; }
}

@media (max-width: 40rem) {
  .shell { width: calc(100% - 1.5rem); }
  .topbar { min-height: 4rem; padding-block: .35rem; }
  .brand img { width: 2.25rem; height: 2.25rem; }
  .top-nav { width: 100%; gap: 0 .5rem; }
  .top-nav :is(a, .language-trigger) { font-size: .8125rem; }
  .control-grid { grid-template-columns: 1fr; }
  .about-game { grid-template-columns: 1fr; gap: .75rem; }
  .play-area h1 { margin-block: .5rem .75rem; }
  .player { margin-inline: -.75rem; }
  .player-panel { min-block-size: 0; gap: .75rem; padding-block: .75rem 1.15rem; }
  .player-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .5rem;
  }
  .player-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(2.75rem, 1fr));
    padding-inline: 0;
  }
  .player-actions :is(button, a), .fullscreen-button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
  }
  .compact-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .recommendation-rail .card-list, .recommendation-grid .card-list { gap: .75rem; }
}

@media (min-width: 28rem) and (max-width: 40rem) {
  .player-actions { grid-template-columns: repeat(8, minmax(2.75rem, 1fr)); }
}

@media (max-width: 68rem) {
  .game-board { grid-template-columns: minmax(0, 1fr); }
  .player, .recommendation-rail { grid-column: auto; }
  .player { --stage-ratio: 16 / 9; }
  .recommendation-rail .card-list, .recommendation-grid .card-list {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  }
}

@media (max-width: 25rem) {
  .recommendation-rail .card-list, .recommendation-grid .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
