/* Шапка сайта */
.site-header {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(139, 87, 42, 0.04);
}

.header-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(255, 204, 0, 0.4);
}

.brand-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-input);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-btn:hover {
  background: var(--bg-card-cream);
  border-color: var(--text-accent-gold);
}

/* Основной контейнер клиента */
.client-container {
  max-width: 540px;
  margin: 26px auto 90px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Карточки */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-cream {
  background: var(--bg-card-cream);
}

.card-center {
  text-align: center;
}

.hero-badge-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, #FFB800 0%, #FF7A00 100%);
  color: #1C1917;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: var(--shadow-btn);
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Поля форм */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
  text-align: left;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.18);
}

.form-input.input-valid {
  border-color: var(--border-success);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.form-input[readonly], .form-input:disabled {
  background: var(--bg-input-disabled);
  color: var(--text-primary);
  font-weight: 600;
}

.input-check-icon {
  position: absolute;
  right: 12px;
  color: var(--green-main);
  font-weight: 800;
  font-size: 16px;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Кнопки */
.btn-primary {
  width: 100%;
  padding: 14px 20px;
  background: var(--btn-gradient);
  color: var(--btn-text);
  font-weight: 800;
  font-size: 15.5px;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--btn-gradient-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary-block {
  width: 100%;
  padding: 13px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14.5px;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}

.btn-secondary-block:hover {
  background: var(--bg-card-cream);
  border-color: var(--border-input);
}

.form-footer-link {
  margin-top: 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Баннеры уведомлений */
.toast-success {
  background: var(--green-bg);
  border: 1px solid #86EFAC;
  color: #166534;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-amber {
  background: var(--amber-bg);
  border: 1px solid #FCD34D;
  color: #92400E;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Карточки этапов в кабинете */
.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stage-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
}

.badge {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-received {
  background: var(--bg-badge-green);
  color: #15803D;
}

.badge-processing {
  background: var(--bg-badge-amber);
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-locked {
  background: var(--bg-badge-lock);
  color: var(--text-muted);
}

.prize-big-sum {
  font-size: 36px;
  font-weight: 900;
  color: var(--green-main);
  text-align: center;
  margin: 10px 0;
}

.prize-amber-sum {
  font-size: 36px;
  font-weight: 900;
  color: #D97706;
  text-align: center;
  margin: 10px 0;
}

.prize-gold-sum {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-primary);
  text-align: center;
  margin: 10px 0 4px;
}

/* Сетка операторов связи (6 операторов + Другой оператор) */
.operators-dropdown-box {
  margin-top: 8px;
  padding: 14px;
  background: var(--bg-card-cream);
  border: 1px solid var(--border-light);
  border-radius: 14px;
}

.operators-grid-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.operators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.operator-tile {
  background: var(--bg-main);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.operator-tile:hover {
  border-color: var(--border-focus);
}

.operator-tile.active {
  border-color: #FF9900;
  background: #FFFBEB;
  box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.2);
}

.op-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Секции анкеты подтверждения */
.section-subcard {
  background: var(--bg-card-cream);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}

.section-tag {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-accent-brown);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Способы выплаты (СБП, Карта Мир, Банковский счет) */
.payout-method-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 15px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payout-method-card.active {
  border-color: #FFB800;
  background: #FFFDF7;
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.14);
}

.payout-method-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payout-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-input);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payout-method-card.active .payout-radio-circle {
  border-color: #2563EB;
}

.payout-radio-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563EB;
  display: none;
}

.payout-method-card.active .payout-radio-inner {
  display: block;
}

.payout-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card-cream);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payout-method-fields {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

/* Колесо Фортуны (увеличенное и стилизованное под Столото) */
.wheel-wrapper {
  position: relative;
  width: 360px;
  height: 360px;
  max-width: 100%;
  margin: 14px auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid #FFB800;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 36px rgba(255, 184, 0, 0.55), 0 12px 28px rgba(28, 25, 23, 0.18);
}

.wheel-win-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* Юридические карточки (Условия, Политика, Правила) */
.terms-card {
  background: var(--bg-card-cream);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
}

.terms-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.terms-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-accent-brown);
  margin: 18px 0 6px;
}

.terms-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
  white-space: pre-line;
}

/* Нижние кнопки документов на всех страницах */
.legal-footer-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.legal-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.legal-pill:hover {
  background: var(--bg-card-cream);
  color: var(--text-accent-brown);
}

/* Служба поддержки и чат с Роботом Максимом */
.messenger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}

.btn-whatsapp {
  background: var(--whatsapp-green);
  color: #FFFFFF;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none !important;
}

.btn-max {
  background: var(--blue-max);
  color: #FFFFFF;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none !important;
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 440px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-bubble.from-admin {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.chat-bubble.from-client {
  align-self: flex-end;
  background: linear-gradient(135deg, #FFB800 0%, #F97316 100%);
  color: #1C1917;
  font-weight: 600;
}

.chat-system-notice {
  align-self: center;
  background: var(--bg-card-cream);
  border: 1px solid var(--border-input);
  color: var(--text-accent-brown);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-align: center;
}

.chat-meta {
  font-size: 11px;
  color: rgba(28, 25, 23, 0.6);
  margin-top: 4px;
}

/* Быстрые кнопки Робота Максима */
.bot-quick-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.bot-quick-btn {
  background: var(--bg-card-cream);
  border: 1px solid var(--border-input);
  color: var(--text-accent-brown);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  transition: all 0.15s ease;
}

.bot-quick-btn:hover {
  background: #F6E9CE;
  border-color: #FFB800;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.btn-send {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--btn-gradient);
  color: var(--text-primary);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Плавающий виджет чата */
.floating-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(28, 25, 23, 0.18);
  z-index: 90;
  overflow: hidden;
}

.floating-chat-header {
  background: var(--bg-card-cream);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.floating-chat-body {
  padding: 12px;
}

.mode-switcher {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 95;
  background: var(--bg-card-cream);
  border: 1px solid var(--border-input);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

/* Тактильные отклики на нажатия (Ripple + Micro-interactions) */
.ui-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
  transform: scale(0);
  animation: uiRippleEffect 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
  z-index: 5;
}

.pill-btn .ui-ripple,
.legal-pill .ui-ripple,
.operator-tile .ui-ripple,
.bot-quick-btn .ui-ripple,
.btn-admin-tool .ui-ripple {
  background: rgba(217, 130, 43, 0.22);
}

@keyframes uiRippleEffect {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

button:active:not(:disabled),
.pill-btn:active,
.legal-pill:active,
.operator-tile:active,
.payout-method-card:active,
.bot-quick-btn:active {
  transform: scale(0.965) !important;
}

.btn-primary {
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 168, 0, 0.45);
}

.card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

/* Плавная анимация смены экранов */
.screen-animate-in {
  animation: screenFadeSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* Выравнивание векторных SVG-иконок */
svg {
  flex-shrink: 0;
  vertical-align: middle;
}

.badge svg,
.status-badge svg {
  width: 13px;
  height: 13px;
}

.status-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

.bot-quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent-gold);
}

.chat-system-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3D Золотой флажок-указатель колеса с физикой отскока от штифтов */
.wheel-wrapper {
  width: 380px;
  height: 380px;
}

.wheel-pointer {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: 50% 6px;
  z-index: 15;
  width: 36px;
  height: 44px;
  border: none;
  background: none;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.38));
}

.wheel-pointer.pointer-kick {
  animation: pointerKickAnim 0.11s ease-out;
}

@keyframes pointerKickAnim {
  0% { transform: translateX(-50%) rotate(0deg); }
  45% { transform: translateX(-50%) rotate(-24deg); }
  100% { transform: translateX(-50%) rotate(0deg); }
}


/* Минималистичная шапка СТОЛОТО с плавным переходом (слайм-волной) в светлый задний фон */
.site-header-wrap {
  position: relative;
  z-index: 40;
  margin-bottom: 6px;
}

.site-header {
  background:
    radial-gradient(circle at 26% 50%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, 0.22) 12%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.14) 22%, transparent 32%),
    linear-gradient(180deg, #FFDF2B 0%, #FFCC00 100%);
  border-bottom: none;
  padding: 16px 20px 10px;
  position: relative;
  box-shadow: none;
}

.header-slime-wave {
  display: block;
  width: 100%;
  height: 38px;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 8px 14px rgba(217, 130, 43, 0.10));
}

.header-slime-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.02);
}

.site-header .pill-btn {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 25, 23, 0.12);
  color: #1C1917;
  font-weight: 700;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.06);
}

.site-header .pill-btn:hover {
  background: #FFFFFF;
  border-color: rgba(28, 25, 23, 0.25);
}
