.bet {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.bet-popup {
  position: relative;
  width: 94vw;
  height: auto;
  background: var(--popup-color);
  border-radius: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.header-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.h1-header {
  background: linear-gradient(180deg, #1b213d 0%, #2c3560 32%, #2c3560 72%, #1f2646 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  font-family: var(--basic-font);
  font-size: clamp(16px, 3.5vh, 20px);
  font-style: normal;
  font-weight: 900;
  line-height: normal;
  position: relative;
  display: inline-block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: visible;
  text-align: center;
  margin-bottom: 10px;
}
.h1-header::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 -0.5px 0 rgba(36, 44, 79, 0.55), 0 0.5px 0 rgba(176, 187, 211, 0.85);
  filter: none;
  transform: none;
}

.header-underline {
  width: 300px;
  height: 2px;
  background: linear-gradient(90deg, rgba(147, 154, 187, 0) 0%, #ffffff 47.5%, rgba(147, 154, 187, 0) 97.81%);
  margin-top: 6px;
  opacity: 0.3;
}

.bet-subtitle {
  font-family: "Nunito", sans-serif;
  color: white;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-size: clamp(16px, 1.5vw, 18px);
  margin-bottom: 10px;
  margin-top: 5px;
}

.bet-scroll-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.bet-scroll {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bet-scroll-arrow {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 1;
}
.bet-scroll-arrow.disabled {
  color: #545D84;
  cursor: default;
  pointer-events: none;
}

.bet-pages {
  width: 100%;
  display: flex;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  white-space: nowrap;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bet-pages::-webkit-scrollbar {
  display: none;
}

.bet-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
}
.bet-page.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.bet-page.inactive {
  display: none;
  transform: translateX(100%);
  opacity: 1;
}

.option {
  position: relative;
  height: clamp(34px, 4.2vw, 38px);
  width: clamp(60px, 16vw, 74px);
  background: linear-gradient(0deg, rgba(171, 194, 223, 0.8) -17.31%, rgba(210, 220, 239, 0.8) 115.04%);
  color: #485074;
  border-radius: clamp(10px, 1vw, 12px);
  box-shadow: 0px 2px 2px rgba(39, 46, 77, 0.6), inset 0px 0px 3px rgba(255, 255, 255, 0.5), inset 0px 2px 2px rgba(255, 255, 255, 0.5);
  font-family: "Nunito", sans-serif;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 800;
  border: none;
  cursor: pointer;
  justify-self: center;
  align-self: center;
  aspect-ratio: 2.1/1;
}
.option.selected {
  color: white;
  background: linear-gradient(270deg, #218444 11.61%, #17BA77 68.43%, #01E13C 97.09%);
  box-shadow: 0px 2px 2px rgba(39, 46, 77, 0.6), inset 0px 0px 3px #FFFFFF, inset 0px 2px 2px rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.option.recommended {
  color: white;
  z-index: 1;
}
.option.recommended::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: clamp(10px, 1vw, 12px);
  background: linear-gradient(to bottom, rgb(255, 241, 3), rgb(255, 106, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.option.recommended::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg.../>");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}
.option.recommended.selected {
  border-width: 1px;
}
.option.freebet::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: clamp(10px, 1vw, 12px);
  background: linear-gradient(to bottom, rgb(45, 255, 3), rgb(4, 168, 86));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  border-width: 1px;
}
.option.freebet::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg.../>");
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}
.option.freebet.selected {
  border: none;
  color: white;
  background: linear-gradient(96deg, rgb(21, 29, 57) -12.37%, rgb(93, 102, 143) 99.42%);
}
.option.freebet.selected::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: clamp(10px, 1vw, 12px);
  background: linear-gradient(to bottom, rgb(45, 255, 3), rgb(4, 168, 86));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  border-width: 2px;
}

.bet-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 15px;
  position: relative;
  z-index: 999;
}

.bet-scroll-arrow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.max-button {
  font-family: "Nunito", sans-serif;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: clamp(10px, 1vw, 12px);
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 6px 13px;
  border: none;
  background: radial-gradient(100% 100% at 50% 0%, #6A739A 0%, #404972 57.77%, #3A4269 100%);
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.5), inset 0px 0.7px 0px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  margin: 15px auto 0;
  cursor: pointer;
  position: relative;
  z-index: 10;
}
.max-button::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: clamp(10px, 1vw, 12px);
  background: linear-gradient(to right, #ffcf25, #ee3d2b);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.max-button:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(100% 100% at 50% 0%, #6A739A 0%, #404972 57.77%, #3A4269 100%);
  box-shadow: 0px 0.8px 0.8px rgba(0, 0, 0, 0.5), inset 0px 0.7px 0px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
}
.dot.active {
  background: white;
}

#bet-confirm {
  position: absolute;
  width: 104px;
  height: 44px;
  cursor: pointer;
  bottom: 0;
  right: 0;
}

.bet-scroll-arrow {
  pointer-events: auto;
  flex-shrink: 0;
  width: clamp(34px, 6vw + 2vh, 48px);
  height: clamp(34px, 6vw + 2vh, 48px);
  border-radius: clamp(14px, 2vw, 16px);
  border: none;
  background: radial-gradient(100% 100% at 50% 0%, rgba(165, 175, 220, 0.55) 0%, rgba(67, 79, 135, 0.55) 57.77%, rgba(46, 56, 102, 0.55) 100%);
  box-shadow: 0px 2.01885px 2.01885px rgba(9, 33, 63, 0.5), inset 0px 0.706598px 0px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bet-scroll-arrow .arrow-icon {
  display: block;
  position: relative;
  color: #ffffff;
  filter: none;
}
.bet-scroll-arrow .arrow-icon svg {
  display: block;
}
.bet-scroll-arrow .arrow-icon svg .arrow-path {
  transition: fill 0.2s ease;
}
.bet-scroll-arrow:hover:not(.disabled) .arrow-icon {
  filter: brightness(1.2);
}
.bet-scroll-arrow:active:not(.disabled) {
  transform: scale(0.92);
}
.bet-scroll-arrow.disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}
.bet-scroll-arrow.disabled .arrow-icon svg .arrow-path {
  fill: url(#paint0_radial_2740_3606);
}
.bet-scroll-arrow.right .arrow-icon {
  transform: translateX(2px);
}
.bet-scroll-arrow.left .arrow-icon {
  transform: scaleX(-1) translateX(2px);
}

@media (orientation: portrait) {
  .h1-header {
    font-size: clamp(14px, 3vh, 18px);
  }
  .bet-popup {
    width: 94vw;
    height: auto;
    padding: 12px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .header-container {
    padding-bottom: 8px;
  }
  .bet-scroll {
    width: 100%;
  }
  .bet-pages {
    width: 100%;
    display: flex;
    height: calc(clamp(30px, 9vw, 38px) * 5 + 10px);
  }
  .bet-page {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(30px, 9vw, 38px);
    gap: clamp(8px, 2.5vw, 14px) clamp(4px, 1.8vw, 8px);
    justify-items: stretch;
    align-items: stretch;
    align-content: start;
  }
  .bet-page.active {
    display: grid;
  }
  .bet-page.inactive {
    display: none;
  }
  .option {
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 30px;
    font-size: clamp(14px, 3.5vw, 16px);
    justify-self: stretch;
    align-self: stretch;
  }
  .max-button {
    height: clamp(40px, 5vw, 46px);
    width: clamp(76px, 20vw, 96px);
    font-size: clamp(18px, 2vw, 19px);
    margin: 8px auto 0;
    align-self: center;
    display: block;
  }
}
@media (orientation: landscape) {
  .bet-popup {
    max-width: 675px;
    padding: 10px 15px;
  }
  .h1-header {
    font-size: clamp(16px, 4.5vh, 20px);
  }
  .bet-pages {
    min-height: 140px;
  }
  .bet-page {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 10px;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .max-button {
    height: clamp(34px, 4.2vw, 38px);
    width: clamp(60px, 16vw, 74px);
    font-size: 18px;
  }
}
@media (orientation: landscape) and (max-height: 480px) {
  @media (max-height: 415px) or (max-aspect-ratio: 21/9) {
    .bet-popup {
      padding-top: 4px;
      padding-bottom: 4px;
      max-height: 96dvh;
    }
    .header-container {
      padding-bottom: 0px;
    }
    .h1-header {
      font-size: clamp(11px, 3.8dvh, 14px);
    }
    .header-underline {
      display: block;
      width: clamp(100px, 30dvw, 150px);
      height: 1px;
      margin-top: 0px;
    }
    .bet-subtitle {
      font-size: clamp(9px, 3dvh, 11px);
      margin-top: 0px;
      margin-bottom: 2px;
    }
    .bet-pages {
      height: calc(clamp(20px, 7.5dvh, 26px) * 3 + 8px);
    }
    .bet-page {
      grid-auto-rows: clamp(20px, 7.5dvh, 26px);
      gap: 3px clamp(4px, 1.2dvh, 8px);
    }
    .option {
      font-size: clamp(10px, 3.2dvh, 12px);
      min-height: 20px;
    }
    .max-button {
      height: clamp(24px, 8dvh, 28px);
      width: clamp(55px, 16dvh, 74px);
      font-size: clamp(11px, 3.5dvh, 13px);
      margin: 3px auto 0;
    }
    .bet-footer {
      margin-top: 3px;
      gap: 0;
    }
    .bet-scroll-arrow {
      width: clamp(26px, 9dvh, 32px);
      height: clamp(26px, 9dvh, 32px);
      border-radius: 6px;
    }
  }
  .bet-popup {
    width: 90dvw;
    padding: clamp(6px, 2.5dvh, 12px) clamp(10px, 2dvw, 16px);
    max-height: 96dvh;
  }
  .header-container {
    padding-bottom: clamp(2px, 1dvh, 4px);
  }
  .h1-header {
    font-size: clamp(18px, 5vh, 26px);
  }
  .header-underline {
    width: clamp(160px, 40dvw, 240px);
    margin-top: 2px;
  }
  .bet-subtitle {
    font-size: clamp(11px, 3.5dvh, 14px);
    margin-top: 1px;
    margin-bottom: clamp(4px, 1.5dvh, 8px);
  }
  .bet-pages {
    min-height: auto;
    display: flex;
    height: calc(clamp(24px, 8.5dvh, 32px) * 3 + clamp(4px, 1.5dvh, 8px) * 2);
  }
  .bet-page {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: clamp(24px, 8.5dvh, 32px);
    gap: clamp(4px, 1.5dvh, 8px) clamp(4px, 1.2dvh, 8px);
    justify-items: stretch;
    align-items: stretch;
    align-content: start;
  }
  .bet-page.active {
    position: relative;
    display: grid;
  }
  .bet-page.inactive {
    display: none;
  }
  .option {
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 24px;
    font-size: clamp(12px, 3.5dvh, 14px);
    justify-self: stretch;
    align-self: stretch;
  }
  .max-button {
    height: clamp(30px, 9dvh, 36px);
    width: clamp(66px, 18dvh, 80px);
    font-size: clamp(13px, 3.8dvh, 15px);
    margin: clamp(6px, 2dvh, 10px) auto 0;
  }
  .bet-footer {
    margin-top: clamp(6px, 1.8dvh, 12px);
    gap: 4px;
  }
  .bet-scroll-arrow {
    width: clamp(34px, 11dvh, 40px);
    height: clamp(34px, 11dvh, 40px);
    border-radius: clamp(10px, 2dvh, 12px);
  }
}
@media (orientation: landscape) and (max-height: 480px) and (max-height: 375px) {
  .bet-popup {
    transform: scale(0.96);
  }
}
@media (orientation: landscape) and (max-height: 480px) and (max-height: 340px) {
  .bet-popup {
    transform: scale(0.85);
  }
}
