* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

:root {
  --bg-black: #000000;
  --bg-shell: #000000;
  --bg-card: #15090e;
  --bg-card-alt: #1d0c13;
  --burgundy: #8f1637;
  --burgundy-hover: #ab1b42;
  --burgundy-soft: #29101a;
  --burgundy-text: #f0567e;
  --text-main: #ffffff;
  --text-muted: #a68691;
  --gold: #ffc82c;
}

html, body {
  min-height: 100%;
  background-color: #000000;
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overscroll-behavior-y: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: #090306;
  background-image: linear-gradient(rgba(8, 2, 5, 0.25), rgba(8, 2, 5, 0.35)), url('assets/bg_roses.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 12px 14px 98px;
}

/* TOP BAR */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  position: relative;
  z-index: 10;
}

.brand-pill {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.16s ease;
}

.brand-pill:active {
  transform: scale(0.96);
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}


.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card-alt);
  border: none;
  border-radius: 999px;
  padding: 4px 6px 4px 13px;
  color: #ffffff;
  font-family: inherit;
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.gram-coin-lg {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gram-coin-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.balance-text {
  display: flex;
  align-items: center;
  line-height: 1;
}

.balance-amount {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gram-tag-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--gold);
  color: #1c0c04;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 9px;
  font-weight: 900;
}

.gram-tag-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--burgundy);
  color: var(--gold);
  font-family: 'Cinzel', Georgia, serif;
  font-size: 9px;
  font-weight: 900;
}

/* SCREENS */
.screen {
  display: none;
  animation: fadeUp 0.2s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== SCREEN 3: GAMES (NEW BANNER) ==================== */
.promo-banner {
  position: relative;
  border-radius: 20px;
  margin-bottom: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
  border: none;
  aspect-ratio: 1.74 / 1;
  width: 100%;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transform: translateZ(0);
  transition: transform 0.16s ease;
}

.promo-banner:active {
  transform: scale(0.985);
}

.promo-track {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  transform: translate3d(0%, 0, 0);
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-track.is-dragging {
  transition: none;
}

.promo-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.promo-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.promo-badge-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.promo-bonus-badge {
  background-color: var(--gold);
  color: #1d0e04;
  border: none;
  border-radius: 14px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  transform: rotate(4deg);
}

.badge-big {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.badge-small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.promo-cta-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.gold-pill-btn {
  background-color: var(--gold);
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  color: #1a0c03;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.gold-pill-btn:hover {
  background-color: #ffd557;
}

.gold-pill-btn:active {
  transform: scale(0.96);
}

.promo-dots-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 12px;
}

.promo-dots-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.38s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.38s ease;
}

.promo-dots-bar .dot.active {
  width: 18px;
  border-radius: 999px;
  background-color: var(--gold);
}

/* SECTION LABEL */
.section-label {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
}

/* GAMES GRID */
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.game-card {
  position: relative;
  aspect-ratio: 1 / 0.96;
  border-radius: 20px;
  border: none;
  outline: none;
  background-color: var(--bg-card);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: none;
}

.game-card:hover,
.game-card:focus,
.game-card:focus-visible,
.game-card:active {
  border: none;
  outline: none;
  transform: none;
  filter: none;
  box-shadow: none;
}

.game-card.wide {
  grid-column: span 2;
  aspect-ratio: 2.08 / 1;
}

.game-card-title {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  background-color: rgba(12, 5, 8, 0.74);
  border: none;
  border-radius: 999px;
  padding: 4px 11px;
  letter-spacing: -0.01em;
}

.game-live-chip {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(18, 7, 12, 0.88);
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
}

.white-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #14070c;
  border: none;
  border-radius: 999px;
  padding: 10px 14px 10px 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.white-pill-btn:active {
  transform: scale(0.96);
}

.chev {
  font-size: 15px;
  line-height: 1;
  color: #7c1330;
}

/* EMPTY STATE CARD */
.empty-state-card {
  background-color: var(--bg-card);
  border: none;
  border-radius: 20px;
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-emblem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--burgundy-soft);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.empty-emblem-svg {
  width: 22px;
  height: 22px;
  fill: var(--burgundy-text);
}

.empty-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.empty-caption {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==================== SCREEN 2: EARN ==================== */
.hero-earn {
  position: relative;
  padding: 4px 0 18px;
  min-height: 158px;
}

.hero-earn-copy {
  position: relative;
  z-index: 2;
  max-width: 68%;
}

.earn-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.earn-sub {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

.hero-starbag-img {
  position: absolute;
  right: -14px;
  top: -4px;
  width: 154px;
  height: auto;
  pointer-events: none;
  z-index: 1;
}

.dark-action-card {
  background-color: var(--bg-card);
  border: none;
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
}

.daily-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.daily-card-link {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.daily-card-link:active {
  transform: scale(0.985);
}

.card-icon-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.gram-coin-card-img {
  border-radius: 50%;
  object-fit: cover;
}

.card-mid-copy {
  flex: 1;
}

.card-caps-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.card-gold-sub {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
}

.tasks-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tasks-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.burgundy-pill-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--burgundy);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 48%, rgba(255, 118, 160, 0.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -6px 14px rgba(255, 86, 138, 0.14);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.burgundy-pill-btn:hover {
  background-color: var(--burgundy-hover);
}

.burgundy-pill-btn:active {
  transform: scale(0.96);
}

.burgundy-pill-btn.sm {
  padding: 11px 18px;
}

.burgundy-pill-btn.full {
  width: 100%;
  padding: 14px 18px;
}

.burgundy-pill-btn.lg {
  padding: 15px 20px;
  font-size: 13px;
}

.btn-icon-svg {
  width: 18px;
  height: 18px;
}

/* ==================== SCREEN 4: PROFILE ==================== */
.profile-top {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 18px;
}

.settings-btn {
  position: absolute;
  right: 0;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card-alt);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-avatar-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card-alt);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-img[hidden] {
  display: none;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--burgundy-soft);
  color: #ffffff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.profile-avatar-fallback[hidden] {
  display: none;
}

.profile-avatar-fallback svg {
  width: 42px;
  height: 42px;
  fill: var(--text-muted);
}

.profile-username {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  background-color: var(--bg-card);
  border: none;
  border-radius: 18px;
  padding: 14px;
}

.stat-val {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.inline-gram-coin {
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  flex-shrink: 0;
}

.stat-coin {
  width: 20px;
  height: 20px;
}

.btn-coin {
  width: 19px;
  height: 19px;
}

.withdraw-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  border: none;
  background-color: var(--burgundy-soft);
  background-image: linear-gradient(180deg, rgba(240, 86, 126, 0.04) 0%, rgba(240, 86, 126, 0) 50%, rgba(240, 86, 126, 0.14) 100%);
  box-shadow: inset 0 0 0 1px rgba(240, 86, 126, 0.16), inset 0 -6px 14px rgba(240, 86, 126, 0.10);
  color: var(--burgundy-text);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.withdraw-btn:hover {
  background-color: #321320;
}

.withdraw-btn:active {
  transform: scale(0.97);
}

/* LIVE RISING BUBBLES INSIDE BUTTONS */
.burgundy-pill-btn > *:not(.btn-bubbles),
.withdraw-btn > *:not(.btn-bubbles) {
  position: relative;
  z-index: 2;
}

.btn-bubbles {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.btn-bubble {
  position: absolute;
  bottom: -10px;
  left: var(--bx, 50%);
  width: var(--bs, 6px);
  height: var(--bs, 6px);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: btnBubbleFloat var(--bd, 3.4s) ease-in-out var(--bdelay, 0s) infinite;
}

.burgundy-pill-btn .btn-bubble {
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 204, 220, 0.34) 52%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow:
    inset 0 0 2px rgba(255, 255, 255, 0.65),
    0 0 6px rgba(255, 180, 205, 0.25);
}

.withdraw-btn .btn-bubble {
  background: radial-gradient(
    circle at 32% 30%,
    rgba(255, 190, 210, 0.65) 0%,
    rgba(240, 86, 126, 0.32) 55%,
    rgba(240, 86, 126, 0.06) 100%
  );
  box-shadow:
    inset 0 0 2px rgba(255, 175, 200, 0.5),
    0 0 6px rgba(240, 86, 126, 0.22);
}

@keyframes btnBubbleFloat {
  0% {
    transform: translate3d(0, 4px, 0) scale(0.45);
    opacity: 0;
  }
  16% {
    opacity: var(--bo, 0.8);
  }
  42% {
    transform: translate3d(var(--bx1, 4px), -20px, 0) scale(0.95);
    opacity: var(--bo, 0.82);
  }
  74% {
    transform: translate3d(var(--bx2, -4px), -42px, 0) scale(1.06);
    opacity: calc(var(--bo, 0.8) * 0.78);
  }
  100% {
    transform: translate3d(var(--bx3, 3px), -64px, 0) scale(0.62);
    opacity: 0;
  }
}

.history-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.htab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background-color: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.16s ease;
}

.htab-icon-img {
  width: 18px;
  height: 15px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.htab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-0.5px);
}

.empty-emblem-img {
  width: 26px;
  height: 21px;
  object-fit: contain;
  display: block;
}

.htab.active {
  background-color: var(--bg-card-alt);
  color: #ffffff;
}

/* BOTTOM NAVIGATION BAR (NO BOTTOM CASE) */
.bottom-dock {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 406px;
  z-index: 40;
}

.nav-pill {
  width: 100%;
  background-color: rgba(20, 9, 14, 0.96);
  backdrop-filter: blur(14px);
  border: none;
  border-radius: 999px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.nav-item {
  background-color: transparent;
  border: none;
  border-radius: 999px;
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.nav-item.active {
  background-color: var(--burgundy);
  color: #ffffff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-games-img {
  width: 25px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.nav-gram-coin {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-avatar[hidden] {
  display: none;
}

/* VISUAL MODAL SHEET */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(5, 2, 4, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  z-index: 60;
}

.sheet-backdrop[hidden] {
  display: none;
}

.sheet-card {
  width: 100%;
  max-width: 416px;
  background-color: var(--bg-card);
  border: none;
  border-radius: 24px;
  padding: 18px;
  animation: fadeUp 0.18s ease;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-card-alt);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sheet-body {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.84);
}

.sheet-preview-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 16px;
  border: none;
  margin-bottom: 12px;
}

.sheet-pill-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.sheet-chip {
  background-color: var(--bg-card-alt);
  border: none;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
}

/* SETTINGS SHEET & LEGAL DOCS */
.sheet-card.is-settings {
  background-color: #14090d;
  border-radius: 26px;
  padding: 20px 16px 18px;
}

.sheet-card.is-settings .sheet-header {
  position: relative;
  justify-content: center;
  margin-bottom: 18px;
  min-height: 30px;
}

.sheet-card.is-settings .sheet-title {
  font-size: 19px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.01em;
}

.sheet-card.is-settings .sheet-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sheet-card.is-settings .sheet-close:active {
  transform: translateY(-50%) scale(0.92);
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.settings-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 6px;
}

.settings-lang-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.settings-lang-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.lang-select-wrap {
  position: relative;
}

.lang-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #1f0e15;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 15px 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.lang-pill-btn:active {
  transform: scale(0.97);
}

.lang-chev {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.8);
  transition: transform 0.18s ease;
}

.lang-pill-btn[aria-expanded="true"] .lang-chev {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 146px;
  background-color: #231018;
  border-radius: 16px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 20;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

.lang-dropdown[hidden] {
  display: none;
}

.lang-option {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.lang-option.active {
  background-color: var(--burgundy);
  color: #ffffff;
}

.settings-tg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.settings-tile-btn {
  width: 100%;
  background-color: #1f0e15;
  border: none;
  border-radius: 16px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.settings-tile-btn:hover {
  background-color: #27121b;
}

.settings-tile-btn:active {
  transform: scale(0.98);
}

.settings-tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-tile-icon.tg-blue {
  background-color: #00a8ff;
  color: #ffffff;
}

.settings-tile-icon.doc-dark {
  background-color: #2c151f;
  color: #ffffff;
}

.settings-tile-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
}

/* LEGAL DOCUMENT VIEW IN SHEET */
.sheet-card.is-doc {
  background-color: #14090d;
  border-radius: 26px;
  padding: 18px 16px 16px;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
}

.sheet-card.is-doc .sheet-header {
  gap: 10px;
  margin-bottom: 10px;
}

.sheet-card.is-doc .sheet-title {
  font-size: 15px;
  line-height: 1.25;
}

.doc-back-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.doc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #1f0e15;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 7px 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.doc-back-btn:active {
  transform: scale(0.96);
}

.legal-scroll-box {
  background-color: #1b0c12;
  border-radius: 18px;
  padding: 14px;
  max-height: 54dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 12px;
}

.legal-scroll-box::-webkit-scrollbar {
  width: 4px;
}

.legal-scroll-box::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.legal-hero-title {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 3px;
}

.legal-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy-text);
  margin-bottom: 2px;
}

.legal-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.legal-p {
  margin-bottom: 9px;
}

.legal-h4 {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  margin: 12px 0 6px;
}

.legal-list {
  margin: 4px 0 9px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legal-list li {
  padding-left: 2px;
}

/* ==================== SCREEN 5: PLINKO GAME ==================== */
.app-shell.is-game-active {
  padding-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.app-shell.is-game-active .screens-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-shell.is-game-active .bottom-dock {
  display: none;
}

#screen-plinko.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.plinko-stage {
  position: relative;
  flex: 1;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(143, 22, 55, 0.16) 0%, rgba(44, 16, 48, 0.1) 42%, rgba(0, 0, 0, 0.18) 78%);
  padding: 6px 2px 4px;
}

.plinko-back-pill {
  position: absolute;
  top: 4px;
  left: 2px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(25, 11, 17, 0.88);
  border: none;
  border-radius: 999px;
  padding: 6px 12px 6px 9px;
  color: rgba(255, 255, 255, 0.86);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.plinko-back-pill:active {
  transform: scale(0.95);
}

/* LEFT FLOATING RAIL: РИСК + SHIELD */
.plinko-left-rail {
  position: absolute;
  left: 2px;
  top: 44px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.plinko-risk-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.plinko-rail-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.plinko-risk-capsule {
  background-color: rgba(24, 11, 17, 0.92);
  border-radius: 999px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.plinko-risk-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: transparent;
  color: #6b6774;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.18s ease, filter 0.18s ease;
}

.plinko-risk-btn:active {
  transform: scale(0.92);
}

.risk-face-svg {
  width: 26px;
  height: 26px;
  display: block;
}

.plinko-risk-btn[data-risk="low"].active {
  color: #00d65b;
  filter: drop-shadow(0 0 7px rgba(0, 214, 91, 0.48));
}

.plinko-risk-btn[data-risk="medium"].active {
  color: #ffc82c;
  filter: drop-shadow(0 0 7px rgba(255, 200, 44, 0.48));
}

.plinko-risk-btn[data-risk="high"].active {
  color: #f03e5e;
  filter: drop-shadow(0 0 7px rgba(240, 62, 94, 0.52));
}

.plinko-side-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: rgba(24, 11, 17, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.plinko-side-circle-btn:active {
  transform: scale(0.93);
}

.plinko-side-circle-btn.shield {
  color: #1d7dfa;
}

.plinko-side-circle-btn.help {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 900;
}

/* RIGHT FLOATING RAIL: ПИНЫ (8, 10, 12, 14, 16) + HELP (?) */
.plinko-right-rail {
  position: absolute;
  right: 2px;
  top: 44px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.plinko-pins-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.plinko-pins-capsule {
  background-color: rgba(24, 11, 17, 0.92);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.plinko-pin-btn {
  width: 26px;
  height: 24px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.plinko-pin-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.plinko-pin-btn.active {
  background-color: #a81c45;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(168, 28, 69, 0.55);
}

.plinko-pin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* BOARD CANVAS & MULTIPLIER SLOTS */
.plinko-board-wrap {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plinko-canvas {
  width: 100%;
  height: 356px;
  display: block;
}

.plinko-multipliers {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--slots, 9), 1fr);
  gap: 3px;
  padding: 0 12px;
  margin-top: -4px;
  position: relative;
  z-index: 4;
}

.plinko-multipliers[data-slots="13"],
.plinko-multipliers[data-slots="15"],
.plinko-multipliers[data-slots="17"] {
  gap: 2px;
}

.plinko-slot {
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 8px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), filter 0.16s ease;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

.plinko-multipliers[data-slots="11"] .plinko-slot {
  font-size: 9px;
  border-radius: 7px;
}

.plinko-multipliers[data-slots="13"] .plinko-slot {
  font-size: 8.5px;
  border-radius: 6px;
}

.plinko-multipliers[data-slots="15"] .plinko-slot {
  font-size: 8px;
  border-radius: 5px;
}

.plinko-multipliers[data-slots="17"] .plinko-slot {
  font-size: 7.2px;
  border-radius: 5px;
  letter-spacing: -0.04em;
}

.plinko-slot.is-hit {
  transform: translateY(4px) scale(1.06);
  filter: brightness(1.38);
}

/* Symmetrical bucket spectrum across 8, 10, 12, 14, 16 pin rows */
.plinko-slot[data-tier="0"] {
  background: linear-gradient(180deg, #a81c45 0%, #6e102b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 180, 200, 0.35), 0 0 12px rgba(168, 28, 69, 0.35);
}

.plinko-slot[data-tier="1"] {
  background: linear-gradient(180deg, #7d2080 0%, #4e1250 100%);
  box-shadow: inset 0 1px 0 rgba(235, 175, 240, 0.3), 0 0 10px rgba(125, 32, 128, 0.3);
}

.plinko-slot[data-tier="2"] {
  background: linear-gradient(180deg, #52288a 0%, #321659 100%);
  box-shadow: inset 0 1px 0 rgba(200, 175, 255, 0.28), 0 0 10px rgba(82, 40, 138, 0.28);
}

.plinko-slot[data-tier="3"] {
  background: linear-gradient(180deg, #3242a8 0%, #1d276b 100%);
  box-shadow: inset 0 1px 0 rgba(175, 195, 255, 0.28), 0 0 10px rgba(50, 66, 168, 0.28);
}

.plinko-slot[data-tier="4"] {
  background: linear-gradient(180deg, #1f2a66 0%, #121840 100%);
  box-shadow: inset 0 1px 0 rgba(155, 175, 240, 0.22), 0 0 8px rgba(31, 42, 102, 0.25);
}

/* BOTTOM BET PANEL (СТАВКА) */
.plinko-bet-panel {
  background-color: var(--bg-card);
  border-radius: 22px;
  padding: 12px 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plinko-bet-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-left: 4px;
}

.plinko-bet-row {
  display: grid;
  grid-template-columns: 1fr 48px 48px 54px;
  gap: 7px;
  align-items: center;
}

.plinko-bet-input-wrap {
  height: 46px;
  background-color: var(--bg-card-alt);
  border-radius: 15px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: text;
}

.plinko-bet-gram-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.plinko-bet-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
  -moz-appearance: textfield;
}

.plinko-bet-input::-webkit-outer-spin-button,
.plinko-bet-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.plinko-mod-btn {
  height: 46px;
  border-radius: 14px;
  border: none;
  background-color: var(--bg-card-alt);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.plinko-mod-btn:hover {
  background-color: #29111b;
}

.plinko-mod-btn:active {
  transform: scale(0.95);
}

.plinko-play-btn {
  min-height: 52px;
  padding: 9px 14px 9px 20px;
  justify-content: space-between;
  border-radius: 999px;
  transition: opacity 0.18s ease, transform 0.14s ease, filter 0.18s ease;
}

.plinko-play-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
}

.plinko-cta-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  text-align: center;
}

.plinko-cta-main {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.plinko-cta-sub {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1px;
}

.plinko-cta-sub[hidden] {
  display: none;
}

.plinko-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(14, 5, 9, 0.72);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
}

.plinko-cta-gram-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* HISTORY LIST ITEMS IN PROFILE */
.history-list-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-item-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background-color: var(--burgundy-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-item-badge img {
  width: 22px;
  height: 18px;
  object-fit: contain;
}

.history-item-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.history-item-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-item-right {
  text-align: right;
}

.history-item-payout {
  font-size: 13px;
  font-weight: 900;
}

.history-item-payout.win {
  color: #00d65b;
}

.history-item-payout.loss {
  color: var(--burgundy-text);
}

.history-item-mult {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

.sheet-chip.is-selected {
  background-color: var(--burgundy);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}


/* ==================== SCREEN 6: MINES GAME ==================== */
#screen-mines.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.mines-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mines-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mines-back-pill {
  position: static;
}

.mines-title-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mines-heading {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.mines-help-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-card-alt);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 5x5 GRID */
.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 2px 0;
}

.mines-cell {
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(33, 14, 22, 0.94) 0%, rgba(20, 8, 13, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 3px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.13s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mines-cell:active:not(:disabled) {
  transform: scale(0.93);
}

.mines-cell:disabled {
  cursor: default;
}

/* Закрытая клетка — серый GRAM */
.mines-cell-gram {
  width: 62%;
  height: 62%;
  border-radius: 50%;
  object-fit: contain;
  opacity: 0.56;
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.mines-cell.is-clickable:hover .mines-cell-gram {
  opacity: 0.85;
  transform: scale(1.06);
}

/* Угадал — красный кристалл */
.mines-cell.is-gem {
  background: radial-gradient(circle at 50% 45%, rgba(240, 42, 98, 0.36) 0%, rgba(36, 11, 22, 0.96) 82%);
  box-shadow: inset 0 0 0 1.5px rgba(240, 86, 126, 0.65), 0 0 14px rgba(240, 42, 98, 0.32);
}

/* Мина — бомба */
.mines-cell.is-mine {
  background: radial-gradient(circle at 50% 45%, rgba(255, 98, 28, 0.42) 0%, rgba(42, 12, 16, 0.97) 82%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 118, 48, 0.78), 0 0 16px rgba(255, 98, 28, 0.42);
}

.mines-cell-reveal {
  width: 72%;
  height: 72%;
  object-fit: contain;
  pointer-events: none;
  animation: minesPopIn 0.22s cubic-bezier(0.22, 1.35, 0.36, 1);
}

.mines-cell.is-dimmed {
  opacity: 0.42;
}

@keyframes minesPopIn {
  0% { transform: scale(0.42); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* MULTIPLIER STEPS TRACK */
.mines-steps-track {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}

.mines-steps-track::-webkit-scrollbar {
  display: none;
}

.mines-step-card {
  flex: 0 0 auto;
  min-width: 82px;
  background-color: var(--bg-card);
  border-radius: 13px;
  padding: 8px 10px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mines-step-card.is-passed {
  background-color: #26101a;
  box-shadow: inset 0 0 0 1px rgba(240, 86, 126, 0.38);
}

.mines-step-card.is-current {
  background: linear-gradient(135deg, #c21c4b 0%, #7a1230 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 12px rgba(143, 22, 55, 0.45);
}

.mines-step-mult {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
}

.mines-step-sub {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}

/* BOTTOM CONTROLS PANEL */
.mines-controls-panel {
  background-color: var(--bg-card);
  border-radius: 22px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mines-count-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.mines-panel-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mines-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-card-alt);
  border-radius: 999px;
  padding: 2px 4px;
}

.mines-step-adj {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mines-count-input {
  width: 30px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  -moz-appearance: textfield;
}

.mines-count-input::-webkit-outer-spin-button,
.mines-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mines-presets-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.mines-preset-card {
  height: 46px;
  border-radius: 14px;
  border: none;
  background-color: var(--bg-card-alt);
  background-image: url('assets/mine_bomb.png');
  background-repeat: no-repeat;
  background-size: 32px 32px;
  background-position: right -5px bottom -7px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.mines-preset-card span {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.mines-preset-card.active {
  background-color: var(--burgundy);
  box-shadow: inset 0 0 0 1.5px rgba(240, 86, 126, 0.75), 0 0 12px rgba(143, 22, 55, 0.45);
}

.mines-preset-card:active:not(:disabled) {
  transform: scale(0.95);
}

.mines-preset-card:disabled,
.mines-step-adj:disabled,
.mines-count-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* ==================== SCREEN 7: WHEEL GAME ==================== */
#screen-wheel.active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
}

.wheel-stage {
  position: relative;
  width: 100%;
  height: 308px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 88%, rgba(143, 22, 55, 0.24) 0%, rgba(30, 11, 22, 0.72) 48%, rgba(15, 6, 10, 0.94) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.wheel-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.wheel-top-row {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 0;
}

.wheel-back-pill {
  position: static;
}

.wheel-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wheel-icon-btn {
  width: 32px;
  height: 32px;
}

.wheel-status-block {
  position: relative;
  z-index: 10;
  padding: 10px 14px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
}

.wheel-phase-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.wheel-phase-dots .wdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.24);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wheel-phase-dots .wdot.active {
  background-color: #ffffff;
  transform: scale(1.1);
}

.wheel-timer-big {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.wheel-timer-big.is-hidden {
  display: none;
}

.wheel-phase-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wheel-phase-label.is-spinning {
  color: var(--gold);
  font-size: 12px;
}

.wheel-phase-label.is-result {
  color: #00e666;
  font-size: 13px;
}

.wheel-corner-stats {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

.wheel-stat-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
}

.wheel-stat-coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

/* WHEEL ROUND HISTORY CARD */
.wheel-history-card {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wheel-hist-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wheel-hist-title {
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
}

.wheel-dist-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wheel-dist-box {
  min-width: 30px;
  height: 28px;
  padding: 0 5px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.wheel-dist-box.seg-blue {
  background: linear-gradient(180deg, #2b7fff 0%, #1656c7 100%);
}

.wheel-dist-box.seg-green {
  background: linear-gradient(180deg, #1fc75e 0%, #118a3e 100%);
}

.wheel-dist-box.seg-purple {
  background: linear-gradient(180deg, #8747ff 0%, #5721c4 100%);
}

.wheel-dist-box.seg-gold {
  background: linear-gradient(180deg, #ffca28 0%, #c98a08 100%);
  color: #1c0f02;
  text-shadow: none;
}

.wheel-hist-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wheel-prev-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wheel-prev-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.wheel-prev-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.wheel-mini-pill {
  flex: 0 0 7px;
  height: 15px;
  border-radius: 3px;
}

.wheel-mini-pill.seg-blue { background-color: #2678ff; }
.wheel-mini-pill.seg-green { background-color: #1ec45d; }
.wheel-mini-pill.seg-purple { background-color: #8242ff; }
.wheel-mini-pill.seg-gold { background-color: #ffc82c; }

.wheel-hist-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card-alt);
  border: none;
  border-radius: 12px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.14s ease;
}

.wheel-hist-btn:active {
  transform: scale(0.95);
}

/* WHEEL CONTROLS PANEL */
.wheel-controls-panel {
  background-color: var(--bg-card);
  border-radius: 22px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.wheel-mult-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.wheel-mult-btn {
  height: 44px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wheel-mult-btn:active {
  transform: scale(0.95);
}

.wheel-mult-btn.seg-blue {
  background-color: rgba(34, 118, 255, 0.16);
  color: #4b94ff;
}
.wheel-mult-btn.seg-blue.active {
  background: linear-gradient(180deg, #2b7fff 0%, #1759cc 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(34, 118, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.wheel-mult-btn.seg-green {
  background-color: rgba(30, 196, 93, 0.15);
  color: #2ee073;
}
.wheel-mult-btn.seg-green.active {
  background: linear-gradient(180deg, #1fc75e 0%, #118a3e 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(30, 196, 93, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.wheel-mult-btn.seg-purple {
  background-color: rgba(130, 66, 255, 0.16);
  color: #a678ff;
}
.wheel-mult-btn.seg-purple.active {
  background: linear-gradient(180deg, #8747ff 0%, #5721c4 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(130, 66, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.wheel-mult-btn.seg-gold {
  background-color: rgba(255, 200, 44, 0.15);
  color: #ffc82c;
}
.wheel-mult-btn.seg-gold.active {
  background: linear-gradient(180deg, #ffca28 0%, #c98a08 100%);
  color: #1c0f02;
  box-shadow: 0 4px 14px rgba(255, 200, 44, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}


.wheel-mult-btn.is-locked,
.wheel-mult-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ALL BETS SECTION */
.wheel-all-bets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.wheel-all-bets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0;
}

.wheel-all-bets-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.wheel-bet-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.wheel-bet-tab {
  height: 36px;
  border-radius: 12px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.13s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.wheel-bet-tab:active {
  transform: scale(0.95);
}

.wheel-bet-tab.seg-blue {
  background-color: rgba(34, 118, 255, 0.22);
}
.wheel-bet-tab.seg-blue.active {
  background: linear-gradient(180deg, #2b7fff 0%, #1759cc 100%);
  box-shadow: 0 3px 10px rgba(34, 118, 255, 0.38);
}

.wheel-bet-tab.seg-green {
  background-color: rgba(30, 196, 93, 0.2);
}
.wheel-bet-tab.seg-green.active {
  background: linear-gradient(180deg, #1fc75e 0%, #118a3e 100%);
  box-shadow: 0 3px 10px rgba(30, 196, 93, 0.35);
}

.wheel-bet-tab.seg-purple {
  background-color: rgba(130, 66, 255, 0.22);
}
.wheel-bet-tab.seg-purple.active {
  background: linear-gradient(180deg, #8747ff 0%, #5721c4 100%);
  box-shadow: 0 3px 10px rgba(130, 66, 255, 0.38);
}

.wheel-bet-tab.seg-gold {
  background-color: rgba(255, 200, 44, 0.2);
}
.wheel-bet-tab.seg-gold.active {
  background: linear-gradient(180deg, #ffca28 0%, #c98a08 100%);
  color: #1c0f02;
  box-shadow: 0 3px 10px rgba(255, 200, 44, 0.38);
}

.wheel-tab-coin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.wheel-tab-subbar {
  background-color: var(--bg-card);
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wheel-tab-sublabel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
}

.wheel-sub-mult.seg-blue { color: #4b94ff; }
.wheel-sub-mult.seg-green { color: #2ee073; }
.wheel-sub-mult.seg-purple { color: #a678ff; }
.wheel-sub-mult.seg-gold { color: #ffc82c; }

.wheel-sub-name {
  color: var(--text-muted);
}

.wheel-tab-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #ffffff;
  color: #12070c;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
}

.wheel-bets-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wheel-bet-row-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wheel-player-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wheel-player-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--burgundy-soft);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.wheel-player-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wheel-player-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wheel-player-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wheel-player-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wheel-stake-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-card-alt);
  border-radius: 999px;
  padding: 2px 8px 2px 5px;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
}

.wheel-stake-pill img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.wheel-color-tag {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
}

.wheel-color-tag.seg-blue { background: rgba(34, 118, 255, 0.22); color: #5ca0ff; }
.wheel-color-tag.seg-green { background: rgba(30, 196, 93, 0.2); color: #36e378; }
.wheel-color-tag.seg-purple { background: rgba(130, 66, 255, 0.24); color: #b187ff; }
.wheel-color-tag.seg-gold { background: rgba(255, 200, 44, 0.22); color: #ffd24c; }

.wheel-status-pill {
  background-color: var(--bg-card-alt);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.wheel-status-pill.is-win {
  background-color: rgba(0, 214, 91, 0.18);
  color: #00e666;
}

.wheel-status-pill.is-loss {
  background-color: rgba(240, 86, 126, 0.14);
  color: var(--burgundy-text);
}

.wheel-empty-bets {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.wheel-modal-hist-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 52dvh;
  overflow-y: auto;
  margin-bottom: 12px;
}

.wheel-modal-hist-row {
  background-color: var(--bg-card-alt);
  border-radius: 13px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
}


.sheet-pill-row-4 {
  grid-template-columns: repeat(4, 1fr);
}

.sheet-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card-alt);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sheet-gram-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}


.wheel-prev-empty {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.42);
  line-height: 22px;
}


/* ==================== SCREEN 8: DICE GAME ==================== */
#screen-dice.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.dice-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  border-radius: 24px;
  padding: 4px 0 2px;
  background:
    radial-gradient(circle at 50% 34%, rgba(168, 28, 69, 0.22) 0%, rgba(44, 14, 34, 0.14) 48%, rgba(0, 0, 0, 0) 78%);
}

.dice-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dice-top-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dice-back-pill {
  position: static;
}

.dice-icon-btn {
  width: 32px;
  height: 32px;
}

/* CENTER HEXAGON ARENA */
.dice-hex-arena {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 4px;
  min-height: 204px;
}

.dice-hex-card {
  position: relative;
  width: 194px;
  height: 212px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.dice-hex-card.is-rolling {
  transform: scale(0.96);
}

.dice-hex-card.is-win {
  filter: drop-shadow(0 0 24px rgba(0, 214, 91, 0.42));
}

.dice-hex-card.is-loss {
  filter: drop-shadow(0 0 24px rgba(240, 62, 94, 0.42));
}

.dice-hex-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(12px);
}

.dice-hex-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.dice-hex-value {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.dice-roll-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background-color: rgba(20, 8, 14, 0.85);
  color: #ffffff;
  animation: fadeUp 0.18s ease;
}

.dice-roll-pill[hidden] {
  display: none;
}

.dice-roll-pill.is-win {
  background-color: rgba(0, 214, 91, 0.22);
  color: #00e666;
  box-shadow: inset 0 0 0 1px rgba(0, 230, 102, 0.45);
}

.dice-roll-pill.is-loss {
  background-color: rgba(240, 62, 94, 0.22);
  color: #ff6987;
  box-shadow: inset 0 0 0 1px rgba(240, 62, 94, 0.45);
}

/* FLOATING GRAM COINS FLANKING HEXAGON */
.dice-float-coin {
  position: absolute;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: diceCoinBob 3.6s ease-in-out infinite;
}

.dice-float-coin.left {
  left: 10px;
  top: 56%;
  transform: rotate(-14deg);
}

.dice-float-coin.right {
  right: 12px;
  top: 22%;
  transform: rotate(16deg);
  animation-delay: -1.6s;
}

.dice-float-coin img {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(255, 200, 44, 0.32);
}

.dice-coin-trail {
  position: absolute;
  width: 48px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 200, 44, 0) 0%, rgba(255, 200, 44, 0.24) 100%);
  filter: blur(2px);
  z-index: 1;
}

.dice-float-coin.left .dice-coin-trail {
  left: -16px;
  transform: rotate(18deg);
}

.dice-float-coin.right .dice-coin-trail {
  right: -16px;
  background: linear-gradient(270deg, rgba(255, 200, 44, 0) 0%, rgba(255, 200, 44, 0.24) 100%);
  transform: rotate(-18deg);
}

@keyframes diceCoinBob {
  0%, 100% { margin-top: 0px; }
  50% { margin-top: -6px; }
}

/* DUAL-COLOR STRIPED SLIDER */
.dice-slider-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 0;
}

.dice-slider-track-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.dice-slider-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background-color: #1c0b12;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.65);
}

.dice-track-left {
  height: 100%;
  background: repeating-linear-gradient(
    -55deg,
    #f0245e 0px,
    #f0245e 6px,
    #b51442 6px,
    #b51442 12px
  );
  transition: width 0.06s linear;
}

.dice-track-right {
  height: 100%;
  background: repeating-linear-gradient(
    -55deg,
    #22cf63 0px,
    #22cf63 6px,
    #138a3f 6px,
    #138a3f 12px
  );
  transition: width 0.06s linear;
}

.dice-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  z-index: 4;
}

.dice-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: grab;
}

.dice-range-input:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.dice-range-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: grab;
}

/* SPINNING WHITE BALL */
.dice-spin-ball {
  position: absolute;
  top: 50%;
  left: 47.75%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  will-change: left, transform;
}

.dice-spin-ball-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, #f3f1f6 45%, #cbc5d4 100%);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.68),
    0 0 0 2px rgba(255, 255, 255, 0.25),
    inset 0 -3px 5px rgba(84, 68, 98, 0.35);
  animation: diceBallSpin 1.15s linear infinite;
}

.dice-spin-ball-core::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: rgba(154, 144, 168, 0.72);
  box-shadow: 0 13px 0 rgba(154, 144, 168, 0.55);
}

.dice-spin-ball-core::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px dashed rgba(168, 158, 182, 0.55);
}

.dice-spin-ball-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.85);
  border-right-color: rgba(240, 86, 126, 0.55);
  animation: diceBallSpin 0.85s linear infinite reverse;
  opacity: 0.78;
}

.dice-spin-ball.is-fast-spin .dice-spin-ball-core {
  animation-duration: 0.22s;
  box-shadow:
    0 4px 16px rgba(255, 255, 255, 0.55),
    0 0 0 2px rgba(255, 255, 255, 0.45),
    inset 0 -3px 5px rgba(84, 68, 98, 0.35);
}

.dice-spin-ball.is-fast-spin .dice-spin-ball-ring {
  animation-duration: 0.18s;
  opacity: 1;
}

.dice-spin-ball.is-win .dice-spin-ball-ring {
  border-top-color: #00e666;
  border-right-color: rgba(0, 230, 102, 0.55);
}

.dice-spin-ball.is-loss .dice-spin-ball-ring {
  border-top-color: #ff476e;
  border-right-color: rgba(255, 71, 110, 0.55);
}

@keyframes diceBallSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dice-roll-marker {
  position: absolute;
  top: -18px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.dice-roll-marker[hidden] {
  display: none;
}

.dice-roll-marker-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background-color: #ffffff;
  color: #14070c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.dice-roll-marker.is-win .dice-roll-marker-tag {
  background-color: #00e666;
  color: #062111;
}

.dice-roll-marker.is-loss .dice-roll-marker-tag {
  background-color: #ff476e;
  color: #ffffff;
}

.dice-ticks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.dice-tick-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.12s ease;
}

.dice-tick-btn:hover,
.dice-tick-btn.is-active {
  color: #ffffff;
}

.dice-tick-btn:active {
  transform: scale(0.94);
}

/* CHANCE & PAYOUT METRIC CARDS */
.dice-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.dice-metric-card {
  background-color: var(--bg-card);
  border-radius: 18px;
  padding: 13px 12px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.dice-metric-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.dice-metric-val {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}

/* BOTTOM CONTROLS PANEL */
.dice-controls-panel {
  background-color: var(--bg-card);
  border-radius: 22px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.dice-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dice-mult-row {
  display: grid;
  grid-template-columns: 1fr 48px 48px 54px;
  gap: 7px;
  align-items: center;
}

.dice-target-icon {
  color: rgba(255, 255, 255, 0.86);
  flex-shrink: 0;
}

.dice-preset-btn {
  height: 46px;
  border-radius: 14px;
  border: none;
  background-color: var(--bg-card-alt);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.dice-preset-btn:hover {
  background-color: #29111b;
}

.dice-preset-btn.active {
  background-color: var(--burgundy);
  box-shadow: inset 0 0 0 1px rgba(240, 86, 126, 0.65), 0 0 12px rgba(143, 22, 55, 0.42);
}

.dice-preset-btn:active {
  transform: scale(0.95);
}


/* ==================== SCREEN 9: CRASH GAME ==================== */
.app-shell.is-crash-active,
.app-shell:has(#screen-crash.active) {
  background-color: #000000;
  background-image: none;
}

#screen-crash.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crash-stage {
  position: relative;
  width: 100%;
  height: 296px;
  border-radius: 22px;
  overflow: hidden;
  background: #000000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 36, 66, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.85);
}

.crash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.crash-top-row {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 0;
}

.crash-back-pill {
  position: static;
}

.crash-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.crash-icon-btn {
  width: 32px;
  height: 32px;
}

.crash-hud-overlay {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-48%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.crash-phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 30, 60, 0.14);
  border: 1px solid rgba(255, 36, 66, 0.32);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ff6b81;
  text-transform: uppercase;
}

.crash-phase-pill.is-flying {
  background: rgba(255, 30, 60, 0.22);
  border-color: rgba(255, 46, 76, 0.5);
  color: #ff3b56;
}

.crash-phase-pill.is-crashed {
  background: rgba(185, 16, 42, 0.34);
  border-color: rgba(255, 40, 70, 0.65);
  color: #ff2a47;
}

.crash-mult-hero {
  font-size: 52px;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #ff2442;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 18px rgba(255, 36, 66, 0.72),
    0 0 38px rgba(220, 18, 48, 0.45);
  transition: transform 0.14s ease, color 0.14s ease;
}

.crash-mult-hero.is-crashed {
  color: #ff1736;
  text-shadow:
    0 0 24px rgba(255, 23, 54, 0.9),
    0 0 46px rgba(190, 10, 36, 0.65);
}

.crash-sub-readout {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 145, 162, 0.85);
  text-transform: uppercase;
}

.crash-progress-wrap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 10;
  pointer-events: none;
}

.crash-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.crash-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a8102b 0%, #ff2442 100%);
  box-shadow: 0 0 10px rgba(255, 36, 66, 0.75);
  transition: width 0.08s linear;
}

.crash-history-bar {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crash-prev-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.crash-mult-chip {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 36, 66, 0.14);
  color: #ff667d;
  border: 1px solid rgba(255, 36, 66, 0.24);
}

.crash-mult-chip.is-mid {
  background: rgba(255, 36, 66, 0.24);
  color: #ff2e4c;
  border-color: rgba(255, 46, 76, 0.42);
}

.crash-mult-chip.is-high {
  background: linear-gradient(135deg, rgba(255, 36, 66, 0.36), rgba(255, 184, 46, 0.26));
  color: #ffd454;
  border-color: rgba(255, 198, 64, 0.45);
}

.crash-hist-btn {
  flex-shrink: 0;
}

.crash-controls-panel {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.crash-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crash-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.crash-auto-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.crash-auto-switch {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.18s ease;
}

.crash-auto-switch::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
}

.crash-auto-toggle input:checked + .crash-auto-switch {
  background: #e11d42;
}

.crash-auto-toggle input:checked + .crash-auto-switch::after {
  transform: translateX(15px);
}

.crash-auto-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.85);
}

.crash-auto-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crash-auto-presets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.crash-auto-chip {
  border: none;
  border-radius: 9px;
  padding: 5px 7px;
  background: var(--bg-card-alt);
  color: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}

.crash-auto-chip.active {
  background: rgba(225, 29, 66, 0.28);
  color: #ff4d68;
  box-shadow: inset 0 0 0 1px rgba(255, 48, 80, 0.45);
}

.crash-auto-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: 68px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--bg-card-alt);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.crash-auto-x {
  font-size: 12px;
  font-weight: 900;
  color: #ff3b56;
}

.crash-auto-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.crash-auto-input::-webkit-outer-spin-button,
.crash-auto-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.crash-play-btn.is-cashout {
  background: linear-gradient(135deg, #d91438 0%, #ff2a4d 100%);
  box-shadow: 0 6px 22px rgba(255, 36, 66, 0.48);
}

.crash-mult-tag {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 36, 66, 0.18);
  color: #ff5972;
}


/* ==================== SCREEN: МАГАЗИН (SHOP) ==================== */
.shop-hero-card {
  position: relative;
  background: linear-gradient(135deg, rgba(143, 22, 55, 0.34) 0%, rgba(21, 9, 14, 0.96) 72%);
  border: 1px solid rgba(240, 86, 126, 0.24);
  border-radius: 22px;
  padding: 16px 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.shop-hero-copy {
  flex: 1;
  min-width: 0;
  z-index: 2;
}

.shop-hero-eyebrow {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(255, 200, 44, 0.14);
  border: 1px solid rgba(255, 200, 44, 0.28);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 7px;
}

.shop-hero-title {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.12;
  color: #ffffff;
  margin-bottom: 5px;
}

.shop-hero-sub {
  font-size: 12px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.78);
}

.shop-hero-sub strong {
  color: var(--gold);
}

.shop-hero-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

.shop-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-filter-row::-webkit-scrollbar {
  display: none;
}

.shop-filter-btn {
  flex: 1;
  white-space: nowrap;
  background-color: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.shop-filter-btn.active {
  background-color: var(--burgundy);
  color: #ffffff;
  border-color: rgba(240, 86, 126, 0.45);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.shop-item-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 12px 11px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.shop-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.shop-item-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(143, 22, 55, 0.34);
  color: #ff8aa8;
}

.shop-owned-tag {
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(36, 207, 100, 0.16);
  color: #46e883;
}

.shop-item-media {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(143, 22, 55, 0.22), transparent 72%);
  border-radius: 14px;
}

.shop-item-media img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.shop-item-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.shop-item-desc {
  font-size: 11px;
  line-height: 1.32;
  color: var(--text-muted);
  margin-top: 2px;
}

.shop-buy-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 9px 10px;
  background: linear-gradient(135deg, var(--burgundy) 0%, #b11b44 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.shop-buy-btn:active {
  transform: scale(0.96);
}

.shop-buy-btn.is-locked {
  background: var(--bg-card-alt);
  color: var(--text-muted);
}

.shop-buy-btn img {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.shop-empty-card {
  grid-column: 1 / -1;
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 26px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.shop-empty-state {
  grid-column: 1 / -1;
}
