*,
*::before,
*::after {
  box-sizing: border-box;
  touch-action: pan-x pan-y !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  touch-action: none !important;
  -ms-touch-action: none !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation !important;
}

.app-shell {
  min-height: 100%;
  height: 100%;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
  overscroll-behavior: contain;
}

body {
  font-family: "Hubot Sans", sans-serif;
  background-color: rgb(16, 17, 20);
  color: rgb(255, 255, 255);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.preview-mode {
  background: rgb(16, 17, 20);
}

body.preview-mode .app-shell {
  width: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  background: rgb(16, 17, 20);
}

body.preview-mode .MuiAppBar-root {
  position: fixed;
}

body.preview-mode .css-rf75xm {
  position: fixed;
}

.main-content {
  padding-top: calc(64px + env(safe-area-inset-top));
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
}

#casino-game-root .main-wrapper {
  padding-top: calc(64px + env(safe-area-inset-top));
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  width: 100%;
}

#casino-game-root a {
  color: inherit;
  text-decoration: none;
}

#casino-game-root .swiper-wrapper {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#casino-game-root .swiper-wrapper::-webkit-scrollbar {
  display: none;
}

#casino-game-root .swiper-slide {
  flex-shrink: 0;
}

#casino-game-root .game-item-image.skeleton {
  background: linear-gradient(90deg, rgb(28, 28, 35) 0%, rgb(35, 35, 45) 50%, rgb(28, 28, 35) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  min-height: 140px;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.main-content__inner {
  padding: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgb(28, 28, 35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgb(255, 255, 255);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2000;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.balance-dropdown {
  position: absolute;
  top: calc(64px + env(safe-area-inset-top));
  right: 60px;
  min-width: 180px;
  background: rgb(35, 35, 45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 8px 0;
  z-index: 1200;
  display: none;
}

.balance-dropdown.is-open {
  display: block;
}

.balance-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.balance-dropdown__item:hover,
.balance-dropdown__item.is-active {
  background: rgba(0, 150, 255, 0.12);
  color: rgb(255, 255, 255);
}

.balance-dropdown__item img {
  width: 16px;
  height: 16px;
}

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wallet-modal.is-open {
  display: flex;
}

.wallet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.wallet-modal__panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: rgb(28, 28, 35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.wallet-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wallet-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgb(255, 255, 255);
}

.wallet-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.wallet-modal__hint {
  margin: 0 0 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.wallet-modal__current {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgb(35, 35, 45);
}

.wallet-modal__current-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.wallet-modal__current-value {
  font-size: 24px;
  font-weight: 600;
  color: rgb(255, 255, 255);
}

.wallet-modal__field {
  display: block;
  margin-bottom: 12px;
}

.wallet-modal__field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.wallet-modal__input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgb(35, 35, 45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-modal__currency {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.wallet-modal__input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: none;
  background: transparent;
  color: rgb(255, 255, 255);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.wallet-modal__input::-webkit-outer-spin-button,
.wallet-modal__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wallet-modal__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.wallet-modal__chip {
  flex: 1 1 calc(50% - 4px);
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgb(35, 35, 45);
  color: rgb(255, 255, 255);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.wallet-modal__chip:hover {
  background: rgba(0, 150, 255, 0.12);
  border-color: rgba(0, 150, 255, 0.35);
}

.wallet-modal__submit {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 8px;
  background: rgb(0, 150, 255);
  color: rgb(255, 255, 255);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wallet-modal__submit:hover {
  background: rgb(30, 165, 255);
}
