:root {
  --green-950: #0e251b;
  --green-900: #0f352a;
  --gold: #f7aa0a;
  --gold-light: #eac63a;
  --gold-dark: #847021;
  --brown: #841b1d;
  --brown-dark: #3e2b00;
  --white: #ffffff;
  --field: #d9d9d9;
  --shadow: 0 3px 6px rgba(0, 0, 0, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: "Noto Sans Thai", "Prompt", Tahoma, Arial, sans-serif;
  font-size: 18px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(9, 48, 36, .38), rgba(9, 48, 36, .38)), url("assets/bg.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-page {
  min-height: 100vh;
  padding: 45px 16px 96px;
}

.login-shell {
  width: min(100%, 394px);
  margin: 0 auto;
}

.login-form {
  width: 100%;
}

.brand {
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.brand img {
  width: 100%;
  max-width: 394px;
  height: auto;
  display: block;
}

.form-stack {
  margin: 26px 0 47px;
}

.form-stack h1 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 19px;
  line-height: 1.5;
  font-weight: 700;
}

.field {
  display: block;
  margin-top: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--field);
  box-shadow: var(--shadow);
  padding: 8px;
}

.field input {
  width: 100%;
  height: 36px;
  border: 0;
  outline: 0;
  background: var(--field);
  color: #303438;
  padding: 0 12px;
  font-size: 15px;
}

.field input::placeholder {
  color: #6f777e;
  opacity: 1;
}

.account-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.account-row a {
  transition: opacity .2s ease;
}

.account-row a:hover {
  opacity: .72;
}

.main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  min-height: 50px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 20px;
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}

.main-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-btn,
.login-btn:disabled {
  cursor: default;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
}

.signup-btn {
  background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
}

.option-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 25px;
  padding: 0 4px;
}

.option-menu button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(90deg, #a47000, var(--brown-dark));
  cursor: pointer;
  transition: filter .2s ease;
}

.option-menu button:hover {
  filter: brightness(1.1);
}

.results-card {
  display: block;
  margin-top: 16px;
  overflow: hidden;
  border: 2px solid #f1df54;
  border-radius: 8px;
  background: #fff;
  color: #20394f;
}

.game-title {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #c5c24f;
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.results-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.results-card th,
.results-card td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(96, 132, 160, .22);
  background: #fff;
  text-align: center;
  font-weight: 400;
}

.results-card tr:last-child td {
  border-bottom: 0;
}

.results-card th:first-child,
.results-card td:first-child {
  width: 48%;
  text-align: left;
}

.results-card th:not(:first-child),
.results-card td:not(:first-child) {
  width: 17.33%;
}

.lotto-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f0d04a 0 13%, transparent 15%),
    radial-gradient(circle at 38% 42%, #ee4040 0 11%, transparent 12%),
    radial-gradient(circle at 62% 42%, #33a5d8 0 11%, transparent 12%),
    #1e4c69;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28);
}

.banner,
.bottom-image {
  display: block;
  margin-top: 32px;
  overflow: hidden;
  border-radius: 12px;
}

.bottom-image {
  margin-top: 18px;
}

.banner img,
.bottom-image img {
  display: block;
  width: 100%;
  height: auto;
}

.chat-agent {
  position: fixed;
  z-index: 70;
  right: 14px;
  bottom: 76px;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

.chat-agent span,
.chat-agent span::before {
  display: block;
  width: 22px;
  height: 16px;
  border: 3px solid var(--white);
  border-radius: 13px;
  position: relative;
}

.chat-agent span::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 12px;
  right: -13px;
  top: 4px;
  background: var(--gold);
}

.chat-agent span::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -8px;
  border: 5px solid transparent;
  border-top-color: var(--white);
  transform: rotate(20deg);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.modal-panel {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  color: #1f2933;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.modal-panel h2 {
  margin: 0 0 12px;
  color: var(--green-900);
  font-size: 22px;
}

.modal-panel ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.rules-content {
  color: #152433;
  line-height: 1.8;
}

.rules-content h3 {
  margin: 0 0 20px;
  color: #152433;
  font-size: 18px;
  font-weight: 800;
}

.rules-content h4 {
  margin: 24px 0 8px;
  color: #152433;
  font-size: 16px;
  font-weight: 800;
}

.rules-content ul {
  margin: 0;
  padding-left: 22px;
}

.rules-content li {
  margin: 6px 0;
}

.rules-closing {
  margin: 28px 0 0;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #42515c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.payrate-view[hidden] {
  display: none;
}

.payrate-view {
  position: fixed;
  inset: 0;
  z-index: 45;
  overflow: auto;
  color: #07182a;
  background-image: linear-gradient(rgba(9, 48, 36, .36), rgba(9, 48, 36, .36)), url("assets/bg.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.payrate-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(9, 48, 36, .36), rgba(9, 48, 36, .36)), url("assets/bg.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.payrate-wrap {
  width: min(100%, 548px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 12px 96px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  margin: 0 0 62px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.back-btn::first-letter {
  font-size: 32px;
  line-height: 1;
}

.payrate-wrap h2 {
  margin: 0 0 34px;
  color: #fff;
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
}

.payrate-card {
  margin-top: 28px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  color: #061729;
}

.payrate-card:first-of-type {
  margin-top: 0;
}

.payrate-card h3 {
  margin: 0;
  padding: 15px 20px;
  background: #f2d232;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.payrate-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 16px;
}

.payrate-card th,
.payrate-card td {
  height: 52px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(63, 91, 114, .18);
  background: #fff;
  text-align: left;
  font-weight: 400;
}

.payrate-card th {
  font-weight: 800;
}

.payrate-card th:last-child,
.payrate-card td:last-child {
  text-align: right;
}

.payrate-card tr:last-child td {
  border-bottom: 0;
}

.payrate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.payrate-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 575px) {
  body {
    font-size: 16px;
    overflow-x: hidden;
  }

  .login-page {
    padding-top: 36px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .login-shell {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand {
    width: calc(100vw - 32px);
    margin-left: 50%;
    padding: 0;
    transform: translateX(-50%);
  }

  .main-btn {
    font-size: 18px;
  }

  .form-stack {
    margin-bottom: 44px;
  }

  .option-menu {
    margin-top: 36px;
  }

  .results-card {
    margin-top: 16px;
  }

  .results-card table {
    font-size: 13px;
  }

  .results-card th,
  .results-card td {
    padding: 13px 8px;
  }

  .results-card th:first-child,
  .results-card td:first-child {
    width: 48%;
  }

  .banner {
    margin-top: 32px;
  }

  .banner,
  .bottom-image {
    border-radius: 10px;
  }
}
