/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  width: 100%;
  min-height: 650px;
  height: 100vh;
  overflow: hidden;
  background: #241b31;
  font-family: var(--font-rounded);
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  position: fixed;
  touch-action: pan-x pan-y;
}

#debugLogger {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #0f0;
  font-family: var(--font-mono);
  font-size: 11px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 999999;
  padding: 10px;
  display: none;
}

#debugLogger.active {
  display: block;
}

.debug-error {
  color: #ff0000;
}

.debug-warn {
  color: #ffaa00;
}

.debug-info {
  color: #00ff00;
}

#debugToggle {
  position: fixed;
  bottom: 210px;
  right: 10px;
  z-index: 999999;
  background: #ff0000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

/* ==================== CSS VARIABLES ==================== */
:root {
  --tg-header-height: 0px;
  --color-primary: #ffdd00;
  --color-primary-dark: #ffc107;
  --color-success: #4caf50;
  --color-success-dark: #45a049;
  --color-success-light: #5bc75f;
  --color-danger: #ff5252;
  --color-danger-dark: #ff1744;
  --color-info: #0088cc;
  --color-info-light: #00d4ff;
  --color-purple: #55335c;
  --color-purple-dark: #764ba2;
  --font-rounded: "M PLUS Rounded 1c", Arial, sans-serif;
  --font-heading: "Montserrat", Arial, sans-serif;
  --font-mono: "Courier New", monospace;
  --bg-primary: #1a1a2e;
  --bg-secondary: #2d2d44;
  --bg-tertiary: #19111f;
  --bg-dark: #39223e;
  --bg-darker: #241b31;
  --border-color: #55335c;
  --border-color-light: #55335c;
  --text-white: #ffffff;
  --text-white-60: rgba(255, 255, 255, 0.6);
  --text-white-70: rgba(255, 255, 255, 0.7);
  --text-white-80: rgba(255, 255, 255, 0.8);
  --shadow-small: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 3px 6px rgba(0, 0, 0, 0.3);
  --shadow-large: 0 4px 10px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 6px 15px rgba(0, 0, 0, 0.4);
  --shadow-press: 0 0 0 transparent, 0 2px 5px rgba(0, 0, 0, 0.3);
  --shadow-raise-success: 0 4px 0 #2d7a2f, 0 6px 10px rgba(0, 0, 0, 0.3);
  --shadow-raise-info: 0 4px 0 #135372, 0 6px 10px rgba(0, 0, 0, 0.3);
  --shadow-raise-purple: 0 4px 0 #1c1525, 0 6px 10px rgba(0, 0, 0, 0.35);
  --shadow-raise-gold: 0 4px 0 #865605, 0 6px 10px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.1s;
  --transition-normal: 0.2s;
  --transition-slow: 0.3s;
  --border-radius-small: 8px;
  --border-radius-medium: 10px;
  --border-radius-large: 12px;
  --border-radius-xl: 15px;
  --border-radius-xxl: 20px;
  --gradient-success: linear-gradient(180deg, #71c720 0%, #4c8f15 100%);
  --gradient-success-hover: linear-gradient(
    180deg,
    var(--color-success-light) 0%,
    var(--color-success) 100%
  );
  --gradient-info: linear-gradient(180deg, #25b5ff 0%, #026597 100%);
  --gradient-info-hover: linear-gradient(180deg, #25b5ff 0%, rgb(2, 143, 203) 100%);
  --gradient-purple: linear-gradient(180deg, #4c3a5a 0%, #2b2237 100%);
  --gradient-lucky: linear-gradient(180deg, #e55df4 0%, #7920e8 100%);
  --gradient-gold: linear-gradient(180deg, #f4f083 0%, #d58300 100%);
  --gradient-gold-dark: linear-gradient(180deg, #deb180 0%, #572b0f 100%);
}

/* ==================== UTILITY CLASSES ==================== */
.egg-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("../img/eggies.png?2");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  margin: 0 3px;
}

.fried-egg-icon {
  background-image: url("../img/friedEggies.png?1");
}

.egg-icon.small {
  width: 16px;
  height: 16px;
}

/* ==================== LOADING SCREEN ==================== */
body.loading #gameContainer,
body.loading #winOverlay,
body.loading #blurBackground,
body.loading #controlPanel,
body.loading #loseOverlay {
  display: none !important;
}

@keyframes logoLoaderRise {
  0% {
    transform: translateY(-120vh) scale(0.85);
    opacity: 0;
  }
  65% {
    transform: translateY(6%) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.logoLoader {
  width: auto;
  height: 100px;
  margin-bottom: 20px;
}

body.loading .logoLoader {
  opacity: 0;
  transform: translateY(-120vh) scale(0.85);
  animation: logoLoaderRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--bg-darker) 0%,
    var(--bg-tertiary) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  font-family: var(--font-rounded);
  font-weight: 900;
}

#loadingScreen.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}

.loader-title {
  font-size: 48px;
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}

.loader-bar-container {
  width: 300px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-medium);
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -1px 2px rgba(255, 255, 255, 0.1);
  margin-top: 30px;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-success) 0%,
    var(--color-success-light) 100%
  );
  transition: width var(--transition-slow) ease;
  border-radius: var(--border-radius-medium);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.loader-text {
  font-size: 16px;
  color: var(--text-white);
  opacity: 0.8;
  margin-top: 20px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  padding: 0px 15px;
  text-align: center;
}

.loader-percentage {
  font-size: 32px;
  color: var(--color-success);
  margin-top: 10px;
  font-weight: 900;
  font-family: var(--font-rounded);
}

.loader-text.error {
  color: var(--color-danger) !important;
}

/* ==================== GAME CONTAINER ==================== */
#gameContainer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 260px;
  width: 100%;
  min-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 350px !important;
  display: block;
  touch-action: none;
}

/* ==================== CONTROL PANEL ==================== */
#controlPanel {
  position: fixed;
  bottom: 30px;
  left: 20px;
  right: 20px;
  height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

/* Top Info Bar */
#topInfoBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

#leftBalance,
#rightBalance {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-white);
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-rounded);
}

#gameLogo {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: var(--font-rounded);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -5px;
}

#gameLogo img {
  width: auto;
  height: 65px;
}

#menuButton {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-normal);
  border-radius: 12px;
  flex: 0 0 50px;
  font-size: 20px;
  color: white;
}

#menuButton.game-started {
  display: none;
}

.menuLine {
  width: 100%;
  height: 3px;
  background: var(--text-white);
  border-radius: 2px;
}

/* Balance clickable effect */
#balanceAmount,
#balanceAmountFried {
  cursor: pointer;
  transition: transform var(--transition-normal) ease;
}

#balanceAmount:hover,
#balanceAmountFried:hover {
  transform: scale(1.05);
}

#balanceAmount:active,
#balanceAmountFried:active {
  transform: scale(0.95);
}

#betButtons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.betButton {
  flex: 1;
  height: 45px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-large);
  color: rgb(178 178 178);
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-rounded);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.betButton:hover {
  background: var(--border-color);
  border-color: var(--border-color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: white;
}

.betButton:active {
  transform: translateY(0);
  box-shadow: var(--shadow-small);
}

.betButton.active {
  background: var(--color-purple);
  border-color: #55335c;
  transform: translateY(-2px);
  color: white;
}

/* ==================== DIFFICULTY SELECTION ==================== */
#difficultyControls {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

#levelSelect {
  width: 100%;
  height: 50px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-large);
  color: white;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-rounded);
  padding: 0 15px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-large);
}

#difficultyControls #levelSelect {
  flex: 1;
  width: auto;
}

#levelSelect:hover {
  background-color: var(--border-color);
  border-color: var(--border-color-light);
}

#levelSelect:focus {
  outline: none;
  border-color: #7a7a8e;
}

#levelSelect option {
  background: var(--bg-dark);
  color: white;
  padding: 10px;
}

#levelSelect.game-started {
  display: none !important;
}

.difficulty-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.difficultyButton {
  flex: 1;
  height: 50px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-small);
  color: white;
  font-size: 12px;
  font-weight: bold;
  font-family: var(--font-rounded);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-medium);
  padding: 0;
}

.difficultyButton:hover {
  background: var(--border-color);
  border-color: var(--border-color-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.difficultyButton:active {
  transform: translateY(0);
  box-shadow: var(--shadow-small);
}

.difficultyButton.active {
  background: var(--color-purple);
  border-color: #7a8ef0;
}

#difficultyButtons {
  display: flex;
  gap: 10px;
  flex: 1;
  width: auto;
}

.history-btn.difficulty-history-btn {
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  flex: 0 0 50px;
  border-radius: 12px;
}

.history-btn.difficulty-history-btn.game-started {
  display: none;
}

.history-btn.menu-btn-ton {
  background: var(--gradient-info);
  box-shadow: var(--shadow-raise-purple);
}
.history-btn.menu-btn-ton:hover {
  background: var(--gradient-info-hover);
  box-shadow: var(--shadow-raise-purple);
}
.history-btn.menu-btn-ton:active {
  top: 4px;
  box-shadow:
    0 0 0 #1c1525,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ==================== ACTION BUTTONS ==================== */
#playButton {
  width: 100%;
  height: 55px;
  background: var(--gradient-success);
  border: none;
  border-radius: var(--border-radius-large);
  color: white;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-rounded);
  cursor: pointer;
  box-shadow: var(--shadow-raise-success);
  transition: all var(--transition-fast);
  position: relative;
  top: 0;
  padding: 0;
  text-transform: uppercase;
}

#playButton:hover {
  background: var(--gradient-success-hover);
  box-shadow:
    0 4px 0 #2d7a2f,
    0 8px 12px rgba(0, 0, 0, 0.4);
}

#playButton:active {
  top: 4px;
  box-shadow:
    0 0 0 #2d7a2f,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

#cashOutButton {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 55px;
  background: linear-gradient(180deg, #25b5ff 0%, #017ebd 100%);
  border: none;
  border-radius: var(--border-radius-large);
  color: white;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-rounded);
  cursor: pointer;
  box-shadow:
    0 4px 0 #14668f,
    0 6px 10px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
  position: relative;
  top: 0;
  padding: 0;
  text-transform: uppercase;
}

#cashOutButton.visible {
  display: flex;
}

#cashOutButton:hover {
  background: linear-gradient(180deg, #38bbfc 0%, #30b4f6 100%);
  box-shadow:
    0 4px 0 #168bc6,
    0 8px 12px rgba(0, 0, 0, 0.4);
}

#cashOutButton:active {
  top: 4px;
  box-shadow:
    0 0 0 #4b579b,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

#cashOutAmount {
  font-size: 18px;
  font-weight: 900;
}

#cashOutAmount .egg-icon {
  margin-top: -3px;
  margin-left: 0px;
}

#playButton.game-started,
#cashOutButton.game-started {
  height: 110px;
}

/* ==================== OVERLAYS ==================== */
#winOverlay,
#loseOverlay {
  display: none;
  position: fixed;
  overflow: visible;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #512481 0%, #150b2d 100%);
  border-radius: 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  width: 80vw;
  max-width: 360px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 0px;
  border: 5px solid #453d61;
  z-index: 1000;
  padding-bottom: 30px;
}

.overlay-descr {
  color: #edb430;
  text-transform: uppercase;
  font-size: 20px;
  text-align: center;
  padding: 10px;
  font-weight: 800;
  text-shadow: 0 0 4px #2b0559;
}

#profitCoef {
  text-shadow: 0 3px 1px rgb(94 7 251);
  min-height: 15px;
}

.overlay-title {
  font-family: var(--font-rounded);
  font-size: 23px;
  color: #ffffff;
  position: relative;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  text-shadow: 0 4px 0px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  font-weight: 800;
  width: 80%;
  padding: 10px 0px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #d26eb8 0%, #c4277a 100%);
  box-shadow: 0 5px 0 #ed7bc5;
  text-transform: uppercase;
  z-index: 99999;
}

.overlay-profit {
  font-family: var(--font-rounded);
  font-size: 19px;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-weight: 900;
}

#winProfit {
  flex-direction: column;
  gap: 10px;
  white-space: normal;
}

#winProfit .overlay-eggs {
  display: flex;
  gap: 6px;
  justify-content: center;
  animation: floatEggs 2s ease-in-out infinite;
}

.overlay-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.overlay-action-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-rounded);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-fast);
  position: relative;
  top: 0;
}

.overlay-action-btn:hover {
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.3),
    0 8px 14px rgba(0, 0, 0, 0.4);
}

.overlay-action-ok:hover {
  box-shadow: none;
}

.overlay-action-ok.lucky:hover {
  box-shadow: none;
}

.overlay-action-btn:active {
  top: 3px;
  box-shadow:
    0 0 0 rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.overlay-action-ok {
  background: var(--gradient-gold);
  box-shadow: var(--shadow-raise-gold);
  font-weight: 900;
}

.overlay-action-ok.lucky {
  background: var(--gradient-gold-dark);
  box-shadow: 0 4px 0 #472106, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.overlay-action-restart {
  background: var(--gradient-success);
  box-shadow: var(--shadow-raise-success);
}

.overlay-profit.lose {
  color: #ff5252;
}

.overlay-egg-icon {
  width: 170px !important;
  height: 170px !important;
  margin: 0 !important;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cc7f06;
  font-size: 27px;
  background: url("/assets/img/favicon.png") center/contain no-repeat;
  text-shadow: 0 4px 10px #fff;
}

.overlay-egg-icon.lucky {
  background: url("/assets/img/favicon_lucky.png") center/contain no-repeat;
  color: #482202;
}

.overlay-egg-icon .egg-text {
  position: absolute;
  color: #381802;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 4px 10px #fff;
}

/* ==================== TUTORIAL OVERLAY ==================== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  padding-top: calc(22px + var(--tutorial-safe-top, 0px) + 10px);
  background: rgba(8, 6, 12, 0.8);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.tutorial-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tutorial-overlay.is-fading-out {
  opacity: 0;
  pointer-events: none;
}

.tutorial-card {
  position: relative;
  width: min(520px, 94vw);
  min-height: 380px;
  height: 100%;
  max-height: none;
  background: linear-gradient(180deg, #2d2237 0%, #19111f 100%);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-xxl);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tutorial-bg-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.tutorial-bg-icon {
  position: absolute;
  color: rgba(255, 255, 255, 0.01);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  transform-origin: center;
}

.tutorial-bg-icon.icon-1 {
  top: 12%;
  left: 6%;
  font-size: 72px;
  transform: rotate(-14deg);
}

.tutorial-bg-icon.icon-2 {
  top: 22%;
  right: 10%;
  font-size: 64px;
  transform: rotate(18deg);
}

.tutorial-bg-icon.icon-3 {
  bottom: 18%;
  left: 12%;
  font-size: 78px;
  transform: rotate(-26deg);
}

.tutorial-bg-icon.icon-4 {
  bottom: 12%;
  right: 8%;
  font-size: 68px;
  transform: rotate(12deg);
}

.tutorial-bg-icon.icon-5 {
  top: 46%;
  left: 45%;
  font-size: 80px;
  transform: rotate(-8deg);
}

.tutorial-bg-icon.icon-6 {
  top: 8%;
  right: 42%;
  font-size: 70px;
  transform: rotate(-22deg);
}

.tutorial-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  filter: blur(70px);
  opacity: 0.4;
  z-index: 0;
}

.tutorial-glow--left {
  background: radial-gradient(circle at 30% 30%, rgba(255, 221, 0, 0.7), transparent 60%);
  top: -40px;
  left: -70px;
}

.tutorial-glow--right {
  background: radial-gradient(circle at 70% 40%, rgba(255, 124, 194, 0.5), transparent 60%);
  bottom: -50px;
  right: -80px;
}

.tutorial-progress {
  position: absolute;
  top: 15px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  z-index: 2;
}

.tutorial-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tutorial-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f4e886 0%, #ff7cc2 100%);
  border-radius: 999px;
  transition: width 0.2s linear;
}

.tutorial-close-btn {
  position: absolute;
  top: 35px;
  right: 18px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.tutorial-close-btn i {
  font-size: 15px;
  line-height: 1;
}

.tutorial-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tutorial-close-btn:active {
  transform: scale(0.95);
}

.tutorial-slider-window {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--tutorial-safe-top, 0px) + 10px);
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  isolation: isolate;
  min-height: 0;
}

.tutorial-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  width: 100%;
  min-width: 100%;
  gap: 0;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.tutorial-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--text-white);
  text-transform: uppercase;
  padding: 10px 22px 4px;
  overflow-y: auto;
  scrollbar-width: none;
  max-height: calc(100vh - 200px);
}

.tutorial-slide::-webkit-scrollbar {
  display: none;
}

.tutorial-slide--hero {
  gap: 16px;
}

.tutorial-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white-80);
  font-size: 12px;
  font-weight: 800;
}

.tutorial-hero-title {
  font-family: var(--font-rounded);
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tutorial-logo {
  height: 148px;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.tutorial-hero-sticker tgs-sticker {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
  display: block;
}

.tutorial-slide-sticker tgs-sticker {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
  margin-bottom: 16px;
}

.tutorial-currency-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tutorial-currency-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 200px;
}

.tutorial-currency-item .egg-icon {
  width: 60px !important;
  height: 60px !important;
  margin: 0;
  animation: tutorialFloat 3s ease-in-out infinite;
}

.tutorial-mini-text {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-align: center;
  font-family: var(--font-rounded);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-white-80);
  text-transform: none;
}

.tutorial-mini-text .mini-text-gold {
  color: #ffcc33;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
}

.tutorial-mini-text .mini-text-lucky {
  color: #c08a5a;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
  padding-top: 15px;
}

.tutorial-mini-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #ff6b6b;
  font-size: 26px;
  line-height: 1;
  height: 30px;
  margin: 5px 0;
}

.tutorial-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.tutorial-mini-icon--star {
  color: #ffcc33;
}

.tutorial-mini-icon--ton {
  color: #25b5ff;
}

.tutorial-mini-icon--gift {
  color: #d90000;
  background: linear-gradient(135deg, #d90000 0%, #ff6b6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tutorial-mini-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

@keyframes tutorialFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}
.tutorial-primary-btn {
  margin-top: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  background: var(--gradient-gold);
  box-shadow: var(--shadow-raise-gold);
  color: #3c2300;
  font-family: var(--font-rounded);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tutorial-primary-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #865605, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tutorial-start-btn {
  display: none;
  margin: 0;
}

.tutorial-slide-title {
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 800;
}

.tutorial-slide-text {
  max-width: 360px;
  font-family: var(--font-rounded);
  font-size: 15px;
  line-height: 1.6;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-slide-text--gold {
  color: #ffcc33;
}

.tutorial-slide-text--lucky {
  color: #c08a5a;
}

.tutorial-slide-text--goldline {
  color: #ffcc33;
}

.tutorial-slide-text--tonline {
  color: #38b6ff;
}

.tutorial-slide-text--hero-motto {
  color: #ffffff;
  max-width: 280px;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.6;
}

.tutorial-slide-sub {
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
}

.tutorial-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: stretch;
  width: 100%;
}

.tutorial-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 13px;
  text-transform: uppercase;
  width: 100%;
  padding: 15px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.tutorial-list-label {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 10px;
  color: #ffcc33;
  font-weight: 900;
  min-width: 80px;
  text-align: center;
}

.tutorial-list-desc {
  color: #ffffff;
  font-weight: 700;
  text-transform: none;
  opacity: 0.9;
  font-size: 11px;
  text-align: center;
  padding-top: 0;
  width: 100%;
  word-break: break-word;
}

.tutorial-list li:nth-child(1) .tutorial-list-label {
  color: #7cf29b;
  background: rgba(124, 242, 155, 0.12);
}

.tutorial-list li:nth-child(1) .tutorial-list-desc {
  color: #7cf29b;
}

.tutorial-list li:nth-child(2) .tutorial-list-label {
  color: #38b6ff;
  background: rgba(56, 182, 255, 0.12);
}

.tutorial-list li:nth-child(2) .tutorial-list-desc {
  color: #38b6ff;
}

.tutorial-list li:nth-child(3) .tutorial-list-label {
  color: #ffb347;
  background: rgba(255, 179, 71, 0.14);
}

.tutorial-list li:nth-child(3) .tutorial-list-desc {
  color: #ffb347;
}

.tutorial-list li:nth-child(4) .tutorial-list-label {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.14);
}

.tutorial-list li:nth-child(4) .tutorial-list-desc {
  color: #ff6b6b;
}

.tutorial-actions {
  display: flex;
  justify-content: center;
  padding: 0 22px 12px;
  gap: 10px;
  z-index: 2;
  margin-top: -4px;
  margin-bottom: 15px;
  width: 100%;
  align-items: center;
}

.tutorial-actions.is-start {
  justify-content: center;
}

.tutorial-rate-info {
  display: none;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-family: var(--font-rounded);
  font-weight: 900;
  font-size: 16px;
  flex: 1 1 auto;
  justify-content: center;
  text-transform: uppercase;
}

.tutorial-rate-info--withdraw {
  display: none;
}

.tutorial-rate-info .egg-icon {
  width: 22px;
  height: 22px;
  margin: 0;
}

.tutorial-rate-info .tutorial-ton-icon {
  color: #38b6ff;
  width: 22px;
  height: 20px;
}

.tutorial-rate-gold {
  color: #ffcc33;
}

.tutorial-rate-text {
  color: #8a8f9b;
}

.tutorial-rate-ton {
  color: #38b6ff;
}

.tutorial-rate-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-rounded);
  font-weight: 900;
  font-size: 18px;
  text-transform: uppercase;
}

.tutorial-rate-inline-gold {
  color: #ffcc33;
}

.tutorial-rate-inline-sign {
  color: #8a8f9b;
}

.tutorial-rate-inline-ton {
  color: #38b6ff;
}

.tutorial-ghost-btn,
.tutorial-secondary-btn {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-rounded);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tutorial-ghost-btn,
.tutorial-secondary-btn {
  flex: 1 1 50%;
  max-width: 200px;
  min-width: 0;
}

.tutorial-actions.is-start {
  justify-content: center;
}

.tutorial-secondary-btn {
  background: var(--gradient-info);
  box-shadow: var(--shadow-raise-info);
  color: #e6f6ff;
}

.tutorial-secondary-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #135372, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tutorial-ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white-80);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.tutorial-ghost-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tutorial-ghost-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.menu-item--tutorial .settings-tutorial-btn {
  width: 100%;
  max-width: none;
  justify-content: center;
  margin-top: 6px;
  display: inline-flex;
}

.tutorial-secondary-btn.is-final {
  background: var(--gradient-success);
  box-shadow: var(--shadow-raise-success);
  color: #ffffff;
  font-size: 22px;
}

.tutorial-actions.is-final {
  justify-content: center;
}

.tutorial-actions.is-start .tutorial-start-btn {
  display: inline-flex;
  justify-content: center;
  width: min(320px, 90%);
}

.tutorial-actions.is-start .tutorial-ghost-btn,
.tutorial-actions.is-start .tutorial-secondary-btn {
  display: none;
}

.tutorial-actions.is-final .tutorial-ghost-btn,
.tutorial-ghost-btn.is-hidden {
  display: none;
}

.tutorial-actions.is-final .tutorial-secondary-btn {
  display: none;
}

.tutorial-final-btn {
  padding: 18px 30px;
  border: none;
  border-radius: 14px;
  background: var(--gradient-success);
  box-shadow: var(--shadow-raise-success);
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(320px, 90%);
}

.tutorial-final-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2d7a2f, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tutorial-invite-btn {
  margin-top: 6px;
  padding: 14px 22px;
  border: none;
  border-radius: 14px;
  background: var(--gradient-success);
  box-shadow: var(--shadow-raise-success);
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(320px, 90%);
  gap: 8px;
}

.tutorial-invite-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2d7a2f, 0 4px 10px rgba(0, 0, 0, 0.35);
}

.tutorial-actions.is-final-active .tutorial-final-btn {
  display: inline-flex;
}

.tutorial-actions.is-final-active .tutorial-ghost-btn,
.tutorial-actions.is-final-active .tutorial-start-btn,
.tutorial-actions.is-final-active .tutorial-secondary-btn {
  display: none;
}

@media (max-width: 420px) {
  .tutorial-card {
    min-height: 340px;
    max-height: calc(100vh - 40px);
    width: calc(100vw - 12px);
  }

  .tutorial-hero-title {
    font-size: 22px;
  }

  .tutorial-logo {
    height: 110px;
  }

  .tutorial-slide-text {
    max-width: 92vw;
  }
}

@media (max-width: 485px) {
  .tutorial-slider-window {
    padding-left: 0;
    padding-right: 0;
  }

  .tutorial-slide {
    padding-inline: 18px;
  }
}

/* ==================== BALANCE POPUP ==================== */

.popup-title {
  font-family: var(--font-rounded);
  font-size: 48px;
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 10px;
}

@keyframes floatEggs {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15px);
  }
  100% {
    transform: translateY(0);
  }
}

.popup-subtitle {
  font-family: var(--font-rounded);
  font-size: 24px;
  color: var(--text-white);
  opacity: 0.8;
  margin-bottom: 30px;
}

/* ==================== MENU SYSTEM ==================== */
#menuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  z-index: 1000;
  animation: menuFadeIn var(--transition-slow) ease;
  overflow: hidden;
}

#menuPanel {
  position: fixed;
  top: 0;
  right: 0;
  width: 90%;
  max-width: 450px;
  height: 100%;
  background: #1b152f;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: menuSlideIn var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Menu Header */
.menu-header {
  display: flex;
  background: #241b31;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px;
  flex-shrink: 0;
  box-shadow: 0 -2px 10px 10px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.menu-header img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
}

.menu-header h2,
#menuTitle {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 20px;
  color: var(--color-primary);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  transition: opacity var(--transition-normal) ease;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.menu-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.menu-back-btn.is-visible {
  display: inline-flex;
}

.menu-back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.menu-back-btn:active {
  transform: translateY(1px);
}

.menu-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.menu-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal), color var(--transition-normal);
  line-height: 1;
  padding: 0;
}

.menu-icon-btn:hover {
  transform: scale(1.15);
  color: var(--color-primary);
}

.menu-icon-btn:active {
  transform: scale(0.92);
}

.menu-select {
  width: 50%;
  height: 50px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-small);
  color: white;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-rounded);
  padding: 0 15px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-large);
  text-transform: uppercase;
}

.menu-select:focus {
  outline: none;
  border-color: #7a7a8e;
}

.menu-select option {
  background: var(--bg-dark);
  color: white;
  padding: 10px;
  text-transform: none;
}

.swal2-input--large {
  font-size: 28px !important;
  font-weight: 900;
  font-family: var(--font-rounded) !important;
  text-align: center;
  border-radius: 30px;
  border: 2px solid #ffffff;
  text-transform: uppercase;
  min-width: 0;
  width: 100%;
  min-width: 215px;
}

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

.swal2-validation-message {
  border-radius: 15px;
  text-transform: uppercase;
  font-family: var(--font-rounded) !important;
  font-weight: 800;
  padding: 15px;
  padding-left: 5px;
  color: #363636;
  width: auto;
  max-width: 90%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  align-self: center;
  text-align: center;
  margin: 0 auto;
  margin-top: 10px;
  font-size: 13px;
}

.swal2-input--large:focus {
  outline: none;
  box-shadow: none !important;
  background: transparent !important;
}

.swal2-input {
  margin-top: 0.6em;
}

.withdraw-input-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.withdraw-input-icon {
  position: absolute;
  left: 70px;
  top: 56%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: inline-block;
  background: url("/assets/img/eggies.png?1") center/contain no-repeat;
  pointer-events: none;
}

.swal2-receiving-address {
  color: rgba(255, 255, 255, 0.30);
  font-family: var(--font-mono);
  font-size: 14px;
}

.withdraw-ton-preview {
  margin-top: 8px;
  font-weight: 800 !important;
  font-size: 20px !important;
  color: #ffffff !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  display: none;
}

.withdraw-ton-preview.is-visible {
  opacity: 1;
  visibility: visible;
  display: block;
}

.withdraw-ton-preview .amount {
  color: #0eaffd;
}

.swal2-inventory-confirm {
  transition: opacity 0.2s ease;
}

.swal2-inventory-confirm.is-hidden {
  opacity: 0.6;
  pointer-events: none;
}

.swal2-withdraw-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
}

.close-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal), color var(--transition-normal);
  line-height: 1;
  padding: 0;
}

.close-menu-btn:hover {
  transform: scale(1.15);
  color: var(--color-primary);
}

.close-menu-btn:active {
  transform: scale(0.92);
}

/* Menu Content */
.menu-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeInContent var(--transition-slow) ease;
  position: relative;
}

.menu-content, .tab-content, #menuPanel {
  /*overscroll-behavior: contain;*/
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Scrollbar Styling */
.tab-content::-webkit-scrollbar {
  width: 8px;
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: var(--border-radius-medium);
  transition:
    background var(--transition-slow) ease,
    opacity var(--transition-slow) ease;
}

.tab-content:hover::-webkit-scrollbar-thumb,
.tab-content:active::-webkit-scrollbar-thumb,
.tab-content.scrolling::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.tab-content {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.tab-content:hover,
.tab-content.scrolling {
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Menu Sections */
.menu-section {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-family: var(--font-rounded);
  font-size: 24px;
  color: var(--color-primary);
  margin: 0 0 20px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Transaction History */
.history-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-panel {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-title {
  font-size: 16px;
  font-weight: 900;
}

.history-pill {
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-white);
  text-transform: uppercase;
}

.history-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  box-shadow: var(--shadow-small);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.history-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-white-70);
  font-weight: 800;
  position: absolute;
  inset: 0;
  width: 100%;
  text-transform: uppercase;
  gap: 30px;
  transform: none;
  top: 70px;
}

.history-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.history-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.04)
  );
  transform: translateY(-1px);
}

.history-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.history-item-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffdd00;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.history-item-desc {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white-70);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.3;
  text-transform: uppercase;
}

.history-desc-label {
  color: var(--text-white-80);
  font-weight: 800;
}

.history-amount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--text-white);
}

.history-amount-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  min-width: 86px;
  justify-content: flex-end;
}

.history-amount-chip .egg-icon {
  margin: 0;
}

.history-amount-chip--positive {
  color: #ffdd00;
  border-color: rgba(255, 221, 0, 0.5);
  background: rgba(255, 221, 0, 0.12);
}

.history-amount-chip--negative {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.history-status--completed .history-amount-chip {
  color: #86ff8f;
  border-color: rgba(134, 255, 143, 0.45);
  background: rgba(134, 255, 143, 0.12);
}

.history-status--processing .history-amount-chip {
  color: #7cd9ff;
  border-color: rgba(124, 217, 255, 0.45);
  background: rgba(124, 217, 255, 0.12);
}

.history-status--pending .history-amount-chip {
  color: #ffe57c;
  border-color: rgba(255, 229, 124, 0.45);
  background: rgba(255, 229, 124, 0.12);
}

.history-status--failed .history-amount-chip {
  color: #ff8a9a;
  border-color: rgba(255, 138, 154, 0.45);
  background: rgba(255, 138, 154, 0.12);
}

.history-status--canceled .history-amount-chip {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.history-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  fill: currentColor;
}

.history-icon--star {
  color: var(--color-primary);
}

.history-icon--ton {
  color: #00d4ff;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white-70);
  width: 100%;
}

.history-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.history-id-label {
  color: var(--text-white-60);
  font-weight: 800;
  font-size: 11px;
}

.history-id-value {
  color: var(--text-white-60);
  font-weight: 800;
  font-size: 11px;
}

.history-copy-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.history-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.history-copy-btn:active {
  transform: translateY(1px);
}

.history-copy-btn.is-copied {
  border-color: var(--color-success-light);
  color: var(--color-success-light);
  background: rgba(91, 199, 95, 0.15);
}

.history-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-white-70);
  width: 100%;
  text-transform: uppercase;
}

.history-status-text {
  margin-left: auto;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
}

.history-right {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: end;
  row-gap: 6px;
  height: 100%;
}

.history-right .history-status-text {
  align-self: end;
}

.status--completed {
  color: #86ff8f;
}

.status--processing {
  color: #7cd9ff;
}

.status--pending {
  color: #ffe57c;
}

.status--failed {
  color: #ff8a9a;
}

.status--canceled {
  color: rgba(255, 255, 255, 0.8);
}

.history-item.is-hidden {
  display: none;
}

.history-list.is-expanded .history-item.is-hidden {
  display: grid;
}

.history-more-btn {
  display: none;
  align-self: center;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--text-white);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  text-transform: uppercase;
  font-family: var(--font-rounded);
}

.history-more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.history-more-btn:active {
  transform: translateY(1px);
}

.history-more-btn i {
  transition: transform 0.2s ease;
}

.history-more-btn.is-expanded {
  background: rgba(255, 255, 255, 0.12);
  border-style: solid;
}

.history-more-btn.is-expanded i {
  transform: rotate(180deg);
}

.history-more-spinner {
  display: none;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  align-self: center;
}

.history-more-spinner.is-visible {
  display: flex;
}

.history-tab-switch {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(
    145deg,
    rgba(18, 18, 28, 0.92),
    rgba(12, 12, 22, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.55),
    inset 0 -2px 3px rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}

.history-tab-btn {
  font-family: var(--font-rounded);
  font-size: 14px;
  text-transform: uppercase;
  padding: 8px 10px;
  font-weight: 800;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-white-70);
  cursor: pointer;
  transition: all var(--transition-slow) ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
}

.history-tab-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.history-tab-btn.is-active {
  color: #1c1c1c;
  background: linear-gradient(135deg, #f2c425, #ffdd55);
  box-shadow:
    0 8px 18px rgba(242, 196, 37, 0.35),
    inset 0 -2px 2px rgba(143, 107, 12, 0.35);
  transform: translateY(-1px);
}

.history-panel {
  display: none;
  position: relative;
}

.history-panel.is-active {
  display: block;
}

.game-history-list {
  gap: 12px;
}

.game-history-item {
  align-items: stretch;
}

.game-history-main {
  gap: 6px;
}

.game-history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.game-history-title {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  color: #ebb819;
}

.game-status--won .game-history-title {
  color: #ebb819;
}

.game-status--lost .game-history-title {
  color: #c68a3a;
}

.game-status--in_progress .game-history-title {
  color: #7cd9ff;
}

.game-status--abandoned .game-history-title {
  color: #ff6b6b;
}

.game-history-bet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--text-white);
  text-transform: uppercase;
}

.game-history-difficulty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-white);
  align-self: flex-end;
}

.game-history-id-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.game-history-seed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-white-70);
  font-weight: 800;
  font-size: 12px;
  word-break: break-all;
}

.game-history-seed-value {
  color: var(--text-white-60);
  font-size: 11px;
}

.game-history-meta {
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.game-history-verify {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  color: #7dff95;
  text-transform: uppercase;
}

.game-history-verify i {
  color: #7dff95;
}

.game-history-bet .egg-icon {
  width: 17px;
  height: 17px;
}

.game-history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  height: 100%;
}

.game-history-chip {
  margin-top: auto;
  margin-bottom: auto;
}

.game-history-legit-btn {
  margin-top: auto;
}

.game-history-chip {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: fit-content;
  text-align: center;
}

.game-history-chip-label {
  font-size: 11px;
  color: var(--text-white-70);
  font-weight: 800;
  text-transform: uppercase;
}

.game-history-chip-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 900;
}

.game-history-chip--win {
  color: #ebb819;
  border-color: rgba(235, 184, 25, 0.65);
  background: rgba(235, 184, 25, 0.16);
  box-shadow: 0 4px 12px rgba(235, 184, 25, 0.18);
}

.game-history-chip--fried {
  color: #c68a3a;
  border-color: rgba(198, 138, 58, 0.65);
  background: rgba(198, 138, 58, 0.18);
}

.game-history-chip--progress {
  color: #7cd9ff;
  border-color: #7cd9ff;
  background: rgba(124, 217, 255, 0.22);
}

.game-history-chip--abandoned {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.65);
  background: rgba(255, 107, 107, 0.16);
}

.game-history-chip--neutral {
  color: var(--text-white-80);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.game-history-status {
  text-transform: uppercase;
  font-size: 11px;
}

.game-status--won .game-history-status {
  color: #ebb819;
}

.game-status--lost .game-history-status {
  color: #c68a3a;
}

.game-status--in_progress .game-history-status {
  color: #7cd9ff;
}

.game-status--abandoned .game-history-status {
  color: #ff6b6b;
}

.game-history-legit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white-70);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.game-history-legit-btn i {
  margin-right: 5px;
}

.game-history-legit-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.game-history-legit-btn:active {
  transform: translateY(1px);
}

.game-history-legit-btn.is-error {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.7);
  color: #ff6b6b;
}

.game-legit-spinner {
  align-self: flex-end;
  margin-top: auto;
}


/* User Info Section */
.user-info {
  background: #39223e;
}

.user-balance-display {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.balance-item {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #4b2d52;
  padding: 8px 10px;
  border-radius: var(--border-radius-medium);
  font-family: var(--font-rounded);
  font-size: 16px;
  color: var(--text-white);
  font-weight: 800;
}

.balance-item--ton {
  color: #039cd9;
}

.balance-item .shop-ton-spinner {
  width: 21px;
  height: 21px;
}

.balance-ton-icon {
  display: inline-flex;
  width: 20px;
  height: 18px;
  margin-right: 2px;
}

.balance-ton-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.balance-item .egg-icon {
  margin-left: 0px;
}

/* Menu Items */
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  font-weight: 800;
}

.menu-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item-label {
  font-family: var(--font-rounded);
  font-size: 18px;
  color: var(--text-white);
  text-transform: uppercase;
}

/* iOS Style Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 31px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: var(--shadow-small);
}

.ios-switch input:checked + .ios-slider {
  background-color: var(--color-success);
}

.ios-switch input:checked + .ios-slider:before {
  transform: translateX(20px);
}

.ios-switch input:focus + .ios-slider {
  box-shadow: 0 0 1px var(--color-success);
}

/* Volume Slider */
.volume-slider {
  width: 150px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    var(--color-success) 0%,
    var(--color-success) 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 100%
  );
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success);
  cursor: pointer;
  box-shadow: var(--shadow-small);
  transition: transform var(--transition-normal);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.volume-slider::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-small);
  transition: transform var(--transition-normal);
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.volume-slider::-moz-range-thumb:active {
  transform: scale(0.95);
}

.volume-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  height: 6px;
}

.volume-slider::-moz-range-progress {
  background: var(--color-success);
  border-radius: 3px;
  height: 6px;
}

/* Menu Action Buttons */
.menu-action-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--border-radius-large);
  font-family: var(--font-rounded);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  box-shadow: var(--shadow-large);
  text-transform: uppercase;
  position: relative;
  color: white;
  top: 0;
}

.ton-btn {
  background: var(--gradient-info);
  box-shadow: var(--shadow-raise-info);
}

.ton-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #135372,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

.ton-btn:hover {
  background: var(--gradient-info-hover);
}

.add-eggs-btn {
  background: var(--gradient-success);
  box-shadow: var(--shadow-raise-success);
}

.add-eggs-btn:hover {
  background: var(--gradient-success-hover);
  box-shadow:
    0 4px 0 #2d7a2f,
    0 8px 12px rgba(0, 0, 0, 0.4);
}

.add-eggs-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #2d7a2f,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

.history-btn {
  background: var(--gradient-purple);
  box-shadow: var(--shadow-raise-purple);
  font-size: 20px;
  padding: 0;
  min-height: 56px;
}

.history-btn:hover {
  background: linear-gradient(180deg, #5a446c 0%, #322841 100%);
}

.history-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #1c1525,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

.referral-action-btn {
  background: var(--gradient-purple);
  box-shadow: var(--shadow-raise-purple);
}

.referral-action-btn:hover {
  background: linear-gradient(180deg, #5a446c 0%, #322841 100%);
}

.referral-action-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #1c1525,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

.disconnect-btn {
  background: linear-gradient(
    180deg,
    var(--color-danger) 0%,
    var(--color-danger-dark) 100%
  ) !important;
  box-shadow:
    0 4px 0 #dc2b4e,
    0 8px 12px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.disconnect-btn:hover {
  background: linear-gradient(
    180deg,
    var(--color-danger) 0%,
    #f13b5f 100%
  ) !important;
}

.disconnect-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #dc2b4e,
    0 2px 5px rgba(0, 0, 0, 0.4);
}

.menu-action-btn:active {
  transform: translateY(0);
}

/* TON Wallet Styles */
.ton-wallet-card {
  margin-bottom: 10px;
}

.ton-wallet-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}

.ton-wallet-label {
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
  font-family: var(--font-rounded);
  font-weight: 800;
}

.ton-wallet-address {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-info-light);
  word-break: break-all;
}

.ton-wallet-balance {
  font-family: var(--font-rounded);
  font-size: 20px;
  color: #039cd9;
  font-weight: 800;
}

/* ==================== RATING STYLES ==================== */
.rating-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 55vh;
  justify-content: center;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 15px;
  border-radius: var(--border-radius-medium);
  transition: all var(--transition-slow) ease;
  font-family: var(--font-rounded);
  font-weight: 800;
  text-transform: uppercase;
}

.rating-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(5px);
}

.rating-position {
  font-family: var(--font-rounded);
  font-size: 24px;
  color: #6f6f6f;
  min-width: 30px;
  text-align: center;
  font-weight: bold;
}

.rating-item:nth-child(1) .rating-position {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rating-item:nth-child(2) .rating-position {
  color: #fff;
}

.rating-item:nth-child(3) .rating-position {
  color: #cd7f32;
}

.rating-name {
  flex: 1;
  font-size: 18px;
  color: var(--text-white);
  word-break: break-word;
  white-space: normal;
}

.rating-score {
  font-size: 18px;
  color: #ffdc03;
  display: flex;
  align-items: center;
  gap: 5px;
}

.user-rating-card {
  background: linear-gradient(
    135deg,
    rgba(255, 221, 0, 0.1),
    rgba(255, 221, 0, 0.05)
  );
  border: 2px solid rgba(255, 221, 0, 0.3);
  border-radius: var(--border-radius-xl);
  padding: 20px;
  text-align: center;
}

.user-rating-label {
  font-family: var(--font-rounded);
  font-size: 16px;
  color: var(--text-white-70);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 800;
}

.user-rating-position {
  font-family: var(--font-rounded);
  font-size: 48px;
  color: var(--color-primary);
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}

.user-rating-score {
  font-family: var(--font-rounded);
  font-size: 24px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  gap: 8px;
}

/* ==================== SHOP STYLES ==================== */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.shop-grid--ton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
}

.shop-item {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-xl);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all var(--transition-slow) ease;
  position: relative;
  cursor: pointer;
}

.shop-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 221, 0, 0.3);
  transform: translateX(5px);
}

.shop-item.is-selected {
  background: rgba(255, 221, 0, 0.12);
  border-color: rgba(255, 221, 0, 0.6);
  box-shadow: 0 0 18px rgba(255, 221, 0, 0.15);
  transform: translateX(5px);
}

.shop-item.featured {
  border-color: rgba(255, 221, 0, 0.4);
}

.shop-item-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-dark)
  );
  color: var(--bg-darker);
  font-family: var(--font-rounded);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--border-radius-xxl);
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 221, 0, 0.4);
}

.shop-item-icon {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-large);
  position: relative;
}

.shop-item-icon > .egg-icon {
  width: 52px;
  height: 52px;
}

.shop-pack-switch {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(
    145deg,
    rgba(18, 18, 28, 0.92),
    rgba(12, 12, 22, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.55),
    inset 0 -2px 3px rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.shop-pack-switch-btn {
  font-family: var(--font-rounded);
  font-size: 14px;
  text-transform: uppercase;
  padding: 8px 10px;
  font-weight: 800;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-white-70);
  cursor: pointer;
  transition: all var(--transition-slow) ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
}

.shop-pack-switch-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.shop-pack-switch-btn.is-active {
  color: var(--text-white);
  border-color: transparent;
}

.shop-pack-switch-btn--stars.is-active {
  color: #1c1c1c;
}

.shop-pack-switch-btn--stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shop-pack-switch-btn--stars.is-active {
  background: linear-gradient(135deg, #f2c425, #ffdd55);
  box-shadow:
    0 8px 18px rgba(242, 196, 37, 0.35),
    inset 0 -2px 2px rgba(143, 107, 12, 0.35);
}

.shop-pack-switch-btn--ton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shop-pack-switch-btn--ton .shop-pack-switch-bonus {
  font-size: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.25),
    rgba(0, 136, 204, 0.45)
  );
  padding: 2px 6px;
  border-radius: var(--border-radius-small);
  color: var(--text-white);
  box-shadow: 0 0 12px rgba(0, 136, 204, 0.45);
  text-shadow: 0 0 6px rgba(0, 136, 204, 0.6);
}

.shop-pack-switch-btn--ton.is-active {
  background: linear-gradient(
    135deg,
    var(--color-info),
    var(--color-info-light)
  );
  box-shadow:
    0 8px 18px rgba(0, 136, 204, 0.35),
    inset 0 -2px 2px rgba(0, 60, 120, 0.35);
}

.shop-pack-switch-btn--gifts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shop-pack-switch-btn--gifts.is-active {
  background: var(--gradient-purple);
  box-shadow: 
    0 8px 18px rgb(90 39 130 / 38%), 
    inset 0 -2px 2px rgba(26, 18, 34, 0.5);
  color: var(--text-white);
}

.shop-pack-switch-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.shop-pack-switch-icon path {
  fill: currentColor;
}

.shop-pack-groups {
  position: relative;
}

.shop-pack-group {
  display: none;
  animation: fadeIn var(--transition-slow) ease;
}

.shop-pack-group.is-active {
  display: block;
}

.shop-pack-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-rounded);
  font-size: 11px;
  color: var(--text-white-70);
  margin: 12px 0px;
  text-transform: uppercase;
  text-align: center;
}

.shop-pack-meta span:first-child {
  color: var(--text-white-70);
}

.shop-item-icon--stack {
  align-items: center;
  justify-content: center;
}

.shop-item-icon--stack.shop-item-icon--3 {
  margin-right: 15px;
  margin-left: -10px;
}

.shop-item-icon--stack > .egg-icon {
  position: absolute;
  width: 52px;
  height: 52px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition:
    transform var(--transition-slow) ease,
    opacity var(--transition-slow) ease;
}

.shop-item-icon--2 > .egg-icon:nth-child(1) {
  transform: translate(-50%, -52%) scale(1.06);
  z-index: 2;
}

.shop-item-icon--2 > .egg-icon:nth-child(2) {
  transform: translate(-30%, -52%) scale(0.92);
  opacity: 0.85;
  z-index: 1;
}

.shop-item-icon--3 > .egg-icon:nth-child(1) {
  transform: translate(-50%, -52%) scale(1.06);
  z-index: 3;
}

.shop-item-icon--3 > .egg-icon:nth-child(2) {
  transform: translate(-24%, -52%) scale(0.94);
  opacity: 0.88;
  z-index: 2;
}

.shop-item-icon--3 > .egg-icon:nth-child(3) {
  transform: translate(2%, -52%) scale(0.88);
  opacity: 0.76;
  z-index: 1;
}

.shop-ton-meta {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-xl);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-family: var(--font-rounded);
  color: var(--text-white-70);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-pack-group--gifts {
  position: relative;
}

.shop-gifts-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 520px;
  padding-bottom: 12px;
}

.shop-gifts-card {
  position: relative;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(90, 68, 108, 0.25),
      transparent 45%
    ),
    radial-gradient(circle at 80% 0%, rgba(111, 82, 144, 0.18), transparent 35%),
    linear-gradient(180deg, #1a1225 0%, #0f0b16 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-xl);
  padding: 20px 18px 12px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  text-transform: uppercase;
}

.shop-gifts-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05), transparent 50%);
  pointer-events: none;
}

.shop-gifts-kicker {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 800;
  margin-bottom: 6px;
}

.shop-gifts-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  color: var(--text-white);
}

.shop-gifts-visual {
  display: flex;
  justify-content: center;
  margin: 18px 0 12px;
}

.shop-gifts-sticker {
  width: 150px;
  height: 150px;
}

.shop-gifts-steps {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-large);
  padding: 14px 12px;
  position: relative;
  overflow: hidden;
}

.shop-gifts-steps::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(90, 68, 108, 0.18),
    rgba(35, 26, 44, 0.3)
  );
  z-index: 0;
}

.shop-gifts-steps-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-rounded);
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 10px;
}

.shop-gifts-steps-list {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-gifts-steps-list li {
  position: relative;
  padding: 12px;
  border-radius: var(--border-radius-large);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: var(--text-white-80);
  backdrop-filter: blur(2px);
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
}

.shop-gifts-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #5a446c 0%, #2b2237 100%);
  display: grid;
  place-items: center;
  color: var(--text-white);
  box-shadow:
    0 6px 14px rgba(76, 58, 90, 0.35),
    inset 0 -1px 2px rgba(20, 14, 26, 0.45);
  font-size: 16px;
}

.shop-gifts-accent {
  color: #ffd45c;
  font-weight: 800;
  text-decoration: none;
}

.shop-gifts-accent:hover {
  text-decoration: underline;
}

.shop-gifts-cta {
  position: static;
  padding: 0;
  background: none;
  backdrop-filter: none;
  text-transform: uppercase;
}

.shop-gifts-btn {
  width: 100%;
  justify-content: center;
  font-size: 18px;
  background: var(--gradient-lucky);
  box-shadow:
    0 4px 0 #4c0ea0,
    0 4px 0px rgba(121, 32, 232, 0.45);
  color: var(--text-white);
}

.shop-gifts-btn:hover {
  background: linear-gradient(180deg, #f071ff 0%, #8d35f0 100%);
  box-shadow:
    0 4px 0 #4c0ea0,
    0 4px 0px rgba(121, 32, 232, 0.45);
}

.shop-gifts-btn:active {
  top: 4px;
  box-shadow:
    0 0 0 #4c0ea0,
    0 3px 8px rgba(0, 0, 0, 0.35);
}

.shop-ton-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
  color: var(--text-white-80);
}

.shop-ton-meta-note {
  font-size: 13px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.shop-pack-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 75vh;
  width: 100%;
  color: var(--text-white-70);
  text-align: center;
}

.shop-pack-loader.is-visible {
  display: flex;
}

.shop-ton-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-info-light);
  animation: tonSpinner 0.9s linear infinite;
}

.shop-ton-spinner--small {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.shop-pack-error {
  display: none;
  text-align: center;
  padding: 16px;
  border-radius: var(--border-radius-large);
  border: 1px solid rgba(255, 82, 82, 0.35);
  background: rgba(255, 82, 82, 0.08);
  color: #ffb4b4;
  font-family: var(--font-rounded);
  text-transform: uppercase;
  margin: 12px;
}

@keyframes tonSpinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.shop-item-info {
  flex: 1;
}

.shop-item-name {
  font-family: var(--font-rounded);
  font-size: 18px;
  color: var(--text-white);
  margin-bottom: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.shop-item-description {
  font-family: var(--font-rounded);
  font-size: 16px;
  font-weight: 800;
  color: #ffcc28;
  text-transform: uppercase;
}

.shop-item-buy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-rounded);
  font-size: 20px;
  font-weight: 800;
  color: #f2c425;
  pointer-events: none;
  transition: color var(--transition-slow) ease;
}

.shop-item.is-selected .shop-item-buy {
  color: #ffe070;
}

.shop-item-buy .shop-item-price-value {
  display: inline-block;
}

.shop-item-price-icon {
  width: 20px;
  height: 0.85em;
  flex-shrink: 0;
}

.shop-item-price-icon path {
  fill: currentColor;
}

.shop-item-price-note {
  font-size: 13px;
  color: var(--text-white-70);
  margin-top: 2px;
}

.ton-pack .shop-item-buy {
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.ton-pack .shop-item-price-icon {
  color: var(--color-info-light);
  width: 1.1em;
  height: 0.8em;
}

.ton-pack .shop-item-price-value {
  font-size: 20px;
  color: var(--color-info-light);
}

.ton-pack .shop-item-price-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.ton-option-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(12, 12, 22, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
  z-index: 5;
}

.ton-option-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-info-light);
  animation: tonSpinner 0.9s linear infinite;
}

.ton-option-text {
  font-family: var(--font-rounded);
  font-size: 13px;
  color: var(--text-white);
  text-transform: uppercase;
  font-weight: 800;
}

.ton-pack.is-ton-processing {
  pointer-events: none;
}

.special-offer {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1)
  );
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--border-radius-xl);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.offer-content {
  flex: 1;
}

.offer-title {
  font-family: var(--font-rounded);
  font-size: 24px;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.offer-description {
  font-family: var(--font-rounded);
  font-size: 16px;
  color: var(--text-white-70);
}

.offer-claim-btn {
  background: linear-gradient(
    135deg,
    var(--color-purple),
    var(--color-purple-dark)
  );
  border: none;
  border-radius: var(--border-radius-medium);
  padding: 12px 30px;
  font-family: var(--font-rounded);
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: all var(--transition-slow) ease;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.offer-claim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
}

.offer-claim-btn:active {
  transform: translateY(0);
}

/* ==================== LUCKY EGG STYLES ==================== */
.tab-content--lucky {
  padding: 0;
  position: relative;
}

.lucky-egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    backdrop-filter 0.35s ease;
}

.lucky-egg-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.lucky-egg-overlay-spinner .shop-ton-spinner {
  width: 64px;
  height: 64px;
}

.lucky-egg-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  flex: 1;
  padding: 0px;
  border-bottom: none;
  width: 100%;
  min-height: 0;
}

.lucky-egg-visual {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 70px;
}

.lucky-egg-sticker {
  width: 100%;
  max-width: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  filter: drop-shadow(0 20px 40px rgba(140, 82, 255, 0.45));
}

.lucky-egg-sticker__main {
  animation: luckyEggFloat 5s ease-in-out infinite;
  padding-top: 10px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

@media (max-height: 820px) {
  .lucky-egg-sticker__main {
    padding-top: 0px;
  }
}

.lucky-egg-sticker__main.is-shaking {
  animation: luckyEggShake 0.15s ease-in-out infinite;
}

.lucky-egg-sticker__main.is-hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.lucky-egg-sticker__main.is-collapsing {
  animation: luckyEggZoom 0.8s ease forwards;
}

.lucky-egg-sticker__main.is-returning {
  animation: luckyEggReturn 0.6s ease forwards;
}

.lucky-egg-sticker tgs-sticker {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.lucky-egg-sticker tgs-sticker canvas,
.lucky-egg-sticker tgs-sticker svg {
  border-radius: inherit;
  display: block;
}

.lucky-egg-reward-sticker {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 260px;
  height: 260px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.lucky-egg-reward-sticker.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
  filter: drop-shadow(0 25px 50px rgba(141, 82, 255, 0.55));
}

.lucky-egg-reward-sticker.is-hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.lucky-egg-reward-sticker.is-zooming {
  animation: luckyRewardExit 0.7s ease forwards;
  pointer-events: none;
}

.lucky-egg-reward-visual {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: luckyEggFloat 5s ease-in-out infinite;
}

.lucky-egg-reward-visual tgs-sticker,
.lucky-egg-reward-visual img,
.lucky-egg-reward-visual .lucky-egg-reward-lottie {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}

.lucky-egg-reward-visual tgs-sticker svg,
.lucky-egg-reward-visual tgs-sticker canvas,
.lucky-egg-reward-visual .lucky-egg-reward-lottie svg {
  border-radius: 16px;
}

.lucky-egg-reward-label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  font-family: var(--font-rounded);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 800;
}

.lucky-egg-reward-label-main {
  font-size: clamp(16px, 6vw, 25px);
  text-transform: uppercase;
  white-space: nowrap;
}

.lucky-egg-reward-label-main .egg-icon {
  height: 25px;
  margin-top: -5px;
  margin-left: 0px;
}

.lucky-egg-reward-label-sub {
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}

.lucky-egg-actions {
  width: 100%;
  padding: 0 20px;
  display: none;
  flex-direction: row;
  gap: 12px;
  margin-bottom: 10px;
}

.lucky-egg-actions.is-visible {
  display: flex;
}

.lucky-egg-btn {
  flex: 1;
  border: none;
  border-radius: var(--border-radius-large);
  font-family: var(--font-rounded);
  font-size: 15px;
  padding: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  padding: 17px 0px;
}

.lucky-egg-btn .egg-icon {
  width: 17px;
  height: 17px;
}

.lucky-egg-btn:active {
  transform: translateY(1px);
}

.lucky-egg-btn--primary {
  background: var(--gradient-success);
  color: #fff;
  box-shadow:
    0 4px 0 #2d7a2f,
    0 12px 18px rgba(0, 0, 0, 0.35);
  flex: 0 0 35%;
}

.lucky-egg-btn--primary:hover {
  background: var(--gradient-success-hover);
  box-shadow:
    0 4px 0 #2d7a2f,
    0 14px 20px rgba(0, 0, 0, 0.45);
}

.lucky-egg-btn--primary:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 #2d7a2f,
    0 6px 10px rgba(0, 0, 0, 0.3);
}

/* Legacy stacked layout */
.lucky-egg-btn-line {
  display: block;
  text-transform: none;
  width: 100%;
  text-align: center;
}

.lucky-egg-btn-line--compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  text-transform: uppercase;
}

.lucky-egg-btn-line--value {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.lucky-egg-btn-line--value .egg-icon {
  margin-top: 0;
}

.lucky-egg-btn--secondary {
  background: var(--gradient-info);
  color: #fff;
  box-shadow:
    0 4px 0 #135372,
    0 12px 18px rgba(0, 0, 0, 0.35);
  flex: 0 0 62%;
}

.lucky-egg-btn--secondary:hover {
  background: var(--gradient-info-hover);
  box-shadow:
    0 4px 0 #135372,
    0 14px 20px rgba(0, 0, 0, 0.45);
}

.lucky-egg-btn--secondary:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 #135372,
    0 6px 10px rgba(0, 0, 0, 0.3);
}
.lucky-egg-action.is-hidden {
  display: none;
}

.lucky-egg-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
}

.lucky-egg-rewards {
  width: 100%;
}

.lucky-egg-reward-list {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  padding: 0 6px;
  overflow-x: auto;
  overflow-y: none;
  scroll-snap-type: x mandatory;
}

.lucky-egg-reward-list::-webkit-scrollbar {
  display: none;
}

.lucky-egg-reward-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lucky-egg-reward-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  scroll-snap-align: center;
}

.lucky-egg-reward {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
}

.lucky-egg-reward-item:first-child {
  margin-left: 15px;
}

.lucky-egg-reward-item:last-child {
  margin-right: 15px;
}

.lucky-egg-reward-caption {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: #fff;
  font-family: var(--font-rounded);
}

.lucky-egg-reward-caption--gold {
  color: #e5bd32;
}

.lucky-egg-reward-caption--lucky {
  color: #cc642d;
}

.lucky-egg-action {
  width: 100%;
  padding: 0px 20px;
}

.lucky-egg-button {
  gap: 12px;
  color: #1f1309;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffe84c 0%, #b26a01 100%);
  box-shadow:
    0 4px 0 #8f5101,
    0 12px 18px rgba(0, 0, 0, 0.35);
}

.lucky-egg-button:hover {
  background: linear-gradient(180deg, #ffe850 0%, #d6840a 100%);
  box-shadow:
    0 4px 0 #8f5101,
    0 14px 20px rgba(0, 0, 0, 0.45);
}

.lucky-egg-button:active {
  top: 4px;
  box-shadow:
    0 0 0 #8f5101,
    0 6px 12px rgba(0, 0, 0, 0.3);
}

.lucky-egg-button-icon {
  width: 20px;
  height: 25px;
  object-fit: contain;
}

.lucky-egg-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.lucky-egg-balance {
  display: flex;
  width: 100%;
  height: 30px;
  margin-bottom: -30px;
  padding: 15px;
}

.lucky-egg-balance-item {
  width: 100%;
  gap: 4px;
}

.lucky-egg-balance-item--gold {
  align-items: flex-start;
  text-align: left;
  float: left;
}

.lucky-egg-balance-item--fried {
  align-items: flex-end;
  text-align: right;
  float: right;
}

.lucky-egg-balance-value {
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: var(--font-rounded);
  text-transform: none;
  white-space: nowrap;
  background: linear-gradient(145deg, rgba(18, 18, 28, 0.92), rgba(12, 12, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55), inset 0 -2px 3px rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 8px 15px 8px 10px;
}

.lucky-egg-balance-value .balance-value,
#controlPanel .balance-value,
.user-balance-display .balance-value {
  font-family: var(--font-rounded);
  color: #fff;
  font-weight: 800;
}

.lucky-egg-balance-value .egg-icon {
  margin: 0px;
}

/* ==================== BOTTOM TAB BAR ==================== */
.menu-tab-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  margin-top: auto;
  display: flex;
  background: #241b31;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.menu-tab-bar .tab-item span {
    display: block;
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 auto;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 0px;
  background: transparent;
  border: none;
  color: var(--text-white-60);
  cursor: pointer;
  transition: all var(--transition-slow) ease;
  font-family: var(--font-rounded);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 800;
}

.tab-item i {
  font-size: 20px; /* Размер иконки */
  transition: all var(--transition-slow) ease;
  margin-bottom: 5px;
}

.tab-item span {
  margin: 0;
}

.menu-support-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-white-70);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
  text-transform: uppercase;
  font-family: var(--font-rounded);
  font-weight: 800;
  padding-bottom: 5px;
}

.menu-support-link:hover {
  opacity: 1;
  color: var(--text-white);
}

/* ==================== REFERRAL ==================== */
.referral-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-transform: uppercase;
  font-family: var(--font-rounded);
}

.referral-subtitle {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  text-align: center;
  margin-top: 20px;
}

.referral-sticker {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.referral-earned {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.referral-earned-block,
.referral-invited {
  display: flex;
  align-items: center;
  gap: 8px;
}

.referral-invited-label {
  font-size: 14px;
  font-weight: 800;
}

.referral-earned-value,
.referral-invited-value {
  color: #ffdd00;
}

.referral-collect-btn {
  width: 100%;
  border-radius: var(--border-radius-large);
  color: rgba(255, 255, 255, 0.9);
  padding: 15px;
  font-weight: 900;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.referral-collect-btn:disabled,
.referral-collect-btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.referral-collect-btn .egg-icon {
  margin: 0;
  width: 18px;
  height: 18px;
}

.referral-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.referral-action-btn {
  border-radius: var(--border-radius-large);
  font-weight: 800;
  font-size: 18px;
  padding: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.referral-action-btn--primary {
  background: var(--gradient-info);
  box-shadow: var(--shadow-raise-info);
  color: #fff;
}

.referral-action-btn--primary:hover {
  background: var(--gradient-info-hover);
}

.referral-action-btn--primary:active {
  background: var(--gradient-info);
  box-shadow:
    0 0 0 #135372,
    0 2px 5px rgba(0, 0, 0, 0.3);
  top: 4px;
}

.tab-item:hover i {
  transform: scale(1.1); /* Увеличение при hover */
}

.tab-item.active {
  color: var(--color-primary);
}

.tab-item.active i {
  color: var(--color-primary);
  transform: scale(1.05);
}

.tab-item:active {
  color: var(--color-primary);
  transform: scale(0.95);
}

.tab-item:active i {
  transform: scale(0.9);
}

/* ==================== EGG RAIN EFFECT ==================== */
#eggRainContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 900;
}

.egg-rain-drop {
  position: absolute;
  top: -120px;
  width: 48px;
  height: 64px;
  background: url("/assets/img/eggies.png") center/contain no-repeat;
  animation: eggRainFall linear forwards;
  opacity: 0.9;
  will-change: transform, opacity;
}

.egg-rain-drop--bonus {
  background: url("/assets/img/friedEggies.png") center/contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

@keyframes eggRainFall {
  0% {
    transform: translateY(-180px) rotate(-10deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(140vh) rotate(15deg);
    opacity: 0.85;
  }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes popupBounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes popupShrinkOut {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(0.9) rotate(-2deg);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.1) rotate(-10deg);
    opacity: 0;
  }
}

@keyframes winPopShake {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  25% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  45% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  65% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes winShrink {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

@keyframes winFade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes menuSlideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes menuSlideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes menuFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes luckyEggFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-28px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes luckyEggShake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-15px, -12px) rotate(-2deg);
  }
  50% {
    transform: translate(15px, 12px) rotate(2deg);
  }
  75% {
    transform: translate(-12px, 10px) rotate(-1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes luckyEggZoom {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  60% {
    transform: scale(0.5);
    opacity: 0.45;
  }
  100% {
    transform: scale(0.05);
    opacity: 0;
  }
}

@keyframes luckyRewardExit {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

@keyframes luckyEggReturn {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Mobile Layout */
@media (max-width: 960px) {
  #gameContainer {
    bottom: 260px;
  }

  #controlPanel {
    height: 220px;
  }

  #gameLogo {
    font-size: 18px;
  }

  #leftBalance,
  #rightBalance {
    font-size: 16px;
  }

  #leftSection,
  #centerSection,
  #rightSection {
    display: contents;
  }

  #difficultyButtons {
    display: none;
  }

  #rightSection {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }

  #playButton,
  #cashOutButton {
    flex: 1;
  }

  #playButton.game-started,
  #cashOutButton.game-started {
    height: 110px;
  }
}

/* Desktop Layout */
@media (min-width: 961px) {
  #gameContainer {
    top: 0;
    bottom: 125px;
  }

  .betButton {
    height: 50px;
  }

  #controlPanel {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    height: 95px;
    padding: 15px;
    gap: 15px;
  }

  #topInfoBar {
    width: 100%;
    order: -1;
    flex: 0 0 auto;
  }

  #leftSection {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #cashOutAmount {
    font-size: 15px;
  }

  #cashOutAmount .egg-icon {
    width: 15px;
    height: 15px;
  }

  #centerSection {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  #centerSection.game-started {
    width: 80% !important;
    max-width: 80% !important;
  }

  #rightSection {
    flex: 0 0 350px;
    display: flex;
    align-items: stretch;
    padding: 0;
    gap: 15px;
  }

  #difficultyButtons {
    display: flex;
    gap: 10px;
    flex: 1;
    width: auto;
  }

  #levelSelect {
    display: none;
  }

  #playButton,
  #cashOutButton {
    height: 50px !important;
  }

  

  #playButton {
    box-shadow:
      0 3px 0 #2d7a2f,
      0 6px 10px rgba(0, 0, 0, 0.3);
  }

  #playButton:hover {
    box-shadow:
      0 3px 0 #2d7a2f,
      0 8px 12px rgba(0, 0, 0, 0.4);
  }

  #playButton:active {
    transform: translateY(2px) scale(0.99);
    box-shadow:
      0 1px 0 #2d7a2f,
      0 2px 5px rgba(0, 0, 0, 0.3);
  }

  #cashOutButton {
    gap: 0px;
    font-size: 17px;
    box-shadow:
      0 3px 0 #4b579b,
      0 6px 10px rgba(0, 0, 0, 0.3);
  }

  #cashOutButton:hover {
    box-shadow:
      0 3px 0 #4b579b,
      0 8px 12px rgba(0, 0, 0, 0.4);
  }

  #cashOutButton:active {
    transform: translateY(2px) scale(0.99);
    box-shadow:
      0 1px 0 #4b579b,
      0 2px 5px rgba(0, 0, 0, 0.3);
  }
}

/* Small Screens */
@media (max-width: 480px) {
  #gameLogo {
    font-size: 16px;
  }

  #leftBalance,
  #rightBalance {
    font-size: 14px;
  }

  #topInfoBar {
    padding: 6px 3px;
  }

  #menuPanel {
    width: 100%;
    max-width: 100%;
  }

  .menu-header h2,
  #menuTitle {
    font-size: 19px;
  }

  .balance-item {
    font-size: 14px;
  }

  .menu-action-btn, .lucky-egg-btn {
    font-size: 16px;
    padding: 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .rating-position {
    font-size: 20px;
    min-width: 25px;
  }

  .rating-name {
    font-size: 16px;
  }

  .rating-score {
    font-size: 16px;
  }

  .user-rating-position {
    font-size: 36px;
  }

  .user-rating-score {
    font-size: 20px;
  }

  .shop-item {
    padding: 12px;
  }

  .shop-item-icon {
    width: 60px;
    height: 60px;
  }

  .shop-item-name {
    font-size: 18px;
  }

  .shop-item-description {
    font-size: 14px;
  }

  .shop-item-buy {
    font-size: 18px;
    gap: 6px;
  }

  .special-offer {
    flex-direction: column;
    text-align: center;
  }

  .lucky-egg-image {
    width: min(72vw, 234px);
  }

  .popup-title {
    font-size: 36px;
  }
}

/* ==================== TON CONNECT MODAL FIX ==================== */
#tc-widget-root,
div[class*="ton-connect"],
div[id*="tonconnect"] {
  z-index: 999999 !important;
}

#tc-widget-root > div:first-child {
  z-index: 999998 !important;
}

#tc-widget-root [role="dialog"],
#tc-widget-root [class*="modal"] {
  z-index: 999999 !important;
}

/* ==================== TELEGRAM FULLSCREEN STYLES ==================== */
body.tg-fullscreen #gameContainer {
  top: var(--tg-header-height);
}

body.tg-normal #gameContainer {
  top: 0;
}

.rating-avatar-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.rating-avatar-wrapper .rating-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.rating-avatar-wrapper .rating-avatar.placeholder {
  font-weight: 800;
  font-size: 18px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
}

/* ==================== INVENTORY ==================== */
.inventory-section {
  color: var(--text-white);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 0px;
}

.inventory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inventory-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.inventory-title {
  font-size: 18px;
  font-weight: 800;
}

.inventory-count-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

.inventory-count-value {
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  font-weight: 800;
}

.inventory-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: linear-gradient(145deg, rgba(18, 18, 28, 0.92), rgba(12, 12, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55), inset 0 -2px 3px rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  flex-shrink: 0;
}

.inventory-tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, font-size 0.2s ease;
  font-family: inherit;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inventory-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.inventory-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.inventory-tab-count {
  display: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(44 44 54);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.inventory-loader {
  width: 100%;
  min-height: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.inventory-empty {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
}

.inventory-empty__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.inventory-empty__text a {
  color: #ffffff;
  text-decoration: none;
}

.inventory-empty__cta {
  display: block;
  margin: 10px auto 0px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gradient-lucky);
  box-shadow:
    0 4px 0 #4c0ea0,
    0 4px 0px rgba(121, 32, 232, 0.45);
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
  text-align: center;
  width: max-content;
  gap: 3px;
  position: relative;
}

.inventory-empty__cta:hover {
  background: linear-gradient(180deg, #f071ff 0%, #8d35f0 100%);
  box-shadow:
    0 4px 0 #4c0ea0,
    0 4px 0px rgba(121, 32, 232, 0.45);
}

.inventory-empty__cta:active {
  top: 4px;
  box-shadow:
    0 0 0 #4c0ea0,
    0 3px 8px rgba(0, 0, 0, 0.35);
}
.inventory-error {
  color: #ff7b7b;
  font-size: 14px;
  display: none;
}

.inventory-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inventory-item.is-selected {
  border-color: #5eab1a;
  box-shadow: 0 0 16px rgba(94, 171, 26, 0.35);
  background: rgb(63, 68, 58);
}

.inventory-item__thumb {
  width: 100%;
  padding-top: 100%;
  position: relative;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.inventory-thumb-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.inventory-item__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px 15px 0 0;
  object-fit: cover;
}

.inventory-item__title {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0px 10px;
}

.inventory-item__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 10px 12px 10px;
  margin-top: auto;
}

.inventory-item__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 800;
}

.inventory-item__price--disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
  text-align: center;
  color: gray;
  text-transform: uppercase;
  font-size: 11px;
  width: 100%;
}

.inventory-fee-note {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  width: 100%;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
  grid-column: 1 / -1;
  align-self: center;
}

.inventory-item__price .egg-icon {
  width: 17px;
  height: 17px;
  margin: 0;
}

.inventory-item__action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-top: 5px;
}

.inventory-item__action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.inventory-item__action i {
  pointer-events: none;
}

.inventory-item--pending .inventory-item__meta {
  justify-content: center;
}

.inventory-item--pending .inventory-item__price {
  display: none;
}

.inventory-item--pending .inventory-item__action {
  margin: 0 auto;
}

.inventory-item.is-removing {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.inventory-load-more {
  margin-top: 8px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.inventory-load-more:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.inventory-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inventory-selected-actions {
  position: sticky;
  bottom: 15px;
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-direction: row;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    padding 0.2s ease,
    margin 0.2s ease,
    max-height 0.25s ease;
  z-index: 10;
  border-radius: 15px;
  pointer-events: none;
  visibility: hidden;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  margin-bottom: -15px;
  animation: inventoryActionsSlideDown 0.3s ease-in forwards;
}

.inventory-selected-actions.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  padding: 16px;
  margin-top: 18px;
  background: rgba(19, 22, 36, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 160px;
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  grid-template-rows: auto auto;
  gap: 12px;
  animation: inventoryActionsSlideUp 0.35s ease-out;
}

.inventory-selected-actions .egg-icon {
  width: 17px;
  height: 17px;
  margin: 0px;
}

.inventory-action-btn {
  flex: 1 1 35%;
  justify-content: center;
  gap: 6px;
  margin-bottom: 0px;
  font-size: 14px;
  min-height: 48px;
  transition: transform 0.2s ease;
}

.inventory-action-btn--sell {
  flex: 1 1 65%;
  background: var(--gradient-info);
  box-shadow: var(--shadow-raise-info);
  color: #fff;
  position: relative;
  top: 0;
}

.inventory-action-btn--sell:hover {
  background: var(--gradient-info-hover);
  box-shadow:
    0 4px 0 #135372,
    0 6px 10px rgba(0, 0, 0, 0.3);
}

.inventory-action-btn--sell:active {
  top: 4px;
  box-shadow:
    0 0 0 #135372,
    0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes inventoryActionsSlideUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes inventoryActionsSlideDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(20px);
    opacity: 0;
  }
}

.menu-action-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 15px;
  width: 100%;
}

.inventory-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inventory-action-sell-value {
  font-weight: 800;
}

.inventory-action-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.inventory-action-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== SWEETALERT INVENTORY ==================== */
.swal2-inventory-modal {
  background: rgba(0, 0, 0, 0);
  border-radius: 15px;
  padding: 25px 10px;
  color: #fff;
  font-family: 'M PLUS Rounded 1c', 'Montserrat', Arial, sans-serif;
}

.swal2-inventory-title {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  padding: 0px;
  padding-top: 20px;
}

.swal2-inventory-text {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.76);
  text-transform: uppercase;
  width: 100%;
  box-sizing: border-box;
}

.swal2-inventory-confirm,
.swal2-inventory-cancel {
  font-family: 'M PLUS Rounded 1c', 'Montserrat', Arial, sans-serif !important;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  padding: 14px 22px;
  border-radius: 15px;
  margin: 0 6px;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.swal2-inventory-confirm {
  background: linear-gradient(135deg, #f2c425, #ffdd55);
  color: #111;
  box-shadow: 0 10px 25px rgba(242, 196, 37, 0.35);
}

.swal2-inventory-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(242, 196, 37, 0.45);
}

.swal2-inventory-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.swal2-inventory-cancel:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.swal2-inventory-html {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.swal2-inventory-sticker {
  width: 130px;
  height: 130px;
  margin: 0 auto 10px;
}

.swal2-inventory-sticker tgs-sticker {
  width: 130px;
  height: 130px;
  display: block;
}

.swal2-container {
  background: rgba(3, 6, 12, 0.75) !important;
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.35s ease, background 0.35s ease;
}

.swal2-container.swal2-backdrop-show {
  opacity: 1;
}

.swal2-container.swal2-backdrop-hide {
  opacity: 0;
}
.game-history-legit-btn.is-verified {
  background: rgba(125, 255, 149, 0.2);
  border-color: rgba(125, 255, 149, 0.7);
  color: #7dff95;
}

.partner-entry {
  margin-top: 10px;
}

.partner-program-btn {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--font-rounded);
  text-transform: uppercase;
}

.partner-program-btn__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.partner-program-btn__title {
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.02em;
}

.partner-program-btn__pill {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: var(--border-radius-large);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.1em;
}

.partner-program-btn__meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white-70);
  text-transform: none;
  letter-spacing: 0.02em;
}

.tab-content--partner {
  color: #fff;
  font-family: var(--font-rounded);
}

.tab-content--partner .egg-icon {
  width: 23px;
  height: 23px;
}

.partner-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-xxl);
  padding: 16px;
  box-shadow: var(--shadow-medium);
  text-align: center;
}

.partner-card--hero {
  background: linear-gradient(135deg, rgba(244, 240, 131, 0.2) 0%, rgba(213, 131, 0, 0.18) 45%, rgba(40, 84, 27, 0.2) 100%);
  border-color: rgba(255, 221, 0, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.partner-card--accent {
  background: linear-gradient(180deg, rgba(113, 199, 32, 0.15) 0%, rgba(76, 143, 21, 0.18) 100%);
  border-color: rgba(113, 199, 32, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.partner-card--accent .partner-card__value {
  justify-content: center;
}

.partner-hero__meta {
  font-size: 13px;
  color: var(--text-white-70);
  text-transform: none;
  letter-spacing: 0.04em;
}

.partner-hero__title {
  font-size: 22px;
  margin: 4px 0 6px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

.partner-hero__desc {
  margin: 0;
  color: var(--text-white-80);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0.01em;
}

.partner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.partner-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.partner-chip--accent {
  background: rgba(113, 199, 32, 0.25);
  border-color: rgba(113, 199, 32, 0.6);
  color: #c5ff8a;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.partner-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.partner-card__label {
  font-size: 13px;
  color: var(--text-white-70);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.partner-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.partner-card__value {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.partner-card__note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-white-70);
  text-transform: none;
  line-height: 1.4;
}

.partner-progress {
  margin-top: 12px;
}

.partner-progress__bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.partner-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient-gold);
  transition: width 0.3s ease;
}

.partner-progress__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-white-70);
  text-transform: none;
}

.partner-total {
  background: linear-gradient(180deg, rgba(31, 28, 47, 0.9) 0%, rgba(36, 27, 49, 0.95) 100%);
  border-radius: var(--border-radius-xxl);
  border: 1px solid rgba(255, 221, 0, 0.2);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.partner-total__label {
  font-size: 13px;
  color: var(--text-white-70);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.partner-total__value {
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  justify-content: center;
}

.partner-total__note {
  font-size: 13px;
  color: var(--text-white-70);
  text-transform: none;
  line-height: 1.4;
  margin-top: 8px;
}

.partner-claim-btn {
  width: 100%;
  margin-top: 8px;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.partner-link-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.partner-link-form.is-open {
  max-height: 60px;
  opacity: 1;
  margin-bottom: 22px;
}

.partner-link-input {
  flex: 1 1 80%;
  max-width: 80%;
  padding: 20px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.partner-link-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.partner-link-btn {
  width: 52px;
  height: 57px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}

.partner-link-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  opacity: 0.92;
  border-color: rgba(255, 255, 255, 0.2);
}

.partner-link-btn:active {
  transform: translateY(0);
  filter: brightness(0.95);
  opacity: 0.85;
}

.partner-link-btn--save {
  background: #16a34a;
  border-color: rgba(22, 163, 74, 0.6);
}

.partner-link-btn--cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.partner-link-default {
  margin-bottom: 12px;
}

.partner-link-default .history-amount-chip--positive {
  min-width: 65px;
  justify-content: center;
}

.partner-link-default .history-item-title-text {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.partner-link-short {
  font-size: 12px;
  color: #cbd5e1;
}

.partner-link-btn .shop-ton-spinner,
.swal2-inventory-confirm .shop-ton-spinner {
  width: 20px !important;
  height: 20px !important;
  border-width: 3px;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

.partner-link-delete-modal {
  background: rgba(12, 12, 18, 0.9) !important;
  box-shadow: none !important;
  backdrop-filter: blur(6px);
}

.partner-links-loader {
  margin-top: -50px;
  justify-content: center;
}

.partner-tab-switch {
  margin: 20px 12px;
  margin-bottom: 0px;
}

.partner-link-create-btn {
  margin-bottom: 22px;
}

/* Demo Toggle */
.demo-toggle-btn.game-started {
  display: none;
}

.demo-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  height: 50px;
  min-height: 50px;
  padding: 0 12px;
  border-radius: 14px;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--text-white-80);
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-slow) ease;
}

.demo-toggle-label {
  font-size: 12px;
  line-height: 1.1;
  color: var(--text-white-70);
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-toggle-btn:hover {
  color: var(--text-white);
  background: none;
  border: none;
}

.demo-toggle-btn:active {
  transform: translateY(1px);
}

.demo-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-normal) ease;
}

.demo-toggle-handle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #34293d 0%, #1f1527 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.06);
  transition: all var(--transition-normal) ease;
}

.demo-toggle-btn.is-active {
  background: none;
  color: var(--text-white);
  border: none;
  box-shadow: none;
}

.demo-toggle-btn.is-active .demo-toggle-label {
  color: var(--text-white);
}

.demo-toggle-btn.is-active .demo-toggle-track {
  background: var(--gradient-lucky);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(121, 32, 232, 0.25);
}

.demo-toggle-btn.is-active .demo-toggle-handle {
  transform: translateX(20px);
  background: linear-gradient(180deg, #f071ff 0%, #8d35f0 100%);
  box-shadow:
    0 0 0 2px rgba(121, 32, 232, 0.45),
    0 6px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.12);
}

@media (max-width: 480px) {
  .demo-toggle-btn {
    padding: 0 10px;
    font-size: 13px;
    gap: 6px;
  }

  .demo-toggle-track {
    width: 40px;
    height: 22px;
  }

  .demo-toggle-handle {
    width: 18px;
    height: 18px;
  }

  .demo-toggle-btn.is-active .demo-toggle-handle {
    transform: translateX(18px);
  }

  .demo-toggle-label {
    font-size: 11px;
  }
}
:root {
  --lvl-1: #7dd3fc;
  --lvl-2: #8be28a;
  --lvl-3: #f7d046;
  --lvl-4: #f39b4c;
  --lvl-5: #f26a9a;
}
.partner-level-value.partner-level--1 { color: var(--lvl-1); }
.partner-level-value.partner-level--2 { color: var(--lvl-2); }
.partner-level-value.partner-level--3 { color: var(--lvl-3); }
.partner-level-value.partner-level--4 { color: var(--lvl-4); }
.partner-level-value.partner-level--5 { color: var(--lvl-5); }
.partner-level-note {
  margin-top: 8px;
  font-size: 15px;
  color: #cbd5e1;
  opacity: 0.9;
  text-align: center;
  padding-top: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.fortune-button {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 100;
  opacity: 1;
  visibility: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  touch-action: manipulation;
  border-radius: 100px;
}

.fortune-button:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}

.fortune-button:active {
  transform: translateY(0);
}

.fortune-button__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: fortune-spin 12s linear infinite;
  pointer-events: none;
  filter: none;
}

.fortune-button.fortune-available {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(168, 85, 247, 0.6);
}

.fortune-button.fortune-available::after {
  content: none;
}

@keyframes fortune-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes fortune-available-pulse {
  0% {
    transform: scale(1);
    opacity: 0.35;
  }

  50% {
    transform: scale(1.07);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.02);
    opacity: 0.5;
  }
}

@keyframes fortune-glow {}

@keyframes fortune-title-glow {
  0% {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.9), 0 0 20px rgba(168, 85, 247, 0.65);
    color: #f8fafc;
  }

  50% {
    text-shadow: 0 0 14px rgba(250, 204, 21, 0.95), 0 0 28px rgba(251, 191, 36, 0.8);
    color: #fff8e1;
  }

  100% {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.9), 0 0 20px rgba(168, 85, 247, 0.65);
    color: #f8fafc;
  }
}

.fortune-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, backdrop-filter 0.25s ease;
}

.fortune-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fortune-modal {
  position: relative;
  width: min(720px, 96vw);
  max-width: 900px;
  background: transparent;
  border: none;
  border-radius: 28px;
  padding: 0;
  color: #e2e8f0;
  overflow: visible;
  transform: scale(0.1);
  opacity: 0;
  transform-origin: center;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.fortune-overlay.is-visible .fortune-modal {
  transform: scale(1);
  opacity: 1;
}

.fortune-modal__close {
  position: fixed;
  top: 8px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 3000;
}

.fortune-modal__close:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.fortune-modal__close:active {
  transform: translateY(0);
}

.fortune-modal__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.4px;
  margin: 0 0 0 0;
  color: #f8fafc;
  text-transform: uppercase;
  text-align: center;
  padding-bottom: 20px;
  text-shadow: none;
}

.fortune-modal__subtitle {
  margin: -12px 0 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #f8fafc;
  font-weight: 800;
  text-align: center;
  opacity: 1;
  min-height: 18px;
  text-transform: uppercase;
  text-shadow: none;
}

.fortune-modal__subtitle.is-bonus {
  text-shadow:
    0 0 12px rgba(74, 222, 128, 0.9),
    0 0 20px rgba(34, 197, 94, 0.8);
  animation: fortune-bonus-glow 1.8s ease-in-out infinite;
}

@keyframes fortune-bonus-glow {
  0% {
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5), 0 0 16px rgba(34, 197, 94, 0.45);
  }

  50% {
    text-shadow: 0 0 20px rgba(74, 222, 128, 1), 0 0 28px rgba(34, 197, 94, 0.9);
  }

  100% {
    text-shadow: 0 0 12px rgba(74, 222, 128, 0.6), 0 0 20px rgba(34, 197, 94, 0.5);
  }
}

.fortune-wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin: 12px auto 20px;
}

.fortune-wheel {
  position: relative;
  width: min(420px, 90vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform-origin: center;
  background: conic-gradient(from -90deg,
      #4ade80 0deg 36deg,
      #22c55e 36deg 72deg,
      #34d399 72deg 108deg,
      #10b981 108deg 144deg,
      #14b8a6 144deg 180deg,
      #0ea5e9 180deg 216deg,
      #6366f1 216deg 252deg,
      #a855f7 252deg 288deg,
      #ec4899 288deg 324deg,
      #f97316 324deg 360deg);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.55),
    inset 0 0 0 10px rgba(255, 255, 255, 0.04),
    inset 0 0 0 2px rgba(15, 23, 42, 0.6);
  overflow: visible;
}

@keyframes fortune-wheel-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.fortune-wheel__center {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), rgba(15, 23, 42, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 25px rgba(0, 0, 0, 0.45);
}

.fortune-wheel__hub {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow:
    0 12px 24px rgba(124, 58, 237, 0.45),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.fortune-wheel__logo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 5;
  transform-origin: center;
}

.fortune-wheel__logo img {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

@keyframes fortune-wheel-idle {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.fortune-wheel__pointer {
  position: absolute;
  top: auto;
  bottom: -10px;
  left: 50%;
  width: 16px;
  height: 36px;
  transform: translateX(-50%) rotate(0deg);
  background: linear-gradient(180deg, #fef3c7, #fbbf24);
  /* Остриё смотрит вверх, основание внизу */
  clip-path: polygon(50% 0%, 100% 100%, 50% 78%, 0% 100%);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

#eggRainContainer {
  z-index: 9998 !important;
}

.fortune-wheel__items {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fortune-wheel__item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  width: clamp(60px, 16vw, 100px);
  text-align: center;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.3s ease;
}

.fortune-wheel__item span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
}

.fortune-overlay.is-visible .fortune-wheel__item {
  opacity: 1;
}

.fortune-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  gap: 12px;
}

.fortune-spin-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: center;
}

.fortune-spin-balance__value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.fortune-spin-balance__label {
  color: inherit;
  font-weight: inherit;
  text-shadow: none;
}

.fortune-spin-balance__number {
  color: #fff;
  display: inline-block;
  text-shadow:
    0 0 12px rgba(139, 92, 246, 0.9),
    0 0 22px rgba(168, 85, 247, 0.8);
  animation: fortune-title-glow 1.8s ease-in-out infinite;
}

.fortune-spin-button {
  width: 100%;
  max-width: 250px;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fortune-spin-button__icon {
  width: 16px;
  height: 16px;
}

.fortune-spin-button__spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 25px;
  width: 25px;
}