:root {
  font-family: Inter, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --gold: #e6c846;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  display: flex;
  justify-content: center;
  background: #171717;
  color: #f4f4f4;
  font-size: 13px;
}

body.drawer-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

.home-app {
  position: relative;
  display: flex;
  width: min(100%, 430px);
  height: 100vh;
  height: 100dvh;
  min-height: 620px;
  flex-direction: column;
  overflow: hidden;
  background: #676767;
  box-shadow: 0 0 34px #080808;
}

.home-header {
  position: relative;
  z-index: 2;
  display: flex;
  height: 70px;
  flex: 0 0 70px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: #303030;
}

.menu-button,
.header-icon {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-button {
  width: 28px;
  gap: 4px;
  justify-items: start;
}

.menu-button span {
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: #dedede;
}

.menu-button span:last-child {
  width: 15px;
}

.brand {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 130px;
  height: 56px;
  transform: translateX(-50%);
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-end;
  margin-left: auto;
}

.header-icon {
  position: relative;
  width: 24px;
  height: 30px;
  color: #f4f4f4;
}

.header-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account span {
  position: absolute;
  top: 1px;
  right: -4px;
  width: 12px;
  height: 8px;
  border: 1px solid #303030;
  border-radius: 5px;
  background: #7acb52;
}

.drawer-backdrop {
  position: absolute;
  z-index: 5;
  inset: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0);
  transition: background 220ms ease, visibility 220ms;
}

.drawer-backdrop.is-open {
  visibility: visible;
  background: rgba(0, 0, 0, 0.66);
}

.side-drawer {
  display: flex;
  width: min(430px, 100%);
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: 0 9px env(safe-area-inset-bottom);
  background: #171717;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.36);
  transform: translateX(-102%);
  transition: transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.drawer-backdrop.is-open .side-drawer {
  transform: translateX(0);
}

.more-backdrop {
  position: absolute;
  z-index: 6;
  inset: 0 0 70px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.more-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.more-sheet {
  position: absolute;
  z-index: 7;
  right: 0;
  bottom: 70px;
  left: 0;
  display: flex;
  height: min(400px, calc(100% - 150px));
  flex-direction: column;
  padding: 10px 22px 24px;
  border-radius: 10px 10px 0 0;
  background: #050505;
  transform: translateY(105%);
  transition: transform 260ms cubic-bezier(0.2, 0.75, 0.25, 1), visibility 260ms;
  visibility: hidden;
}

.more-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
}

.more-handle {
  width: 80px;
  height: 10px;
  flex: 0 0 10px;
  align-self: center;
  margin: 29px 0 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #666;
  cursor: pointer;
}

.more-close {
  position: absolute;
  top: 50px;
  left: 22px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #777;
}

.more-close svg {
  display: block;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.more-options {
  display: grid;
  gap: 9px;
}

.more-option {
  display: flex;
  height: 41px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 24px;
  background: #686868;
  color: #f4f4f4;
  font-size: 19px;
  font-weight: 700;
}

.more-option-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #eee;
  color: #666;
  font-size: 17px;
  line-height: 1;
}

.more-option-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: #666;
  stroke: #666;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.more-option.sign-out {
  display: flex;
  height: 41px;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  background: #a9000d;
  color: #fff;
  text-decoration: none;
}

.more-option.sign-out .more-option-icon {
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}

.drawer-header {
  display: flex;
  height: 60px;
  flex: 0 0 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.drawer-close {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: #777;
  color: #f5f5f5;
}

.drawer-close svg {
  display: block;
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.language-button {
  display: flex;
  height: 25px;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 16px;
  background: #555;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.language-button span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #eee;
  font-size: 15px;
}

.drawer-wallet {
  flex: 0 0 auto;
  margin: 9px 0 0;
  padding: 10px 13px 19px;
  border-radius: 5px;
  background: #666;
}

.drawer-account-name {
  margin: 0 0 10px;
  color: #eee;
  font-size: 12px;
}

.drawer-balance {
  display: flex;
  min-height: 41px;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px 4px 14px;
  border-radius: 5px;
  background: #080808;
  color: #ddd;
}

.drawer-balance > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 9px;
}

.drawer-balance strong {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.balance-actions {
  display: flex;
  gap: 10px;
}

.balance-actions button {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #686868;
  color: #eee;
  font-size: 20px;
  line-height: 1;
}

.balance-actions button svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-wallet-actions {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 0.75fr;
  gap: 5px;
  margin-top: 5px;
}

.drawer-wallet-actions a,
.drawer-wallet-actions button {
  display: flex;
  min-width: 0;
  height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 5px;
  border: 1px solid #d6ba53;
  border-radius: 18px;
  background: #262626;
  color: #f4f4f4;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.drawer-wallet-actions a {
  border-color: #e9ce5b;
  background: linear-gradient(180deg, #fff1a2, #d9b52f);
  color: #181818;
}

.drawer-wallet-actions span {
  font-size: 15px;
  font-weight: 700;
}

.drawer-categories {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 1.05fr 1fr 1px 1fr 1fr;
  align-items: stretch;
  overflow-y: auto;
  margin: 25px 2px 0;
  scrollbar-width: none;
}

.drawer-categories::-webkit-scrollbar {
  display: none;
}

.drawer-category {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}

.drawer-category svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #666;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  filter: grayscale(1);
  color: #666;
  font-size: 34px;
  line-height: 1;
}

.drawer-category.category-wide {
  grid-column: span 2;
}

.drawer-divider {
  grid-column: 1 / -1;
  align-self: center;
  height: 1px;
  margin: 0 8px;
  background: #383838;
}

.drawer-footer {
  display: grid;
  height: 70px;
  flex: 0 0 70px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 -9px;
  border-top: 1px solid #353535;
  background: #171717;
}

.drawer-footer a,
.drawer-footer button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.drawer-footer svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawer-footer .is-active {
  color: #d5b22d;
}

.drawer-footer button span,
.drawer-footer a span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.home-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.home-content::-webkit-scrollbar {
  display: none;
}

.jackpot-banner {
  display: block;
  width: 100%;
  aspect-ratio: 430 / 181;
  object-fit: cover;
}

.game-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 9px 19px;
  scrollbar-width: none;
}

.game-categories::-webkit-scrollbar {
  display: none;
}

.game-categories button {
  display: flex;
  min-width: 82px;
  height: 27px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: #555;
  font-size: 12px;
  white-space: nowrap;
}

.game-categories button span {
  font-size: 12px;
}

.game-categories button.is-active {
  background: linear-gradient(180deg, #ffe987, #ddb328);
  color: #151515;
}

.provider-list {
  display: grid;
  gap: 10px;
  padding: 0 8px 10px;
}

.provider-card {
  display: block;
  overflow: hidden;
  aspect-ratio: 413 / 90;
  border: 1px solid var(--gold);
  border-radius: 5px;
  background: #1b1b1b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.provider-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottom-nav {
  z-index: 2;
  display: grid;
  height: 70px;
  flex: 0 0 70px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #353535;
  background: #171717;
}

.bottom-nav button,
.bottom-nav a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bottom-nav svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav .is-active {
  color: #d5b22d;
}

.bottom-nav button span,
.bottom-nav a span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.landing-actions {
  z-index: 2;
  display: grid;
  height: 70px;
  flex: 0 0 70px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 0 9px;
  border-top: 1px solid #333;
  background: #171717;
}

.landing-actions a {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff3a2 0%, #e8ca42 62%, #c99e1d 100%);
  color: #111;
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

.landing-actions a:active {
  filter: brightness(0.93);
}

@media (max-width: 360px) {
  .home-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  @media (max-height: 650px) {
    .more-sheet {
      padding-top: 5px;
      padding-bottom: 10px;
    }

    .more-handle {
      margin-top: 15px;
      margin-bottom: 22px;
    }

    .more-close {
      top: 35px;
    }

    .more-options {
      gap: 6px;
    }

    .more-option {
      height: 36px;
      font-size: 16px;
    }
  }

  .header-actions {
    gap: 12px;
  }

  .brand {
    width: 122px;
  }
}
