#rules-close-btn {
  top: calc(env(safe-area-inset-top, 0px) + 20px) !important;
  right: max(env(safe-area-inset-right), 2%) !important;
}

.rules-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}
.rules-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 35, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 0;
}
.rules-overlay .rules-divider {
  width: 100%;
  height: 1px;
  margin: 20px 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 4.31%, rgba(255, 255, 255, 0.13) 49.04%, rgba(255, 255, 255, 0) 100%);
  flex: 0 0 auto;
  align-self: stretch;
}
.rules-overlay .rules-dialog {
  position: relative;
  width: min(90vw, 520px);
  height: 516px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  border-radius: 18px;
  background: radial-gradient(100% 100% at 50% 0%, #A5AFDC 0%, #434F87 67.57%, #2E3866 100%);
  padding: 18px 10px 18px 20px;
  box-shadow: 0 0.7px 0 0 rgba(255, 255, 255, 0.55) inset, 0 -1px 5px 0 rgba(210, 220, 239, 0.17) inset, 0 2px 2px 0 rgba(1, 19, 42, 0.8);
  backdrop-filter: blur(20px);
}
.rules-overlay .rules-dialog li {
  display: list-item;
  grid: none;
  padding-left: 0;
}
.rules-overlay .rules-dialog li::before {
  content: none;
  display: none;
}
.rules-overlay .rules.title {
  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, 4.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;
}
.rules-overlay .rules.title::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;
}
.rules-overlay strong {
  color: #FFF;
  font-weight: 800;
}
.rules-overlay p {
  margin: 10px 0;
}
.rules-overlay .rules-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}
.rules-overlay .rules-scroll::-webkit-scrollbar {
  width: 4px;
}
.rules-overlay .rules-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 18, 45, 0.18);
}
.rules-overlay .rules-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #B2BDD4 0%, #9EB0CC 100%);
}
.rules-overlay .ie-rules-content .ie-rules-paytable {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section {
  position: relative;
  margin-bottom: 25px;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-level {
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
  font-family: "Nunito", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle {
  display: none;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:not(:checked) ~ .ie-paytable-grid-vertical > span.ie-pay-row:nth-of-type(n+6) {
  display: none !important;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:not(:checked) ~ .ie-paytable-grid-vertical .ie-paytable-expand-btn .btn-text .btn-text-more {
  display: inline;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:not(:checked) ~ .ie-paytable-grid-vertical .ie-paytable-expand-btn .btn-text .btn-text-less {
  display: none;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:checked ~ .ie-paytable-grid-vertical .ie-paytable-expand-btn .arrow-icon {
  transform: rotate(180deg);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:checked ~ .ie-paytable-grid-vertical .ie-paytable-expand-btn .btn-text .btn-text-more {
  display: none;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-toggle:checked ~ .ie-paytable-grid-vertical .ie-paytable-expand-btn .btn-text .btn-text-less {
  display: inline;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn {
  grid-column: span 2;
  order: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  cursor: pointer;
  color: #D3DBFF;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn:hover .arrow-icon {
  border-top-color: #FFFFFF;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn:active {
  background: rgba(15, 18, 45, 0.3);
  transform: scale(0.98);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn .btn-text {
  display: inline-block;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-expand-btn .arrow-icon {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #D3DBFF;
  transition: transform 0.3s ease, border-color 0.2s ease;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-section .ie-paytable-level {
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
  font-family: "Nunito", sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-grid-vertical {
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: inset 0px 1px 3px rgba(15, 0, 37, 0.5);
  border-radius: clamp(8px, 1.5vw, 12px);
  overflow: hidden;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-grid-vertical.grid-easy {
  background: linear-gradient(90deg, rgba(44, 42, 90, 0.56) 0%, rgba(107, 116, 166, 0.56) 48.56%, rgba(44, 42, 90, 0.56) 97.93%);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-grid-vertical.grid-medium {
  background: linear-gradient(90deg, rgba(30, 52, 50, 0.56) 0%, rgba(90, 150, 140, 0.56) 48.56%, rgba(30, 52, 50, 0.56) 97.93%);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-grid-vertical.grid-hard {
  background: linear-gradient(90deg, rgba(30, 50, 120, 0.6) 0%, rgba(70, 126, 160, 0.6) 48.56%, rgba(30, 50, 120, 0.6) 97.93%);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-paytable-grid-vertical.grid-hardcore {
  background: linear-gradient(90deg, rgba(61, 35, 92, 0.6) 0%, rgba(72, 54, 120, 0.6) 48.56%, rgba(61, 35, 92, 0.6) 97.93%);
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row-header {
  display: contents;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row-header .col-step {
  color: #FFFFFF;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row-header .col-multiplier {
  color: #fffd7a;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row-header span {
  background: rgba(107, 116, 166, 0.3);
  font-weight: 800;
  font-size: 13px;
  padding: 8px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  font-family: "Nunito", sans-serif;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row {
  display: contents;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row .col-step {
  color: #FFFFFF;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row .col-multiplier {
  color: #fffd7a;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row span {
  padding: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "Nunito", sans-serif;
}
.rules-overlay .ie-rules-content .ie-rules-paytable .ie-pay-row:last-of-type span {
  border-bottom: none;
}
.rules-overlay .ie-rules-content .ie-rules-content-title {
  font-family: var(--basic-font);
  font-size: 15px;
  color: #FFF;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  line-height: 18px;
  display: block;
  margin: 12px 0 6px;
}
.rules-overlay .ie-rules-content .ie-rules-content-text {
  font-size: 14px;
  color: #D3DBFF;
  line-height: 18px;
  margin-bottom: 12px;
}
.rules-overlay .ie-rules-content .ie-feature-image {
  display: block;
  margin: 20px auto;
  width: 250px;
  height: auto;
  max-width: 100%;
}
@media (min-width: 768px) {
  .rules-overlay .ie-rules-content .ie-feature-image {
    width: 350px;
  }
}
.rules-overlay .ie-rules-content .ie-rules-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.rules-overlay .ie-rules-content .ie-rules-images .ie-rules-content-text {
  margin: 0;
}
.rules-overlay .ie-rules-content .ie-rules-images .iearrow {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid #D3DBFF;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
  animation: pulse-down 1.5s infinite ease-in-out;
}
.rules-overlay .ie-rules-list {
  list-style-type: disc;
  padding-left: 20px;
  margin: 8px 0;
  color: #D3DBFF;
}
.rules-overlay .ie-rules-list .ie-rules-list-item {
  margin: 10px 0;
  line-height: 1.35;
  font-size: 14px;
}
.rules-overlay .rules-dialog li.rules-menu-item {
  margin-top: 12px;
  list-style: none;
  position: relative;
}
.rules-overlay .rules-dialog li.rules-menu-item::before {
  content: "";
  display: block;
  position: absolute;
  left: -11px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d4dbff;
}
.rules-overlay .rules-menu-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}
.rules-overlay .rules-menu-text {
  flex: 1 1 auto;
  display: block;
  margin: 0;
}
.rules-overlay .rules-menu-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  flex: 0 0 46px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  position: relative;
  display: grid;
  place-items: center;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.rules-overlay .rules-menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(100% 100% at 50% 0%, #B7C9E9 0%, #92A6CA 57.77%, #717FA9 100%);
  box-shadow: 0 0.587px 0 0 rgba(255, 255, 255, 0.55) inset, 0 1.676px 1.676px 0 rgba(0, 0, 0, 0.5);
}
.rules-overlay .rules-menu-btn .icon {
  width: 26px;
  height: 26px;
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 0;
}
.rules-overlay .rules-menu-btn .burger {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
}
.rules-overlay .rules-menu-sublist {
  list-style: none;
  padding: 0 0 0 16px;
  margin: 8px 0 0;
}
.rules-overlay .rules-menu-sublist > li {
  display: grid;
  grid-template-columns: 16px 1fr;
  column-gap: 10px;
  align-items: start;
  margin: 10px 0;
  color: #D3DBFF;
  font-size: 14px;
  line-height: 1.35;
}
.rules-overlay .rules-menu-sublist > li::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  margin-top: 7px;
  background: #D3DBFF;
  transform: rotate(45deg);
  border-radius: 2px;
}
.rules-overlay .rules-menu-sublist > li > p {
  margin: 0;
}
.rules-overlay .ie-rules-limits .ie-rules-content-title {
  margin-bottom: 16px;
}
.rules-overlay .ie-rules-limit-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}
.rules-overlay .ie-rules-limits-note {
  margin: 18px 0 0;
}
.rules-overlay .ie-rules-divider {
  width: 100%;
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 4%, rgba(255, 255, 255, 0.13) 49%, rgba(255, 255, 255, 0) 100%);
}

@keyframes pulse-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
