:root {
  --bg: #120d33;
  --bg2: #1d1650;
  --card: #241b63;
  --edge: #3b2f9e;
  --text: #f4f1ff;
  --soft: #b9b0ec;
  --gold: #ffc93c;
  --gold-deep: #c46f00;
  --violet: #7867ff;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% -10%, #2c2283 0%, var(--bg) 60%);
  line-height: 1.5;
}
a {
  color: var(--gold);
}
.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
header.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 3px 0 #b06a00;
}
.grow {
  flex: 1;
}
.pill {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 3px 0 #150f3c;
  color: var(--text);
  font: 800 15px 'Nunito', system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.hero {
  text-align: center;
  padding: 28px 0 8px;
}
.hero h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(34px, 7vw, 60px);
  line-height: 1.05;
  color: var(--gold);
  text-shadow: 0 4px 0 var(--gold-deep);
}
.hero p {
  margin: 14px auto 0;
  max-width: 560px;
  color: var(--soft);
  font-size: 18px;
  font-weight: 700;
}
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 32px 0 40px;
}
.game {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 6px 0 #150f3c, inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.game:hover {
  transform: translateY(-3px);
}
.game img,
.game .art {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.game .art {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2d6a4f, #1b4332 55%, #081c15);
  font-size: 64px;
}
.game-body {
  padding: 16px 18px 20px;
  display: grid;
  /* title, text and tags keep their own height; the leftover space goes above the Play button,
     so cards of different text length line up without stretching the tags */
  grid-template-rows: auto auto auto 1fr;
  gap: 6px;
  flex: 1;
}
.game h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}
.game p {
  margin: 0;
  color: var(--soft);
  font-weight: 600;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-self: start;
  gap: 6px;
  margin-top: 4px;
}
.tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: #140f3a;
  border: 1px solid var(--edge);
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}
.play {
  margin-top: 12px;
  justify-self: start;
  align-self: end;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd34d, #f5a300);
  box-shadow: 0 3px 0 #b06a00;
  color: #4a2a00;
  font-weight: 900;
  font-size: 17px;
}
.howto {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 6px 0 #150f3c;
}
.howto-text {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-weight: 700;
}
.howto-text b {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}
.howto-video {
  flex: none;
  width: 220px;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: #000;
}
@media (max-width: 520px) {
  .howto {
    flex-direction: column;
    text-align: center;
  }
  .howto-video {
    width: min(300px, 100%);
  }
}
.community {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 40px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3a2a9e, #241b63);
  border: 2px solid rgba(255, 201, 60, 0.55);
  box-shadow: 0 6px 0 #150f3c;
}
.community-text {
  flex: 1;
  display: grid;
  gap: 4px;
  color: var(--soft);
  font-weight: 700;
}
.community-text b {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}
.community-btn {
  display: inline-block;
  margin-top: 0;
  flex: none;
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .community {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .community-btn {
    align-self: center;
    text-align: center;
  }
}
.page {
  max-width: 720px;
  padding: 12px 16px 40px; /* the 16px sides of .wrap stay, so text never touches a phone's edge */
}
.page h1 {
  font-weight: 900;
  color: var(--gold);
  margin: 8px 0 12px;
}
.page h2 {
  font-weight: 900;
  margin: 28px 0 6px;
  font-size: 20px;
}
.page p,
.page li {
  color: #ddd8fb;
}
/* articles: guides and stories */
.article {
  line-height: 1.6;
}
.article .lead {
  font-size: 17px;
}
.article h3 {
  font-weight: 900;
  margin: 20px 0 4px;
  font-size: 17px;
  color: var(--gold);
}
.article ol,
.article ul {
  padding-left: 22px;
}
.article li {
  margin: 4px 0;
}
.article a {
  color: var(--gold);
}
.article .sources {
  font-size: 14px;
}
.article .cta {
  margin: 28px 0 0;
}
.article .cta .play {
  display: inline-block;
  color: #4a2a00;
  text-decoration: none;
}
/* home page: guides and stories */
.learn {
  margin: 0 0 32px;
}
.learn h2 {
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 12px;
}
.learn-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.learn-list a {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #241b63;
  border: 1px solid #3a2a9e;
  color: inherit;
  text-decoration: none;
}
.learn-list a b {
  color: var(--gold);
}
.learn-list a span {
  color: #ddd8fb;
  font-size: 14px;
}
footer.foot {
  border-top: 1px solid #2a2170;
  padding: 22px 16px 32px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}
footer.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
footer.foot a {
  color: var(--soft);
}
[data-mn] {
  display: none;
}
html[lang='mn'] [data-en] {
  display: none;
}
html[lang='mn'] [data-mn] {
  display: revert;
}

.install {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px auto 0;
  max-width: 640px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: 0 4px 0 #150f3c;
}
.install[hidden] {
  display: none;
}
.install img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: 0 0 auto;
}
.install-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  color: var(--soft);
  font-weight: 700;
  font-size: 14px;
}
.install-text b {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}
.install-text small {
  color: var(--gold);
  font-size: 13px;
}
.install-text small[hidden] {
  display: none;
}
.install-btn {
  margin: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
}
.install-btn[hidden] {
  display: none;
}
@media (max-width: 560px) {
  .install {
    flex-wrap: wrap;
  }
  .install-text {
    flex: 1 1 200px;
  }
  .install-btn {
    width: 100%;
    text-align: center;
  }
}

/* fair play note: free games, cosmetic purchases only, no betting */
.hero p.fair {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
}
.fair-foot {
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.8;
}
/* the how-to video box is Mongolian only; keep its flex layout when the language rule reveals it */
html[lang='mn'] section.howto {
  display: flex;
}

/* social accounts in the footer: big round icons, easy to tap on a phone */
footer.foot .social {
  margin: 0 0 18px;
}
footer.foot .social p {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 800;
}
footer.foot .social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
footer.foot .social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--edge);
  color: var(--text);
}
footer.foot .social-row a:hover,
footer.foot .social-row a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}
footer.foot .social-row svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
