/* MintyArcade: one stylesheet for every page. Colours are tokens on :root; dark mode follows the device. */
:root {
  --mint: #19c79b;
  --mint-deep: #0b7a5f;
  --mint-soft: #d7f7ec;
  --pink: #ff5d8f;
  --sun: #ffc83d;

  --bg: #eef7f3;
  --surface: #ffffff;
  --surface-2: #f5faf8;
  --text: #13222c;
  --muted: #5b6d78;
  --border: #d6e6df;
  --shadow: 0 1px 2px rgb(16 40 34 / 8%), 0 6px 18px rgb(16 40 34 / 8%);
  --tile-shadow: 0 2px 0 rgb(16 40 34 / 10%), 0 8px 20px rgb(16 40 34 / 12%);
  --radius: 16px;
  --gutter: 16px;
  --max: 1320px;
  --display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1c26;
    --surface: #172833;
    --surface-2: #1d3240;
    --text: #eaf5f1;
    --muted: #9db3bd;
    --border: #284152;
    --mint-soft: #123d35;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 22px rgb(0 0 0 / 28%);
    --tile-shadow: 0 2px 0 rgb(0 0 0 / 35%), 0 10px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1c26; --surface: #172833; --surface-2: #1d3240; --text: #eaf5f1; --muted: #9db3bd;
  --border: #284152; --mint-soft: #123d35; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }
main { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 48px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.bar { max-width: var(--max); margin: 0 auto; padding: 10px var(--gutter) 6px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.logo-mark { width: 38px; height: 38px; }
.logo-word { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.01em; color: var(--text); }
.logo-word b { color: var(--mint); font-weight: 800; }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; display: flex; align-items: center; }
.search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600;
}
.search input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 25%, transparent); }
.chips { max-width: var(--max); margin: 0 auto; padding: 4px var(--gutter) 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border-radius: 999px; flex: none;
  background: var(--surface); border: 1.5px solid var(--border); text-decoration: none; font-weight: 700; font-size: 0.92rem;
  transition: border-color .15s, transform .15s;
}
.chip .icon { width: 18px; height: 18px; color: var(--mint); }
.chip:hover { border-color: var(--mint); transform: translateY(-1px); }

/* ---------- tiles and grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; }
.grid-roomy { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--tile, var(--mint)); box-shadow: var(--tile-shadow); text-decoration: none;
  transition: transform .18s cubic-bezier(.3,1.4,.6,1), box-shadow .18s;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover, .tile:focus-visible { transform: translateY(-3px) scale(1.03); }
.tile-name {
  position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.2;
  background: linear-gradient(transparent, rgb(0 0 0 / 70%)); opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s;
}
.tile:hover .tile-name, .tile:focus-visible .tile-name { opacity: 1; transform: none; }
@media (hover: none) { .tile-name { opacity: 1; transform: none; } }
.badge {
  position: absolute; top: 8px; left: 8px; background: var(--pink); color: #fff; font-weight: 800; font-size: .72rem;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.tile-soon {
  display: grid; place-items: center; text-align: center; padding: 12px; background: var(--surface-2);
  border: 2px dashed var(--border); box-shadow: none; color: var(--muted); font-weight: 700; font-size: .85rem; line-height: 1.3;
}
.tile-soon span { display: grid; justify-items: center; gap: 6px; }
.tile-soon .icon { color: var(--mint); width: 24px; height: 24px; }

.mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-flow: dense; gap: 16px; margin-bottom: 32px; }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile-big .tile-name { font-size: 1.3rem; padding: 40px 16px 14px; opacity: 1; transform: none; font-family: var(--display); }

.row { margin: 0 0 32px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.row-head h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 8px; }
.row-head h2 .icon { color: var(--mint); width: 24px; height: 24px; }
.row-more { font-weight: 800; color: var(--mint-deep); text-decoration: none; font-size: .95rem; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .row-more { color: var(--mint); } }
.row-more:hover { text-decoration: underline; }
.search-results { margin-bottom: 32px; }
.empty { color: var(--muted); }

.seo-text { max-width: 760px; margin: 48px 0 0; color: var(--muted); }
.seo-text h1 { font-size: 1.5rem; color: var(--text); margin-bottom: 8px; }
.seo-text a { color: var(--text); font-weight: 700; }

/* ---------- game page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { text-decoration: none; font-weight: 700; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.stage { min-width: 0; }
.player {
  position: relative; border-radius: 20px; overflow: hidden; background: #0b141b; box-shadow: var(--shadow);
  aspect-ratio: 16 / 10; max-height: calc(100vh - 220px); width: 100%;
}
.player[data-orientation="portrait"] { aspect-ratio: 4 / 3.4; }
.player::before {
  content: ""; position: absolute; inset: -40px; background: var(--poster) center / cover; filter: blur(36px) saturate(1.3) brightness(.65);
}
.poster { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: #fff; }
.poster img { width: clamp(110px, 26%, 200px); height: auto; aspect-ratio: 1; border-radius: 28px; box-shadow: 0 12px 40px rgb(0 0 0 / 45%); }
.poster-title { font-size: clamp(1.4rem, 3vw, 2.2rem); text-shadow: 0 2px 10px rgb(0 0 0 / 40%); }
.play-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 34px 12px 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mint); color: #fff; font: 800 1.3rem var(--display); box-shadow: 0 5px 0 var(--mint-deep), 0 10px 26px rgb(0 0 0 / 35%);
  transition: transform .12s, box-shadow .12s;
}
.play-btn .icon { width: 26px; height: 26px; }
.play-btn:hover { transform: translateY(-2px) scale(1.03); }
.play-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--mint-deep), 0 6px 16px rgb(0 0 0 / 30%); }
.soon-note { margin: 0; font-weight: 800; background: rgb(0 0 0 / 35%); padding: 8px 16px; border-radius: 999px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player.is-fake-full { position: fixed; inset: 0; z-index: 100; border-radius: 0; max-height: none; aspect-ratio: auto; height: 100dvh; }
.exit-full { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 2; border: 0; border-radius: 999px; padding: 6px 14px; font: 700 .9rem var(--body); background: rgb(0 0 0 / 60%); color: #fff; cursor: pointer; }

.game-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.game-bar img { width: 44px; height: 44px; border-radius: 12px; }
.game-bar-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.game-bar-title strong { font-family: var(--display); font-size: 1.15rem; }
.game-bar-title span { color: var(--muted); font-size: .88rem; }
.game-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color .15s, color .15s, transform .12s;
}
.icon-btn:hover { border-color: var(--mint); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[aria-pressed="true"] { color: var(--pink); border-color: var(--pink); }
.icon-btn[aria-pressed="true"] svg path { fill: currentColor; }

.side h2 { font-size: 1.2rem; margin-bottom: 10px; }
.grid-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.game-info { max-width: 820px; margin: 36px 0 40px; }
.info-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.lede { font-size: 1.15rem; color: var(--muted); margin: 4px 0 12px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--mint-soft); color: var(--text); text-decoration: none; font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.block { margin-top: 28px; }
.block h2 { font-size: 1.35rem; margin-bottom: 8px; }
.block p { margin: 0 0 10px; }
.steps { padding-left: 0; list-style: none; counter-reset: step; margin: 0; display: grid; gap: 8px; }
.steps li { counter-increment: step; display: flex; gap: 12px; align-items: baseline; }
.steps li::before {
  content: counter(step); flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--mint); color: #fff; font: 800 .95rem var(--display); transform: translateY(2px);
}
.controls, .details { margin: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.controls div, .details div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 16px; }
.controls div + div, .details div + div { border-top: 1px solid var(--border); }
.controls dt, .details dt { font-weight: 800; }
.controls dd, .details dd { margin: 0; color: var(--muted); }
.details a { color: var(--text); font-weight: 700; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.shots a { flex: none; scroll-snap-align: start; }
.shots img { height: 340px; width: auto; border-radius: 14px; border: 1px solid var(--border); }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 800 1.3rem/1 var(--display); color: var(--mint); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; justify-content: center; }
.store-btn { display: inline-flex; align-items: center; gap: 8px; background: #111; color: #fff; text-decoration: none; padding: 7px 16px 7px 12px; border-radius: 12px; font-weight: 800; line-height: 1.1; border: 1px solid rgb(255 255 255 / 25%); }
.store-btn .icon { width: 24px; height: 24px; }
.store-btn small { display: block; font-weight: 600; font-size: .7rem; opacity: .85; }

/* ---------- list and text pages ---------- */
.list-head { margin: 4px 0 20px; }
.list-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.list-head p { margin: 4px 0 0; color: var(--muted); font-size: 1.1rem; font-weight: 600; }
.prose { max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px clamp(18px, 4vw, 40px); }
.prose h1 { font-size: 2rem; margin-bottom: 12px; }
.prose h2 { font-size: 1.3rem; margin: 24px 0 6px; }
.prose a { color: var(--mint-deep); font-weight: 700; }
.not-found { text-align: center; padding: 24px 0; }
.not-found h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.not-found p { color: var(--muted); margin-bottom: 24px; }
.not-found .grid { max-width: 720px; margin: 0 auto; text-align: left; }

/* ---------- ads ---------- */
.ad-slot { margin: 20px 0; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.foot-grid { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 12px; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 24px; }
.foot-brand p { margin: 10px 0 0; max-width: 300px; }
.site-footer h2 { font-size: 1.05rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.site-footer ul a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-footer ul a:hover { color: var(--text); }
.copy { max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter) 28px; color: var(--muted); font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .game-layout { grid-template-columns: 1fr; }
  .grid-side { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .bar { flex-wrap: wrap; gap: 10px; }
  .search { max-width: none; flex-basis: 100%; order: 3; }
  .logo-word { font-size: 1.3rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .grid-roomy { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tile-big .tile-name { font-size: 1.1rem; padding: 30px 12px 10px; }
  .player, .player[data-orientation="portrait"] { aspect-ratio: 3 / 4; max-height: 70vh; border-radius: 16px; }
  .controls div, .details div { grid-template-columns: 96px 1fr; }
  .shots img { height: 260px; }
  .row-head h2 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
