:root {
  color-scheme: dark;
  --bg: #030300;
  --surface: #0a0802;
  --gold: #f4b72e;
  --gold-2: #ffe37a;
  --gold-dark: #5b4300;
  --red: #e92322;
  --green: #32d579;
  --cyan: #42d9ff;
  --text: #fff7dd;
  --muted: #c9b36c;
  --line: rgba(255, 208, 74, 0.28);
  --shadow: rgba(0, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  background: #000;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 100%, rgba(166, 122, 8, 0.42), transparent 26rem),
    linear-gradient(180deg, #020200 0%, #050400 48%, #2f2400 100%);
  color: var(--text);
  font-family: "Noto Sans Thai", system-ui, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.play-app {
  position: relative;
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 88px 10px 126px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(245, 188, 37, 0.12), transparent 13%, transparent 87%, rgba(245, 188, 37, 0.1)),
    linear-gradient(180deg, #050500 0%, #000 44%, #0b0800 70%, #3d2f00 100%);
  box-shadow: 0 0 52px rgba(0, 0, 0, 0.9);
}

.mobile-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  width: min(100%, 620px);
  min-height: 82px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) 12px 10px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.82) 56%, rgba(93, 69, 0, 0.64)),
    linear-gradient(90deg, rgba(255, 213, 52, 0.18), transparent 34%, rgba(255, 198, 22, 0.28));
  border-bottom: 1px solid rgba(255, 208, 47, 0.22);
}

.game-brand {
  min-width: 90px;
  display: grid;
  justify-items: center;
  gap: 0;
  color: #fff6c9;
  text-decoration: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.9));
}

.brand-crown {
  position: relative;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.brand-crown::before {
  content: "♛";
  position: absolute;
  left: 50%;
  top: -12px;
  color: var(--gold-2);
  font-size: 17px;
  transform: translateX(-50%);
}

.game-brand strong {
  min-width: 82px;
  display: block;
  padding: 2px 8px 3px;
  border: 1px solid #fff3b2;
  border-radius: 4px;
  background: #101010;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 188, 22, 0.38);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.pill {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pill-red {
  background: linear-gradient(180deg, #f34b3f, #c80b0a);
}

.pill-gold {
  color: #fff8db;
  background: linear-gradient(180deg, #f6c03e, #ac6f00);
}

.lang-button,
.menu-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.lang-button {
  font-size: 20px;
}

.category-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72px;
  gap: 1px;
  margin: -2px -10px 12px;
  padding: 9px 10px 11px;
  overflow-x: auto;
  background:
    linear-gradient(90deg, rgba(91, 68, 0, 0.82), rgba(7, 6, 1, 0.98) 18%, #030300 72%, rgba(97, 73, 0, 0.72)),
    #080600;
  border-bottom: 1px solid rgba(255, 203, 41, 0.14);
  scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category {
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #cfc2a0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
}

.category span {
  color: #b88b1b;
  font-size: 25px;
  line-height: 1;
}

.category.active,
.category.active span {
  color: var(--gold);
}

.promo-banner {
  position: relative;
  min-height: 160px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 18px 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 51, 0.68);
  border-radius: 8px;
  background:
    radial-gradient(circle at 93% 18%, rgba(255, 246, 137, 0.9), transparent 3px),
    radial-gradient(circle at 10% 80%, rgba(21, 214, 156, 0.5), transparent 38px),
    linear-gradient(135deg, rgba(39, 27, 0, 0.98), rgba(2, 2, 0, 0.98) 38%, rgba(93, 61, 0, 0.88)),
    #070500;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.48), inset 0 0 38px rgba(255, 212, 28, 0.12);
}

.promo-logo {
  position: absolute;
  top: 9px;
  left: 10px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 226, 99, 0.78);
  border-radius: 3px;
  color: var(--gold-2);
  background: #080808;
  font-size: 8px;
  font-weight: 800;
}

.promo-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  padding-top: 12px;
}

.promo-copy span,
.promo-copy strong {
  font-size: clamp(32px, 8vw, 48px);
  line-height: 0.98;
  font-weight: 800;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.85), 0 0 16px rgba(255, 199, 0, 0.42);
}

.promo-copy strong {
  color: #ffe64f;
}

.promo-copy small {
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px 5px;
  border: 1px solid rgba(255, 222, 77, 0.72);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.promo-figure {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 112px;
  align-self: end;
  border-radius: 46% 54% 44% 56%;
  background:
    radial-gradient(circle at 50% 24%, #fff6c4 0 10px, #e03d49 11px 21px, transparent 22px),
    radial-gradient(circle at 48% 45%, #f0404f 0 22px, transparent 23px),
    radial-gradient(circle at 40% 92%, #f0b523 0 32px, transparent 33px);
  filter: drop-shadow(0 0 18px rgba(255, 195, 21, 0.34));
}

.content-section {
  margin: 16px 0 0;
}

.content-section h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 0 14px rgba(255, 176, 0, 0.22);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-link {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 210, 62, 0.28);
  border-radius: 999px;
  color: #f7dc7b;
  background: rgba(255, 207, 45, 0.08);
  font-size: 12px;
}

.provider-row,
.game-row,
.mini-game-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 38%;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.game-row {
  grid-auto-columns: 31%;
}

.mini-game-row {
  grid-auto-columns: 28%;
}

.provider-row::-webkit-scrollbar,
.game-row::-webkit-scrollbar,
.mini-game-row::-webkit-scrollbar {
  display: none;
}

.provider-card,
.play-card,
.mini-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  text-align: left;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.45);
}

.provider-card {
  min-height: 126px;
  display: grid;
  align-content: end;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(255, 213, 47, 0.2);
}

.provider-card::before,
.play-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 28%, rgba(255, 255, 255, 0.24), transparent 18px),
    radial-gradient(circle at 78% 20%, rgba(255, 222, 74, 0.34), transparent 30px);
}

.provider-card span,
.provider-card strong {
  position: relative;
  z-index: 1;
}

.provider-card span {
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.provider-card strong {
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 800;
}

.provider-pg {
  background: linear-gradient(135deg, #251536, #d33163 46%, #f5a21d);
}

.provider-pp {
  background: linear-gradient(135deg, #170a0b, #8f2718 45%, #f4a722);
}

.provider-joker {
  background: linear-gradient(135deg, #180018, #68206a 48%, #0a0611);
}

.play-card {
  height: 184px;
  display: grid;
  align-content: end;
  gap: 2px;
  padding: 10px;
  color: #fff;
  isolation: isolate;
}

.play-card::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}

.play-card strong,
.play-card small,
.win-rate,
.players {
  position: relative;
  z-index: 1;
}

.play-card strong {
  max-width: 100%;
  font-size: 16px;
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.play-card small {
  color: #fff;
  font-size: 12px;
  line-height: 1.1;
}

.win-rate {
  position: absolute;
  top: 0;
  right: 8px;
  padding: 5px 7px;
  border-radius: 0 0 4px 4px;
  background: #15c375;
  font-size: 10px;
  font-weight: 800;
}

.win-rate.red {
  background: #f34e67;
}

.players {
  position: absolute;
  top: 33px;
  right: 8px;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  color: #ddd;
  font-size: 10px;
  font-weight: 700;
}

.card-aztec {
  background:
    radial-gradient(circle at 45% 28%, #f8d44f 0 23px, transparent 24px),
    linear-gradient(150deg, #864411, #17b887 42%, #12150b);
}

.card-phoenix {
  background:
    radial-gradient(circle at 52% 32%, #ffa5dd 0 36px, transparent 37px),
    linear-gradient(150deg, #520d87, #ed7d32 52%, #191025);
}

.card-ways {
  background:
    radial-gradient(circle at 60% 28%, #ffe86d 0 34px, transparent 35px),
    linear-gradient(150deg, #0cb983, #1fd2c8 48%, #f5c02d);
}

.card-gold {
  background:
    radial-gradient(circle at 70% 22%, #fff3a5 0 42px, transparent 43px),
    linear-gradient(150deg, #e4b019, #f4db80 43%, #951818);
}

.mini-card {
  height: 92px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 218, 70, 0.22);
  background: linear-gradient(180deg, rgba(37, 29, 0, 0.85), rgba(5, 5, 1, 0.86));
}

.mini-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #22c661;
  color: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(50, 213, 121, 0.45);
}

.mini-card.gift span,
.mini-card.gems span {
  background: transparent;
  box-shadow: none;
  font-size: 34px;
}

.mini-card strong {
  color: white;
  font-size: 12px;
  font-weight: 500;
}

.api-drawer {
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 204, 47, 0.18);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.34);
  color: #d8ca9c;
  font-size: 12px;
}

.api-drawer strong,
.api-drawer small {
  display: block;
}

.api-drawer pre {
  max-height: 90px;
  margin: 8px 0 0;
  overflow: auto;
  color: #9f915e;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.api-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.api-button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 208, 45, 0.12);
  color: #ffe68c;
  font-size: 12px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 24;
  width: min(100%, 620px);
  height: 94px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 2px;
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 224, 87, 0.35), transparent 86px),
    linear-gradient(180deg, rgba(27, 20, 0, 0.2), rgba(55, 42, 0, 0.96));
}

.bottom-nav a,
.play-now {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: white;
  text-decoration: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
}

.bottom-nav span {
  min-height: 30px;
  display: grid;
  place-items: center;
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(255, 213, 48, 0.34));
}

.play-now {
  position: relative;
  bottom: 16px;
  min-height: 86px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, #fff6bd, transparent 22px),
    linear-gradient(180deg, #f8d66d, #b47c10);
  color: #fff9d6;
  box-shadow: 0 0 26px rgba(255, 206, 37, 0.76), inset 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.play-now span {
  font-size: 30px;
}

@media (min-width: 621px) {
  body {
    padding: 22px 0;
  }

  .play-app {
    min-height: calc(100vh - 44px);
    border: 1px solid rgba(255, 214, 54, 0.22);
    border-radius: 8px;
  }

  .mobile-header,
  .bottom-nav {
    width: 620px;
  }
}

@media (max-width: 380px) {
  .pill {
    min-height: 31px;
    padding: 0 9px;
    font-size: 12px;
  }

  .game-row {
    grid-auto-columns: 34%;
  }

  .provider-row {
    grid-auto-columns: 42%;
  }

  .promo-copy small {
    font-size: 10px;
  }
}
