/* ==========================================================================
   ТЕМА «DEEP SEA» — оформление по референсу.
   Подключается последним и перекрывает основной бандл по переменным,
   поэтому работает на любой странице, не трогая код приложения.

   Палитра:
     фон          #0E0F20  (тёмно-синий, не чёрный)
     карточки     #14162E / #1A1D38
     акцент       #2DE2E6  (бирюзовый)
     активный     #163A40  (тёмно-бирюзовый)
     золото       #F5C518  (цены, награды)
   Скругления крупные и мягкие, как в референсе.
   ========================================================================== */

:root,
[data-theme="light"],
[data-theme="dark"] {
  --color-bg: #0e0f20;
  --color-surface: #14162e;
  --color-surface-elevated: #1a1d38;
  --color-surface-secondary: #1c1f3d;
  --color-bg-rgb: 14, 15, 32;

  --color-text: #ffffff;
  --color-text-secondary: #9b9db8;
  --color-text-tertiary: #6c6e8a;
  --color-text-inverse: #0e0f20;
  --color-text-rgb: 255, 255, 255;

  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(45, 226, 230, 0.38);
  --color-divider: rgba(255, 255, 255, 0.06);
  --border-gradient-light-start: #1a1d38;
  --border-gradient-light-end: #14162e;
  --border-gradient-dark-start: #1a1d38;
  --border-gradient-dark-end: #14162e;

  --color-accent: #2de2e6;
  --color-accent-soft: rgba(45, 226, 230, 0.14);
  --color-accent-text: #2de2e6;
  --color-accent-rgb: 45, 226, 230;
  --color-info: #2de2e6;
  --color-info-soft: rgba(45, 226, 230, 0.14);
  --color-success: #35d07f;
  --color-success-soft: rgba(53, 208, 127, 0.14);
  --color-warning: #f5c518;
  --color-warning-soft: rgba(245, 197, 24, 0.14);
  --color-error: #ff5470;
  --color-error-soft: rgba(255, 84, 112, 0.14);
  --color-overlay: rgba(6, 7, 18, 0.8);

  --color-selected-border: #2de2e6;
  --color-selected-bg: rgba(45, 226, 230, 0.1);
  --color-selected-border-light: #2de2e6;
  --color-selected-bg-light: rgba(45, 226, 230, 0.1);
  --color-selected-border-dark: #2de2e6;
  --color-selected-bg-dark: rgba(45, 226, 230, 0.1);

  --color-nav-bg: rgba(20, 22, 46, 0.94);
  --color-nav-active: #2de2e6;
  --color-nav-inactive: #6c6e8a;

  --color-button-primary-bg: var(--gradient-button);
  --color-button-primary-text: #0e0f20;
  --color-button-secondary-bg: #1c1f3d;
  --color-button-secondary-text: #ffffff;
  --color-button-tg: #2de2e6;
  --color-price-bg: rgba(245, 197, 24, 0.12);
  --color-price-text: #f5c518;

  --gradient-button: linear-gradient(180deg, #38e8ec 0%, #1fd0d6 100%);
  --gradient-button-hover: linear-gradient(180deg, #4af2f6 0%, #29dce2 100%);
  --gradient-selected: linear-gradient(180deg, #1a3f45 0%, #163038 100%);
  --gradient-accent-light: linear-gradient(180deg, #38e8ec 0%, #1fd0d6 100%);
  --gradient-accent-dark: linear-gradient(180deg, #38e8ec 0%, #1fd0d6 100%);
  --gradient-accent-hover-light: linear-gradient(180deg, #4af2f6 0%, #29dce2 100%);
  --gradient-accent-hover-dark: linear-gradient(180deg, #4af2f6 0%, #29dce2 100%);
  --gradient-ribbon-light: linear-gradient(180deg, #f5c518 0%, #e0a800 100%);
  --gradient-ribbon-dark: linear-gradient(180deg, #f5c518 0%, #e0a800 100%);
  --gradient-success-light: linear-gradient(180deg, #35d07f 0%, #22b364 100%);
  --gradient-success-dark: linear-gradient(180deg, #35d07f 0%, #22b364 100%);

  --tier-1-gradient: linear-gradient(180deg, #38e8ec 0%, #1fd0d6 100%);
  --tier-2-gradient: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  --tier-3-gradient: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
  --tier-4-gradient: linear-gradient(180deg, #c084fc 0%, #a855f7 100%);
  --tier-5-gradient: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  --tier-legendary-gradient: linear-gradient(180deg, #fde047 0%, #f5c518 100%);
  --crystals-gradient: linear-gradient(180deg, #fde047 0%, #f5c518 100%);

  --radius-xs: 8px;
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-full: 100px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --stack-gap: 10px;
  --tabbar-gap: 10px;
  --page-padding-x: 16px;
  --page-padding-top: 12px;
  --bottom-nav-clearance: 200px;

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;
  --text-4xl: 32px;
  --leading-tight: 1.25;
  --leading-normal: 1.45;

  --shadow-sm-light: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md-light: 0 8px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg-light: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-nav-light: 0 -6px 28px rgba(0, 0, 0, 0.45);
  --shadow-sm-dark: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md-dark: 0 8px 26px rgba(0, 0, 0, 0.45);
  --shadow-lg-dark: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-nav-dark: 0 -6px 28px rgba(0, 0, 0, 0.45);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html,
body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

body {
  background-image: radial-gradient(700px 420px at 50% -10%, rgba(45, 226, 230, 0.09), transparent 65%);
  background-attachment: fixed;
}

/* --------------------------------------------------------------------------
   Карточки
   -------------------------------------------------------------------------- */
.gift-item,
.task-card,
.mission-card,
.prize-card,
.prize-mini-card,
.referral-invite-card,
.settings-lang-card,
.lb-card,
.profile-card,
.tournament-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sm-light);
}

/* --------------------------------------------------------------------------
   Главная кнопка: сплошная бирюзовая, тёмный текст
   -------------------------------------------------------------------------- */
.action-button,
.topup-action-button,
.spin-button,
.task-button,
.first-login-bonus-button,
.win-action-btn,
.win-action-btn--risk {
  background: var(--gradient-button) !important;
  color: var(--color-button-primary-text);
  border: 0;
  border-radius: var(--radius-m);
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(45, 226, 230, 0.28);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.action-button:active,
.spin-button:active,
.task-button:active {
  transform: translateY(1px);
  filter: brightness(1.06);
}

.action-button:disabled,
.task-button:disabled,
.spin-button:disabled {
  background: #1c1f3d !important;
  color: var(--color-text-tertiary);
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Нижняя навигация: пилюля, иконка над подписью, активный — бирюзовый
   -------------------------------------------------------------------------- */
.bottom-nav {
  left: 12px !important;
  right: 12px !important;
  transform: none;
  width: auto;
  max-width: none;
  margin: 0;
  bottom: 12px;
  padding: 8px;
  gap: 0;
  border-radius: var(--radius-2xl);
  background: var(--color-nav-bg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-nav-light);
}

.bottom-nav .nav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 2px;
  border-radius: var(--radius-l);
  transition: background-color var(--transition-normal);
}

.bottom-nav .nav-item .nav-icon-svg,
.bottom-nav .nav-item .nav-icon {
  width: 22px;
  height: 22px;
  color: var(--color-nav-inactive);
}

.bottom-nav .nav-item .nav-text {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--color-nav-inactive);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav .nav-item.active {
  background: var(--gradient-selected);
}

.bottom-nav .nav-item.active .nav-icon-svg,
.bottom-nav .nav-item.active .nav-icon,
.bottom-nav .nav-item.active .nav-text {
  color: var(--color-nav-active);
}

.bottom-nav .nav-item[data-path="/play"] { order: 1; }
.bottom-nav .nav-item[data-path="/tasks"] { order: 2; }
.bottom-nav .nav-item[data-path="/profile"] { order: 3; }
.bottom-nav .nav-item[data-path="/leaderboard"] { order: 4; }
.bottom-nav .nav-item[data-path="/events"] { order: 5; }

.nav-avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--color-accent);
}

.bottom-nav .nav-badge {
  background: #2de2e6;
  color: #0e0f20;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Сегменты и вкладки
   -------------------------------------------------------------------------- */
.tournament-tabs,
.lb-tabs,
.tournament-tabs.lb-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-2xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 100%;
}

.tournament-tabs .text-tab,
.text-tab,
.profile-tabs .tab,
.lb-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 11px 8px;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: var(--text-md);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.tournament-tabs .text-tab.active,
.text-tab.active,
.profile-tabs .tab.active,
.lb-tab-active {
  background: var(--gradient-selected);
  color: var(--color-accent);
}

/* Переключатель DEMO */
.slider { background: #2a2d4d; }
input:checked + .slider { background: var(--color-accent); }

/* --------------------------------------------------------------------------
   Модальные окна и поля
   -------------------------------------------------------------------------- */
.modal-content,
.topup-modal,
.share-modal,
.task-complete-modal,
.language-confirm-modal,
.bot-blocked-modal,
.user-settings-modal,
.win-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg-light);
}

.modal-close-button,
.close-button,
.language-confirm-close-button,
.bot-blocked-close-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
}

.win-modal .heading-card,
.win-modal h2 {
  font-weight: 800;
  color: #f5c518;
}

.input,
.text-input,
input[type="text"],
input[type="number"] {
  background: #101228;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  color: var(--color-text);
}

.input:focus,
input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(45, 226, 230, 0.15);
  outline: none;
}

.lottery-item-price,
.balance-display,
.gift-price,
.gift-price-value {
  background: var(--color-price-bg);
  color: var(--color-price-text);
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Раскладка страницы игры
   -------------------------------------------------------------------------- */
.spa-play .play-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-2);
  width: 100%;
}

.spa-play .topbar-pill--balance.balance-display {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  padding: 0 var(--space-4);
  font-size: var(--text-lg);
  font-weight: 700;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.spa-play .topbar-pill--balance:not(.balance-display) {
  order: 2;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 var(--space-4);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.spa-play .topbar-pill--live {
  order: 3;
  flex: 1 0 100%;
  margin-top: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px var(--space-3);
}

/* Ставки: семь уровней в телефон не помещаются — горизонтальная лента. */
.spa-play .bet-options-container {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: var(--space-2);
  padding: 0 0 2px;
}

.spa-play .bet-options-container::-webkit-scrollbar { display: none; }

.spa-play .bet-options {
  display: flex !important;
  flex-wrap: nowrap;
  gap: var(--space-2);
  width: max-content;
  min-width: 100%;
  transform: none !important;
}

.spa-play .bet-option {
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  height: 62px;
  min-height: 62px;
  padding: 6px 52px 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  text-align: left;
  position: relative;
  overflow: visible;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.spa-play .bet-option > * { max-width: none; overflow: visible; }

.spa-play .bet-card-name,
.spa-play .free-bet-name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  line-height: 1.1;
  margin-bottom: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spa-play .bet-card-price {
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  color: var(--color-accent);
}

.spa-play .bet-card-thumb {
  position: absolute;
  right: 4px;
  top: 50%;
  margin-top: -23px;
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: none;
  pointer-events: none;
}

.spa-play .bet-option.selected {
  border-color: var(--color-accent);
  background: linear-gradient(180deg, rgba(45, 226, 230, 0.12), rgba(45, 226, 230, 0.03));
  box-shadow: 0 0 0 1px rgba(45, 226, 230, 0.35);
}

/* «Вы можете выиграть» — сетка одинаковых карточек */
.spa-play .chances-section .gifts-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: var(--space-2);
  width: 100%;
  overflow: visible !important;
  padding-bottom: 0;
  justify-content: stretch;
}

.spa-play .chances-section .gifts-container > * {
  flex: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto;
  align-self: start;
}

.spa-play .chances-section .gifts-container .gift-item {
  width: 100% !important;
  min-width: 0 !important;
  height: auto;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: #101228;
  border: 1px solid var(--color-border);
}

.spa-play .chances-section .gifts-container .gift-item .gift-thumbnail {
  width: 100%;
  height: 76px;
  object-fit: contain;
  display: block;
}

.spa-play .chances-section .heading-section {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.spa-play .info-section {
  position: relative;
  width: 100%;
  min-height: 0;
  margin-top: var(--space-2);
}

.spa-play .info-section .spin-button {
  position: static;
  width: calc(100% - 78px);
  max-width: none;
  margin: 0;
  min-height: 58px;
  font-size: var(--text-md);
  font-weight: 700;
  border-radius: var(--radius-m);
  box-shadow: 0 8px 26px rgba(45, 226, 230, 0.26);
}

.spa-play .info-section .button-flip-container {
  position: absolute;
  right: 0;
  top: 0;
  width: 70px;
  height: 58px;
  margin: 0;
  perspective: 1000px;
}

/* --------------------------------------------------------------------------
   Экран кейсов
   -------------------------------------------------------------------------- */
.scratch-sheet,
.sctp-sheet,
.sctp-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lg-light);
}

.scratch-title,
.scratch-title-brand,
.sctp-title {
  font-weight: 800 !important;
  color: var(--color-text) !important;
}

.sctp-cell,
.sct-cell {
  border-radius: var(--radius-s);
  border: 1px solid var(--color-border);
  background: #101228;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.sctp-cell.scratched,
.sct-cell.scratched,
.sctp-cell--won,
.sct-cell--won {
  border-color: var(--color-accent);
  background: rgba(45, 226, 230, 0.12);
  box-shadow: 0 0 0 1px rgba(45, 226, 230, 0.5), 0 0 22px rgba(45, 226, 230, 0.35);
  animation: gg-win-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gg-win-pop {
  0% { transform: scale(0.84); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.scratch-prize,
.scratch-prize-value,
.sctp-prize {
  font-weight: 800 !important;
  color: #f5c518 !important;
}

.scratch-cta,
.sctp-cta {
  background: var(--gradient-button) !important;
  color: var(--color-button-primary-text) !important;
  border-radius: var(--radius-m) !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 26px rgba(45, 226, 230, 0.32) !important;
}

/* --------------------------------------------------------------------------
   Задания
   -------------------------------------------------------------------------- */
.spa-tasks .tasks-header {
  font-weight: 800;
  color: var(--color-text);
}

.spa-tasks .tasks-filter-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: 4px;
}

.spa-tasks .tasks-filter-item {
  border-radius: var(--radius-full);
  color: var(--color-text-tertiary);
  font-weight: 600;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.spa-tasks .tasks-filter-item.active {
  background: var(--gradient-selected);
  color: var(--color-accent);
}

.spa-tasks .task-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
}

.spa-tasks .task-card.done,
.spa-tasks .task-card.completed { opacity: 0.5; }

.spa-tasks .task-reward {
  background: var(--color-price-bg);
  color: var(--color-price-text);
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Профиль
   -------------------------------------------------------------------------- */
.spa-profile .profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
}

.spa-profile .progress-ring-bg { stroke: rgba(255, 255, 255, 0.08); }
.spa-profile .progress-ring-fill { stroke: var(--color-accent); }

.spa-profile .stat-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-2);
  text-align: center;
}

.spa-profile .stat-value {
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-text);
}

.spa-profile .stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

.spa-profile .profile-tab,
.spa-profile .text-tab {
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 11px 8px;
}

.spa-profile .profile-tab.active,
.spa-profile .text-tab.active {
  background: var(--gradient-selected);
  color: var(--color-accent);
}

.spa-profile .settings-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
}

.settings-lang-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-s) !important;
}

.settings-lang-card.active { border-color: var(--color-accent) !important; }

/* --------------------------------------------------------------------------
   Таблица лидеров
   -------------------------------------------------------------------------- */
.lb-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-text);
  text-align: center;
}

.lb-subtitle {
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--space-4);
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
}

.lb-card {
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
}

.lb-rank {
  flex: 0 0 30px;
  text-align: center;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.lb-rank-top { font-size: 20px; }

.lb-avatar {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #101228;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-avatar-letter { display: none; font-weight: 700; color: var(--color-text-secondary); }
.lb-avatar-empty .lb-avatar-img { display: none; }
.lb-avatar-empty .lb-avatar-letter { display: block; }

.lb-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-you {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #0e0f20;
  font-size: 10px;
  font-weight: 700;
}

.lb-score { flex: 0 0 auto; font-weight: 700; color: var(--color-price-text); }

.lb-item.lb-head {
  min-height: 34px;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* --------------------------------------------------------------------------
   Панель мотивации (dist/js/psych.js)
   -------------------------------------------------------------------------- */
.ggp {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-l);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.ggp-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.ggp-goal { font-size: var(--text-sm); font-weight: 700; color: var(--color-accent); }
.ggp-goal.is-ready { color: var(--color-success); }

.ggp-bar {
  margin-top: var(--space-2);
  height: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.ggp-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--gradient-button);
  transition: width var(--transition-slow);
}

.ggp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }

.ggp-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: #101228;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.ggp-streak { border-color: rgba(245, 197, 24, 0.4); color: var(--color-warning); }
.ggp-best { border-color: rgba(45, 226, 230, 0.4); color: var(--color-accent); }

/* --------------------------------------------------------------------------
   Прочее
   -------------------------------------------------------------------------- */
.empty-title { color: var(--color-text-secondary); font-weight: 600; }
.empty-text { color: var(--color-text-tertiary); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: rgba(45, 226, 230, 0.4); }

.live-winning-item {
  background: rgba(53, 208, 127, 0.1);
  border: 1px solid rgba(53, 208, 127, 0.25);
  border-radius: var(--radius-s);
}

.win-modal .won-gift { filter: drop-shadow(0 6px 26px rgba(245, 197, 24, 0.35)); }

/* Джинн из оригинального GiftGo не используется. */
.genie-cell-base,
.genie-cell-frame,
.genie-cell-foil,
.genie-page-bg-extended,
.genie-bonus-bg {
  display: none !important;
}
/* ==========================================================================
   17. ШАПКА ИГРЫ — переделана целиком.
   Тикеты и «живая» лента убраны. Элементы НЕ удаляются из DOM, а скрываются:
   JS продолжает писать в них (liveWinsRoll, ticketsValue) и не падает.
   ========================================================================== */

.spa-play #ticketsDisplay,
.spa-play #liveWinsPill {
  display: none !important;
}

.spa-play .play-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  width: 100%;
}

/* Кошелёк с балансом: круглая кнопка пополнения, подпись, крупная сумма. */
.spa-play #balanceDisplay {
  order: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  height: auto;
  min-height: 68px;
  padding: 12px var(--space-4);
  font-size: inherit;
  background: linear-gradient(135deg, #1a1d38 0%, #14162e 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-sm-light);
}

.spa-play #balanceDisplay::before {
  content: "Баланс";
  grid-column: 2;
  grid-row: 1;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* Кнопка пополнения — бирюзовый круг, как в референсе */
.spa-play #balanceDisplay .topbar-plus {
  grid-column: 1;
  grid-row: 1 / span 2;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: var(--gradient-button);
  color: #0e0f20;
  box-shadow: 0 4px 16px rgba(45, 226, 230, 0.35);
}

.spa-play #balanceDisplay #balanceValue {
  grid-column: 2;
  grid-row: 2;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  background: none;
  padding: 0;
}

.spa-play #balanceDisplay .crystal-icon--balance {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  width: 30px;
  height: 30px;
}

/* ==========================================================================
   18. ПОПОЛНЕНИЕ — вкладки и перенос в профиль.
   В модалке пополнения было 4 вкладки: Stars, Подарки, TON, Купить звезды.
   Оставлена одна — оплата звёздами. Остальные скрыты (не удалены из DOM,
   чтобы JS переключения вкладок продолжал работать).
   ========================================================================== */

/* Полоса вкладок с одной вкладкой смысла не имеет — убираем её целиком */
#topupTabs,
.topup-tabs {
  display: none !important;
}

/* Содержимое скрытых вкладок тоже не должно показываться */
#giftsContent,
#tonContent,
#buystarsContent,
#giftsTab,
#tonTab,
#buystarsTab {
  display: none !important;
}

/* Контент вкладок занимает всю ширину, раз полосы вкладок нет */
.topup-tab-content {
  display: none;
}

#starsContent {
  display: block !important;
}

/* --------------------------------------------------------------------------
   Кнопка «Пополнить баланс» в профиле (вставляется из dist/js/psych.js).
   -------------------------------------------------------------------------- */
.ggp-topup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: var(--space-3) 0 0;
  padding: 15px 18px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--gradient-button);
  color: var(--color-button-primary-text);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(45, 226, 230, 0.28);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.ggp-topup:active {
  transform: translateY(1px);
  filter: brightness(1.06);
}

.ggp-topup-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* ==========================================================================
   19. КАРТОЧКИ СТАВОК — переделка.
   Разметка карточки:
     <div class="bet-option">
       <span class="bet-card-name">МАЛЕНЬКАЯ</span>
       <span class="bet-card-price"><span>25</span> <img class="crystal-icon--button"></span>
       <span class="bet-card-thumb"><img></span>   ← span, а не картинка!
   Размер раньше задавался самому span, поэтому картинка внутри рендерилась
   в натуральную величину и вылезала за пределы карточки.
   ========================================================================== */

.spa-play .bet-options-container {
  gap: var(--space-2);
  padding: 2px 0 6px;
  /* Подсказку-свайп убираем: полоса и так очевидна. */
  mask-image: none;
}

.spa-play .bet-options {
  gap: var(--space-2);
}

.spa-play .bet-option {
  position: relative;
  flex: 0 0 132px;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  height: 72px;
  min-height: 72px;
  padding: 10px 56px 10px 14px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  border-radius: var(--radius-m);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, #1a1d38 0%, #12142a 100%);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

/* Тонкая верхняя полоска-акцент: тир виден даже без подписи. */
.spa-play .bet-option::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 56px;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  opacity: 0.55;
}

.spa-play .bet-option:active { transform: scale(0.97); }

.spa-play .bet-card-name {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Цена: число + кристалл в одну строку, ровно по базовой линии. */
.spa-play .bet-card-price {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-accent);
  white-space: nowrap;
}

.spa-play .bet-card-price .crystal-icon--button {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  object-fit: contain;
}

/* Подарочная картинка: span позиционирован, размер задаём ВНУТРЕННЕЙ картинке. */
.spa-play .bet-card-thumb {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.spa-play .bet-card-thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Выбранная карточка */
.spa-play .bet-option.selected {
  border-color: var(--color-accent);
  background: linear-gradient(160deg, rgba(45, 226, 230, 0.16) 0%, rgba(45, 226, 230, 0.04) 100%);
  box-shadow: 0 0 0 1px rgba(45, 226, 230, 0.4), 0 6px 20px rgba(45, 226, 230, 0.18);
}

.spa-play .bet-option.selected::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent));
}

.spa-play .bet-option.selected .bet-card-name { color: var(--color-text-secondary); }

/* Кейс дня — единственная бесплатная, выделяем золотом */
.spa-play .bet-option[data-bet="free-timer"] .bet-card-price,
.spa-play .bet-option[data-bet="free"] .bet-card-price {
  color: var(--color-warning);
}

.spa-play .bet-option[data-bet="free-timer"]::before,
.spa-play .bet-option[data-bet="free"]::before {
  background: linear-gradient(90deg, var(--color-warning), transparent);
  opacity: 0.9;
}

/* ==========================================================================
   20. КОЛЕСО, КАРТОЧКИ ПОДАРКОВ И КНОПКА — по референсу.
   ========================================================================== */

/* --------------------------------------------------------------------------
   20.1 Колесо: тёмная рамка-окно, внутри чёрные карточки крупным планом.
   -------------------------------------------------------------------------- */
.spa-play .lottery-window {
  background: #161936;
  border-radius: var(--radius-xl);
  padding: var(--space-3) 0;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md-light);
}

.spa-play .lottery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 10px 12px;
  margin: 0 4px;
  border-radius: var(--radius-l);
  background: #0a0b16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal),
    transform var(--transition-normal);
}

.spa-play .lottery-item-icon,
.spa-play .lottery-item .gift-icon {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  /* Убираем бесконечное свечение оригинала — в референсе его нет */
  animation: none;
}

.spa-play .lottery-item .gift-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spa-play .lottery-item .gift-icon img,
.spa-play .lottery-item .gift-thumbnail {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Цена на карточке колеса — золотая пилюля внизу */
.spa-play .lottery-item-price {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(245, 197, 24, 0.13);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: var(--color-warning);
  font-size: var(--text-md);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.spa-play .lottery-item-price .crystal-icon,
.spa-play .lottery-item-price img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Указатель на центральную карточку — вертикальная линия со стрелками */
.spa-play .indicator {
  position: absolute;
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-accent) 0%, transparent 45%, transparent 55%, var(--color-accent) 100%);
  box-shadow: 0 0 12px rgba(45, 226, 230, 0.55);
  pointer-events: none;
}

.spa-play .indicator::before,
.spa-play .indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}

.spa-play .indicator::before {
  top: -1px;
  border-top: 9px solid var(--color-accent);
}

.spa-play .indicator::after {
  bottom: -1px;
  border-bottom: 9px solid var(--color-accent);
}

/* --------------------------------------------------------------------------
   20.2 «Вы можете выиграть»: шанс сверху, картинка, золотая цена снизу.
   Порядок элементов в разметке: icon → chance → price, поэтому
   шанс поднимаем через order.
   -------------------------------------------------------------------------- */
.spa-play .chances-section .gifts-container {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  width: 100%;
  overflow: visible !important;
  padding: var(--space-2);
  border-radius: var(--radius-xl);
  background: #161936;
  border: 1px solid var(--color-border);
  justify-content: stretch;
}

.spa-play .chances-section .gifts-container .gift-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100% !important;
  min-width: 0 !important;
  height: auto;
  padding: 10px 8px 12px;
  border-radius: var(--radius-m);
  background: #0a0b16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* Шанс — первой строкой, как в референсе */
.spa-play .chances-section .gift-chance {
  order: -1;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.spa-play .chances-section .gift-chance .gift-chance-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.spa-play .chances-section .gift-icon {
  order: 0;
  flex: 1 1 auto;
  min-height: 88px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.spa-play .chances-section .gift-icon img,
.spa-play .chances-section .gift-icon .gift-thumbnail {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.spa-play .chances-section .gift-label {
  display: none;
}

/* Цена — золотая пилюля внизу */
.spa-play .chances-section .gift-price {
  order: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(245, 197, 24, 0.13);
  border: 1px solid rgba(245, 197, 24, 0.28);
  color: var(--color-warning);
  font-size: var(--text-md);
  font-weight: 800;
  white-space: nowrap;
}

.spa-play .chances-section .gift-price img,
.spa-play .chances-section .gift-price .crystal-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
}

.spa-play .chances-section .heading-section {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin: var(--space-3) 0 var(--space-2);
}

/* --------------------------------------------------------------------------
   20.3 Демо-режим — отдельной строкой НАД кнопкой, как в референсе.
   -------------------------------------------------------------------------- */
.spa-play .info-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-3);
}

.spa-play .info-section .button-flip-container {
  order: -1;
  position: static;
  width: 100%;
  height: 52px;
  margin: 0;
  perspective: 1000px;
}

.spa-play .info-section .demo-mode,
.spa-play .info-section .button-flip-inner {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  border-radius: var(--radius-l);
  background: #161936;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 600;
}

/* Кнопка игры — широкая, высокая, как в референсе */
.spa-play .info-section .spin-button {
  order: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 72px;
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(45, 226, 230, 0.32);
}

/* ==========================================================================
   21. МИНИМАЛИЗМ — уменьшаем масштаб.
   Колесо в оригинале занимало 150×268 на карточку: на телефоне это две
   с половиной огромные картошки и полэкрана. Здесь всё ужато, чтобы
   на экране помещалось больше элементов без потери читаемости.
   ========================================================================== */

.spa-play .lottery-container {
  --reel-slot: 112px;
  --reel-height: 186px;
  margin-bottom: var(--space-2);
}

.spa-play .lottery-window {
  padding: var(--space-2) 0;
  border-radius: var(--radius-l);
}

.spa-play .lottery-item {
  padding: 7px 7px 8px;
  margin: 0 3px;
  gap: 5px;
  border-radius: var(--radius-m);
}

.spa-play .lottery-item-price {
  padding: 3px 9px;
  font-size: var(--text-sm);
  gap: 4px;
}

.spa-play .lottery-item-price .crystal-icon,
.spa-play .lottery-item-price img {
  width: 13px;
  height: 13px;
}

.spa-play .indicator {
  width: 1px;
  box-shadow: 0 0 8px rgba(45, 226, 230, 0.5);
}

.spa-play .indicator::before,
.spa-play .indicator::after {
  border-left-width: 5px;
  border-right-width: 5px;
}

.spa-play .indicator::before { border-top-width: 6px; top: 0; }
.spa-play .indicator::after { border-bottom-width: 6px; bottom: 0; }

/* --- Баланс --- */
.spa-play #balanceDisplay {
  min-height: 56px;
  padding: 9px var(--space-3);
  column-gap: 10px;
  border-radius: var(--radius-m);
}

.spa-play #balanceDisplay .topbar-plus {
  width: 34px;
  height: 34px;
  padding: 8px;
}

.spa-play #balanceDisplay #balanceValue {
  font-size: 21px;
}

.spa-play #balanceDisplay .crystal-icon--balance {
  width: 22px;
  height: 22px;
}

/* --- Карточки ставок --- */
.spa-play .bet-option {
  flex: 0 0 108px;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  height: 56px;
  min-height: 56px;
  padding: 7px 42px 7px 10px;
  gap: 2px;
  border-radius: var(--radius-s);
}

.spa-play .bet-option::before {
  left: 10px;
  right: 42px;
  height: 1px;
}

.spa-play .bet-card-name { font-size: 8px; letter-spacing: 0.05em; }
.spa-play .bet-card-price { font-size: 17px; gap: 4px; }

.spa-play .bet-card-price .crystal-icon--button {
  width: 13px;
  height: 13px;
}

.spa-play .bet-card-thumb {
  width: 36px;
  height: 36px;
  right: 4px;
}

/* --- «Вы можете выиграть» --- */
.spa-play .chances-section .heading-section {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-3) 0 var(--space-1);
}

.spa-play .chances-section .gifts-container {
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-l);
}

.spa-play .chances-section .gifts-container .gift-item {
  padding: 7px 6px 8px;
  border-radius: var(--radius-s);
}

.spa-play .chances-section .gift-chance {
  font-size: var(--text-sm);
  margin-bottom: 3px;
  gap: 3px;
}

.spa-play .chances-section .gift-chance .gift-chance-icon {
  width: 13px;
  height: 13px;
}

.spa-play .chances-section .gift-icon {
  min-height: 58px;
  margin-bottom: 5px;
}

.spa-play .chances-section .gift-price {
  padding: 3px 9px;
  font-size: var(--text-sm);
  gap: 4px;
}

.spa-play .chances-section .gift-price img,
.spa-play .chances-section .gift-price .crystal-icon {
  width: 12px;
  height: 12px;
}

/* --- Демо-строка: подпись слева, тумблер справа --- */
.spa-play .info-section {
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.spa-play .info-section .button-flip-container {
  height: 44px;
}

.spa-play .info-section .button-flip-inner,
.spa-play .info-section .demo-mode,
.spa-play .info-section .demo-mode.flip-front {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  border-radius: var(--radius-m);
  background: #141730;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.spa-play .info-section .demo-mode .switch {
  flex: 0 0 auto;
  margin: 0;
}

/* --- Кнопка игры --- */
.spa-play .info-section .spin-button {
  min-height: 56px;
  font-size: var(--text-md);
  border-radius: var(--radius-m);
}

/* --- Нижняя навигация --- */
.bottom-nav {
  padding: 5px;
  border-radius: var(--radius-l);
}

.bottom-nav .nav-item {
  padding: 5px 2px;
  gap: 2px;
  border-radius: var(--radius-m);
}

.bottom-nav .nav-item .nav-icon-svg,
.bottom-nav .nav-item .nav-icon {
  width: 19px;
  height: 19px;
}

.bottom-nav .nav-item .nav-text {
  font-size: 9.5px;
  font-weight: 500;
}

/* ==========================================================================
   22. КНОПКИ НАЛОЖИЛИСЬ — исправление.
   Блок DEMO — это 3D-флип (button-flip-inner с preserve-3d), из-за чего
   подпись и тумблер разъезжались, а кнопка игры уходила под карточку.
   Он служебный (переключатель демо-режима) и в интерфейсе не нужен,
   поэтому скрываем его целиком, а кнопке игры отдаём всю ширину.
   ========================================================================== */

.spa-play .info-section .button-flip-container {
  display: none !important;
}

.spa-play .info-section {
  position: relative;
  width: 100%;
  margin: var(--space-3) 0 var(--space-2);
}

.spa-play .info-section .spin-button {
  position: static;
  width: 100% !important;
  max-width: none;
  margin: 0;
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  border-radius: var(--radius-m);
  box-shadow: 0 8px 24px rgba(45, 226, 230, 0.3);
}

/* --------------------------------------------------------------------------
   КЕЙС ДНЯ — выделенная карточка выбора.
   Первая карточка в ленте обрезалась слева, поэтому выбор кейса вынесен
   в отдельный блок (вставляется из dist/js/psych.js).
   -------------------------------------------------------------------------- */
.ggp-case {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  margin: 0 0 var(--space-2);
  padding: 10px var(--space-3);
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.14) 0%, rgba(45, 226, 230, 0.08) 100%);
  border: 1px solid rgba(245, 197, 24, 0.32);
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.ggp-case:active { transform: scale(0.99); }

.ggp-case.is-active {
  border-color: var(--color-warning);
  box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.45), 0 6px 18px rgba(245, 197, 24, 0.2);
}

.ggp-case-ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-s);
  background: rgba(245, 197, 24, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.ggp-case-text { flex: 1 1 auto; min-width: 0; }

.ggp-case-title {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.ggp-case-sub {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
  line-height: 1.2;
}

.ggp-case-go {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient-button);
  color: var(--color-button-primary-text);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

/* Отступ под лентой ставок, чтобы первая карточка не резалась */
.spa-play .bet-options-container {
  padding-top: 2px;
}

/* ==========================================================================
   23. ИСПРАВЛЕНИЕ ПРОТИВОРЕЧИВЫХ ПРАВИЛ.
   В разделе 22 стояло два правила с !important на один селектор:
       .button-flip-container { display: none !important }
   Второе идёт позже и выигрывало, поэтому блок DEMO оставался на экране,
   а кнопка игры уезжала под него. Ниже — финальные правила без конфликтов.
   ========================================================================== */

.spa-play .info-section .button-flip-container,
.spa-play .info-section .button-flip-inner,
.spa-play .info-section .demo-mode {
  display: none !important;
}

/* Кнопка игры — единственный элемент в этом блоке, на всю ширину */
.spa-play .info-section {
  position: relative;
  display: block;
  width: 100%;
  margin: var(--space-3) 0 var(--space-2);
}

.spa-play .info-section .spin-button,
.spa-play .info-section button.spin-button {
  display: flex !important;
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: none !important;
  height: auto;
  min-height: 56px;
  margin: 0 !important;
  padding: 14px 16px;
  align-items: center;
  justify-content: center;
  font-size: var(--text-md);
  font-weight: 700;
  border-radius: var(--radius-m);
  background: var(--gradient-button) !important;
  color: var(--color-button-primary-text) !important;
  box-shadow: 0 8px 24px rgba(45, 226, 230, 0.3);
}

/* --------------------------------------------------------------------------
   Нижняя навигация больше не накрывает содержимое.
   --bottom-nav-clearance (200px) в этом билде не применялся к странице игры.
   -------------------------------------------------------------------------- */
.spa-play .page-container,
.spa-page {
  padding-bottom: calc(var(--bottom-nav-clearance) + 16px);
}

.spa-play .chances-section {
  padding-bottom: var(--space-2);
}

/* ==========================================================================
   24. ОКНО ВЫИГРЫША: убраны две кнопки.
   «Поделиться» (#shareGift) и «Сохранить» (#keepGift) убраны по просьбе
   владельца. Элементы создаются динамически в modals-J97nBVVY.js, поэтому
   скрываем их на уровне CSS — разметка и обработчики остаются нетронутыми.

   Заодно: кнопка «Сохранить» шла на POST /api/save_gift, которого в сборке
   не было вовсе (405) — она не работала никогда.
   ========================================================================== */

#keepGift,
#shareGift {
  display: none !important;
}

/* Оставшиеся кнопки («Получить», «Улучшить», «Продать») — в ряд по центру. */
.win-actions,
.win-actions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--space-2);
}

.win-actions .action-button,
.win-actions .win-action-btn,
.win-actions-credited {
  flex: 1 1 auto;
  min-width: 120px;
  min-height: 46px;
  border-radius: var(--radius-s);
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.win-actions .win-action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ==========================================================================
   25. ПРОФИЛЬ: убраны уровни и дубль кнопки пополнения.
   Кольцо прогресса уровня («Ур. 1») скрыто — владелец попросил убрать
   уровни из профиля.
   ========================================================================== */

.spa-profile .avatar-progress-ring,
.spa-profile .progress-ring,
.spa-profile .profile-avatar-wrapper .progress-ring-bg,
.spa-profile .profile-avatar-wrapper .progress-ring-fill {
  display: none !important;
}

/* Аватар без кольца: круглый, ровно под содержимое */
.spa-profile .profile-avatar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spa-profile .user-avatar-img,
.spa-profile .avatar-fallback {
  border-radius: 50%;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

/* Текст «Ур. N» прячем, если он отдельным элементом под кольцом */
.spa-profile .level-badge,
.spa-profile .profile-level,
.spa-profile [class*="level-badge"] {
  display: none !important;
}

/* Встроенная кнопка пополнения в профиле — заметная, на всю ширину карточки */
.spa-profile #balanceDisplay,
.spa-profile .balance-display {
  cursor: pointer;
}

.spa-profile #balanceDisplay:active {
  filter: brightness(0.95);
}
