/* The look of the site's own pages (/ and /games/), 2026-10-21.
   Deniz: "not like AI". So: no glows, no gradient text, no star fields, no
   emoji on every line. Flat colours, real screenshots of the games, hard
   shadows, short sentences. Games keep their own look. */

:root {
  --bg: #15161e;
  --panel: #20222e;
  --panel-2: #2a2d3b;
  --ink: #f4f3ef;
  --dim: #b4b3c0;
  --faint: #7d7c8c;
  --line: #34374a;
  --yellow: #ffd23f;
  --red: #ff5a5f;
  --green: #3ddc84;
  --blue: #4da3ff;
  --shadow: #07080c;
  --r: 14px;
  --font: "Avenir Next", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body { overflow-x: hidden; }

a { color: inherit; }

/* ---- top bar ---- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 72rem;
  margin: 0 auto;
  min-height: 64px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--bg);
  font-size: 1.3rem;
  font-weight: 900;
  transform: rotate(-6deg);
  box-shadow: 3px 3px 0 var(--shadow);
}

.nav { display: flex; gap: 4px; }

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--dim);
  font-weight: 800;
  text-decoration: none;
}
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a.on { color: var(--ink); }

.spacer { flex: 1; }

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  font: 800 1rem var(--font);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--shadow);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn.yellow { background: var(--yellow); color: #17140a; }
.btn.big { min-height: 56px; padding: 0 28px; font-size: 1.15rem; }
.btn.plain { background: transparent; box-shadow: none; color: var(--dim); }
.btn.plain:hover { color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }

.me {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 44vw;
}
.me .who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}
.me .dot.safe { background: var(--green); }

/* ---- page ---- */

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.hi {
  margin: 8px 0 28px;
}
.hi h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.hi h1 .mark {
  background: var(--yellow);
  color: #17140a;
  padding: 0 0.18em;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hi p {
  margin: 12px 0 0;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--dim);
}
.hi .facts {
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--faint);
}

h2.sec {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 36px 0 14px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
h2.sec small { font-size: 0.9rem; font-weight: 700; color: var(--faint); }

/* ---- the newest game, big ---- */

.feature {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  border: 2px solid var(--line);
  text-decoration: none;
  box-shadow: 6px 6px 0 var(--shadow);
}
.feature .shot { aspect-ratio: 16 / 10; }
.feature .txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}
.feature .tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  transform: rotate(-3deg);
}
.feature h3 { margin: 0; font-size: 1.9rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.feature p { margin: 0; color: var(--dim); line-height: 1.5; }
.feature .btn { align-self: flex-start; margin-top: 4px; }

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .feature .txt { padding: 18px; }
  .feature h3 { font-size: 1.5rem; }
}

/* ---- game tiles ---- */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  background: var(--c, var(--panel-2));
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
/* a game without a screenshot yet: its colour and its emoji */
.shot .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.4rem;
}

.tile .shot {
  border: 2px solid var(--line);
  box-shadow: 0 0 0 var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tile:hover .shot, .tile:focus-visible .shot {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--shadow);
  border-color: var(--yellow);
}
.tile:focus-visible { outline: none; }
.tile:hover .shot img { transform: scale(1.04); }
.tile:active .shot { transform: none; box-shadow: none; }

.tile .name {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
}
.tile .what {
  margin-top: 3px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--dim);
}
.tile .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--faint);
}
.tile .meta:empty { display: none; }
.tile .meta .best { color: var(--yellow); }

/* stickers on the screenshot */
.sticker {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--yellow);
  color: #17140a;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 var(--shadow);
}
.sticker.red { background: var(--red); color: #fff; }
.sticker.grey { background: #55586b; color: #fff; }

.tile.off .shot img { filter: grayscale(1) brightness(0.6); }

.note {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.loading, .empty { color: var(--faint); }

@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .tile .name { font-size: 0.95rem; margin-top: 8px; }
  .tile .what { font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .nav { display: none; }
  .logo .long { display: none; }
}

/* the limited-time card (games.js dcEventCard) reuses .tile; keep it a tile */
.tile.dc-event {
  padding: 0 !important;
  min-height: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}
.tile.dc-event::after { content: none !important; }
.tile.dc-event .name { color: inherit !important; text-shadow: none !important; font-size: 1.05rem !important; }
.tile.dc-event .dc-ev-left {
  align-self: flex-start;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 8px;
  background: #ff7a00;
  color: #1a0b00;
  font: 800 0.8rem var(--font);
}

footer.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- the sign-in sheet ---- */

.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 9, 13, 0.78);
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px 22px 22px;
  border-radius: 20px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 var(--shadow);
  animation: sheetIn 0.18s ease-out;
}
@keyframes sheetIn { from { transform: translateY(14px); opacity: 0; } }
.sheet h2 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; }
.sheet p { margin: 0 0 18px; color: var(--dim); line-height: 1.5; }
.sheet .x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--dim);
  font: 900 1.3rem var(--font);
  cursor: pointer;
}
.sheet .x:hover { background: var(--panel-2); color: var(--ink); }
.sheet label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--dim);
}
.field {
  position: relative;
  margin-bottom: 14px;
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 700 1.1rem var(--font);
  outline: none;
}
.field input:focus { border-color: var(--yellow); }
.field.pw input { padding-right: 60px; }
.field .eye {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 48px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  font: 800 0.8rem var(--font);
  cursor: pointer;
}
.field .eye:hover { color: var(--ink); background: var(--panel-2); }
.sheet .msg {
  min-height: 1.4em;
  margin: -4px 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--red);
}
.sheet .msg.ok { color: var(--green); }
.sheet .row { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet .row .btn { flex: 1; }
.sheet .small {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--faint);
  line-height: 1.5;
}
.strength {
  height: 6px;
  margin: -6px 0 14px;
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}
.strength i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width 0.2s ease, background 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .tile .shot, .shot img, .btn { transition: none; }
}

.tiles .tile.dc-event { grid-column: span 2; }
.tiles .tile.dc-event .shot { aspect-ratio: 32 / 10; }
.sheet .row .btn.plain { flex: none; white-space: nowrap; }

/* ---- moving preview: a strip of frames, one frame tall, stepped through ---- */
.shot .strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
}
.shot.has-strip.playing .strip {
  opacity: 1;
  animation: flip 3.6s steps(var(--frames, 8)) infinite;
}
.shot.has-strip.playing .cover { visibility: hidden; }
@keyframes flip { to { transform: translateY(-100%); } }

/* ---- genre tags ---- */
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tg {
  padding: 2px 8px;
  border-radius: 6px;
  border: 2px solid var(--t);
  color: var(--t);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.feature .tags { margin-top: 0; }

/* ---- a game's page (the sheet, wide) ---- */
.sheet.wide {
  max-width: 640px;
  padding: 0;
  overflow-x: hidden;
}
.sheet.wide .x {
  z-index: 2;
  background: rgba(8, 9, 13, 0.7);
  color: #fff;
}
.g-top .shot { border-radius: 0; aspect-ratio: 16 / 10; }
.g-body { padding: 18px 22px 22px; }
.g-body h2 { margin: 0; }
.g-body .g-what { margin: 10px 0 0; color: var(--ink); font-size: 1.05rem; }
.g-body h3 {
  margin: 18px 0 8px;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.g-how { margin: 0; padding-left: 1.2em; color: var(--dim); line-height: 1.55; }
.g-how li + li { margin-top: 3px; }
.g-top3 { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.g-top3 li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg);
  counter-increment: r;
  font-weight: 800;
}
.g-top3 li + li { margin-top: 5px; }
.g-top3 li::before { content: counter(r) "."; width: 1.4em; color: var(--yellow); }
.g-top3 .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-top3 .s { color: var(--dim); }
.g-play { display: flex; width: 100%; margin-top: 20px; }
@media (max-width: 520px) {
  .sheet-back:has(.sheet.wide) { padding: 0; align-items: flex-end; }
  .sheet.wide { max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .g-body { padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .shot.has-strip.playing .strip { animation-duration: 8s; }
}
/* "Oyna" stays in reach while the page scrolls */
.g-play { position: sticky; bottom: 12px; z-index: 1; box-shadow: 0 4px 0 var(--shadow), 0 -14px 24px 6px var(--panel); }
