/* ========== БАЗОВЫЕ СТИЛИ ========== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Unbounded:wght@500;600;700&display=swap');

:root {
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --vrn-text: #0c0c0c;
  --vrn-text-soft: #3d3d3d;
  --vrn-muted: #6b6b6b;
  --vrn-border: rgba(255, 255, 255, 0.3);
  --vrn-surface: rgba(255, 255, 255, 0.15);
  --vrn-shadow: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.08), 0 0.15rem 0.4rem rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: #fff;
  background: #0a0a0a url('background.jpg') center center / cover no-repeat fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ========== НОВЫЙ ХЕДЕР ========== */
.new-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
  overflow: hidden;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.settings-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.15);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-nickname {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 14px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  min-width: max-content;
}

.balance-badge:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.15);
}

#header-balance {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.plus-icon {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* ========== КОНТЕЙНЕР ========== */
.container {
  padding: 75px 16px 16px;
  max-width: 26rem;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== ЭКРАНЫ ========== */
.screen {
  display: none;
  animation: slideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  max-width: 380px;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ========== СТЕКЛЯННЫЕ КАРТОЧКИ ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  color: white;
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.card-value {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== ЛОГОТИП С СВЕЧЕНИЕМ ========== */
.logo-section {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeIn 0.8s ease;
  width: 100%;
}

.main-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 60px rgba(255, 255, 255, 0.4));
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.3));
  }

  to {
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 60px rgba(255, 255, 255, 0.5));
  }
}

.app-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== GLASSMORPHISM КАРТОЧКИ ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ========== КАРТОЧКА ПОДПИСКИ ========== */
.subscription-card {
  margin-bottom: 20px;
}

.sub-info {
  margin-bottom: 20px;
}

.sub-info:last-child {
  margin-bottom: 0;
}

.sub-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sub-link {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sub-link input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-family: 'SF Mono', 'Courier New', monospace;
  outline: none;
}

.copy-link-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-link-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.sub-date {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* ========== ПРЕДУПРЕЖДЕНИЕ ========== */
.warning-card {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.warning-icon {
  font-size: 48px;
}

.warning-text {
  color: #fff;
  line-height: 1.6;
}

.warning-text strong {
  font-size: 18px;
  display: block;
  margin-bottom: 5px;
}

.renew-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(145deg, #ffc107, #ff9800);
  color: #000;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.renew-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
}

/* ========== КНОПКИ ДЕЙСТВИЙ ========== */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.secondary-btn {
  width: 100%;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========== КНОПКА НАЗАД ========== */
.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  display: inline-block;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-4px);
}

.screen-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
  letter-spacing: -0.03em;
}

/* ========== КАРТОЧКИ ДАННЫХ ========== */
.card-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.card-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1.5px;
}

/* ========== СЕТКА СУММ ========== */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.amount-btn {
  padding: 22px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 16px;
}

.amount-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.amount-btn.selected {
  border: 2px solid transparent;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ========== ПОЛЕ ВВОДА СВОЕЙ СУММЫ ========== */
.custom-amount-section {
  margin: 24px 0;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.custom-amount-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

#custom-amount {
  flex: 1;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
}

#custom-amount:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

#custom-amount::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.custom-amount-container .action-btn {
  flex: 0 0 auto;
  width: auto;
  padding: 16px 28px;
  margin-bottom: 0;
  font-size: 15px;
}

.action-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(145deg, #1a1a1a, #2e2e2e);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  filter: brightness(1.1);
}

/* ========== СПОСОБЫ ОПЛАТЫ ========== */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.payment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 120px;
  border-radius: 16px;
}

.payment-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.payment-btn.selected {
  border: 2px solid transparent;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.payment-icon {
  width: 44px;
  height: 44px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.payment-btn:hover .payment-icon {
  transform: scale(1.15);
}

.payment-btn span {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* ========== ТАРИФЫ ========== */
.tariff-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.promo-section {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

#promo-input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

#promo-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

#promo-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.promo-btn {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.promo-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.tariff-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.tariff-card-new {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 20px;
}

.tariff-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(270deg, #ffffff, #e0e0e0, #c0c0c0, #e0e0e0, #ffffff);
  background-size: 400% 400%;
  color: #000;
  padding: 3px 6px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  animation: gradient-flow 4s ease infinite;
}

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.tariff-card-new:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tariff-card-new.selected {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

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

.tariff-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.tariff-price-new {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.tariff-total {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.tariff-discount {
  background: rgba(76, 175, 80, 0.3);
  color: #4caf50;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(76, 175, 80, 0.5);
}

.buy-vpn-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(145deg, #1a1a1a, #2e2e2e);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
    margin-top: 4px;

}

.buy-vpn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(125, 125, 125, 0.6);
  filter: brightness(1.1);
}

/* Анимация перелива градиента для Stars */
@keyframes goldShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Базовый стиль для золотой кнопки Stars  */
.animate-gold-gradient {
  width: 100%;
  padding: 18px;
  background: linear-gradient(145deg, #f9c93a, #ffa000, #f9c93a);
  background-size: 200% 200%;
  animation: goldShimmer 5s ease infinite;
  color: #000000 !important;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 160, 0, 0.3);
  margin-bottom: 16px;
  box-sizing: border-box;
}

.animate-gold-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 160, 0, 0.5);
  filter: brightness(1.05);
}

/* Стиль для кнопки Оплаты Криптой/СБП  */
.buy-crypto-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(145deg, #1a1a1a, #2e2e2e);
  color: #00ffcc !important;
  /* Твой фирменный бирюзовый цвет текста */
  border: 1px solid rgba(0, 255, 204, 0.2);
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
  box-sizing: border-box;
}

.buy-crypto-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 204, 0.2);
  border-color: rgba(0, 255, 204, 0.5);
  filter: brightness(1.1);
}

.balance-info {
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.balance-info span:last-child {
  font-weight: 700;
  color: #fff;
}

/* Старые стили тарифов - оставляем для совместимости */
.tariff-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 20px;
}

.tariff-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(6px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tariff-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tariff-price {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

/* ========== РЕФЕРАЛЬНАЯ ПРОГРАММА ========== */
.referral-link-section {
  margin: 24px 0;
}

.referral-link-container {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#referral-link {
  flex: 1;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-family: 'SF Mono', 'Courier New', monospace;
  outline: none;
}

.referral-link-detail {
  flex: 1;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-family: 'SF Mono', 'Courier New', monospace;
  outline: none;
}

.copy-btn {
  height: auto;
  padding: 16px 24px;
  background: linear-gradient(145deg, #1a1a1a, #2e2e2e);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.copy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  filter: brightness(1.1);
}

.referral-info {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.4);
  padding: 22px;
}

.referral-info p {
  font-size: 15px;
  line-height: 1.6;
  color: #fff;
  text-align: center;
}

.referral-info strong {
  color: #4caf50;
  font-weight: 700;
  font-size: 18px;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 400px) {
  .new-header {
    height: 60px;
    padding: 0 15px;
  }

  .container {
    padding-top: 70px;
  }

  .main-logo {
    width: 100px;
    height: 100px;
  }

  .app-title {
    font-size: 30px;
  }

  .card-value {
    font-size: 36px;
  }

  .amount-btn {
    font-size: 20px;
    padding: 24px;
  }

  .payment-icon {
    width: 44px;
    height: 44px;
  }
}

/* ========== НАСТРОЙКИ ========== */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.settings-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.settings-text {
  flex: 1;
}

.settings-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.settings-arrow {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

/* ========== TOGGLE SWITCH ========== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 34px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked+.toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

input:checked+.toggle-slider:before {
  transform: translateX(24px);
}

/* ========== ДЕТАЛЬНАЯ РЕФЕРАЛЬНАЯ ПРОГРАММА ========== */
.referral-stats {
  padding: 24px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.referral-conditions {
  padding: 24px;
  margin-bottom: 20px;
}

.conditions-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.conditions-list li {
  padding: 10px 0;
  padding-left: 25px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.conditions-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #4caf50;
  font-size: 20px;
  font-weight: bold;
}

.conditions-list strong {
  color: #4caf50;
  font-weight: 700;
}

.examples {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border-left: 4px solid #4caf50;
}

.examples p {
  margin: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.examples strong {
  color: #fff;
  font-weight: 600;
}

/* ========== КУРСОР НА АВАТАРКЕ ========== */
.user-info {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.user-info:hover {
  opacity: 0.8;
}

/*Небольшие правки*/

/* Убираем жесткую высоту экрана инструкции, чтобы он не улетал вниз */
#connection-screen {
  height: auto !important;
  min-height: unset !important;
  padding-bottom: 20px !important;
  padding-top: 10px !important;
}

/* Выравниваем кнопку Назад, чтобы она стояла аккуратно */
#connection-screen .back-btn {
  margin-bottom: 15px !important;
  margin-top: 5px !important;
}

/* Профессиональные стили для переключателя тарифов base/vip */
.tariff-tabs-container {
  display: flex !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  padding: 4px !important;
  margin: 15px auto 25px auto !important;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
}

.tariff-tabs-container .tab-btn {
  flex: 1 !important;
  background: none;
  border: none !important;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.25s ease-in-out !important;
  outline: none;
}

/* Стиль для активной выбранной вкладки */
.tariff-tabs-container .tab-btn.active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========== МОИ УСТРОЙСТВА ========== */
.devices-home-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(107, 92, 255, 0.2), rgba(39, 214, 174, 0.09));
  border-color: rgba(144, 132, 255, 0.35);
}

.devices-home-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 21px;
}

.devices-home-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.devices-home-copy strong {
  font-size: 15px;
}

.devices-home-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.devices-home-count {
  min-width: 48px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: #dcd8ff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#devices-screen {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

#devices-screen .back-btn {
  align-self: flex-start;
  margin-bottom: 4px;
}

.devices-heading {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.devices-heading .screen-title {
  margin-bottom: 5px;
}

.devices-heading p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1.45;
}

.devices-refresh-btn {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.devices-refresh-btn.is-loading {
  animation: deviceSpin 0.9s linear infinite;
}

@keyframes deviceSpin {
  to { transform: rotate(360deg); }
}

.devices-summary {
  margin: 4px 0 2px;
  padding: 18px;
  border-color: rgba(139, 124, 255, 0.3);
  background: linear-gradient(145deg, rgba(120, 103, 255, 0.16), rgba(255, 255, 255, 0.045));
}

.devices-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.devices-summary-top > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.devices-summary-label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#devices-summary-value {
  font-family: var(--font-display);
  font-size: 20px;
}

.devices-plan-badge {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #dcd8ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.devices-plan-badge.is-vip {
  border-color: rgba(255, 216, 96, 0.35);
  background: rgba(255, 207, 66, 0.12);
  color: #ffe28a;
}

.devices-progress {
  height: 7px;
  margin: 15px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.devices-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c6cff, #38dfb2);
  box-shadow: 0 0 18px rgba(73, 222, 180, 0.38);
  transition: width 0.35s ease;
}

#devices-summary-caption {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.devices-notice {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 200, 89, 0.28);
  border-radius: 14px;
  background: rgba(255, 184, 55, 0.1);
  color: #ffe4a8;
  font-size: 12px;
  line-height: 1.5;
}

.devices-notice.is-error {
  border-color: rgba(255, 100, 113, 0.32);
  background: rgba(255, 77, 94, 0.1);
  color: #ffc0c7;
}

.devices-list {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

.device-card {
  width: 100%;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(14, 15, 22, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.device-card.is-occupied {
  border-color: rgba(126, 108, 255, 0.28);
}

.device-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.device-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.075);
  font-size: 21px;
}

.device-card-title {
  min-width: 0;
  flex: 1;
}

.device-card-title strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-title span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(44, 220, 161, 0.1);
  color: #64e9bb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.device-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: '';
  box-shadow: 0 0 10px currentColor;
}

.device-status.is-occupied {
  background: rgba(137, 116, 255, 0.12);
  color: #b5a8ff;
}

.device-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.device-meta-item {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.device-meta-item span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.device-meta-item strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.device-action {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.device-action.primary {
  border-color: rgba(123, 107, 255, 0.42);
  background: linear-gradient(135deg, #6756eb, #7868f4);
  box-shadow: 0 8px 22px rgba(104, 86, 235, 0.22);
}

.device-action.icon-only {
  width: 44px;
  padding: 8px;
  font-size: 16px;
}

.device-action.full-width {
  grid-column: 1 / -1;
}

.device-action.danger {
  grid-column: 1 / -1;
  border-color: rgba(255, 94, 111, 0.22);
  background: rgba(255, 73, 91, 0.075);
  color: #ff9aa5;
}

.device-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.device-skeleton {
  height: 154px;
  border-radius: 20px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 38%, rgba(255, 255, 255, 0.04) 52%);
  background-size: 200% 100%;
  animation: deviceSkeleton 1.35s ease infinite;
}

@keyframes deviceSkeleton {
  to { background-position-x: -200%; }
}

.devices-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 14px;
}

.devices-help p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.5;
}

.device-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

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

.device-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.device-modal-sheet {
  position: relative;
  width: min(100%, 430px);
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px 24px 0 0;
  background: #171820;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.42);
  animation: deviceSheetIn 0.24s ease-out;
}

@keyframes deviceSheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.device-modal-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.device-modal-sheet h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.device-modal-sheet p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 1.45;
}

#device-name-input {
  width: 100%;
  margin: 16px 0 12px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
}

#device-name-input:focus {
  border-color: rgba(128, 111, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(128, 111, 255, 0.12);
}

.device-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.device-modal-actions button {
  padding: 13px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.device-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
}

.device-modal-save {
  background: linear-gradient(135deg, #6756eb, #7e6df6);
}

.device-modal-save:disabled {
  opacity: 0.55;
}

@media (max-width: 360px) {
  .device-card {
    padding: 14px;
  }

  .device-status {
    padding-inline: 7px;
    font-size: 9px;
  }

  .devices-home-copy small {
    display: none;
  }
}

/* ========== ЖИВОЙ ФОН X VPN ========== */
body {
  position: relative;
  isolation: isolate;
  background: #050509;
}

body::before,
body::after {
  position: fixed;
  pointer-events: none;
  content: '';
}

body::before {
  z-index: 0;
  inset: -32vh -36vw;
  background:
    radial-gradient(ellipse at 18% 24%, rgba(116, 92, 255, 0.48) 0%, rgba(116, 92, 255, 0.16) 24%, transparent 52%),
    radial-gradient(ellipse at 82% 38%, rgba(47, 211, 177, 0.34) 0%, rgba(47, 211, 177, 0.10) 25%, transparent 54%),
    radial-gradient(ellipse at 46% 82%, rgba(65, 108, 225, 0.30) 0%, rgba(65, 108, 225, 0.08) 28%, transparent 58%);
  filter: blur(42px) saturate(118%);
  opacity: 0.9;
  transform: translate3d(-2%, -2%, 0) scale(1.02) rotate(-3deg);
  transform-origin: center;
  animation: xvpnAuroraDrift 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
  will-change: transform;
}

body::after {
  z-index: 0;
  inset: -12%;
  background:
    radial-gradient(ellipse at 8% 58%, transparent 0 31%, rgba(140, 125, 255, 0.13) 36%, transparent 48%),
    radial-gradient(ellipse at 94% 66%, transparent 0 29%, rgba(65, 222, 190, 0.10) 35%, transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 36%, rgba(255, 255, 255, 0.018) 66%, transparent);
  filter: blur(18px);
  opacity: 0.82;
  transform: translate3d(1%, 0, 0) scale(1.04);
  animation: xvpnWaveDrift 6.5s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.container {
  position: relative;
  z-index: 1;
}

@keyframes xvpnAuroraDrift {
  0% {
    transform: translate3d(-5%, -4%, 0) scale(1.02) rotate(-4deg);
  }
  50% {
    transform: translate3d(5%, 3%, 0) scale(1.10) rotate(3deg);
  }
  100% {
    transform: translate3d(-2%, 8%, 0) scale(1.06) rotate(6deg);
  }
}

@keyframes xvpnWaveDrift {
  0% {
    opacity: 0.54;
    transform: translate3d(-4%, -3%, 0) scale(1.03);
  }
  100% {
    opacity: 0.96;
    transform: translate3d(5%, 5%, 0) scale(1.12);
  }
}

/* ========== КОМПАКТНЫЙ HEADER ========== */
.new-header {
  height: 64px;
  padding: 10px 12px;
  background: rgba(7, 8, 14, 0.62);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

.settings-btn {
  min-width: 0;
  max-width: 44%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.settings-btn:hover {
  background: transparent;
}

.user-nickname {
  max-width: 92px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.balance-badge {
  width: auto;
  min-width: 0;
  padding: 7px 10px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  font-family: var(--font-body);
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

#header-balance {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
}

.balance-separator {
  color: rgba(255, 255, 255, 0.28);
  font-weight: 400;
}

.crypto-balance-part,
.stars-balance-part {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.crypto-balance-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 34% center;
  box-shadow: 0 0 10px rgba(132, 117, 255, 0.24);
}

.balance-badge .divider {
  height: 16px;
  background: rgba(255, 255, 255, 0.18);
}

.balance-badge .plus-icon {
  color: #66e4bd;
}

/* ========== ВЫВОД РЕФЕРАЛЬНЫХ СРЕДСТВ ========== */
.referral-withdraw-card {
  width: 100%;
}

.referral-withdraw-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(133, 116, 255, 0.42);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(104, 87, 232, 0.88), rgba(66, 189, 164, 0.72));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(93, 78, 218, 0.22);
  transition: transform 160ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.referral-withdraw-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.92);
}

.referral-withdraw-btn:disabled {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
  box-shadow: none;
}

#referral-withdraw-caption {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  text-align: center;
}

/* ========== ИНТЕРАКТИВНЫЕ КНОПКИ УСТРОЙСТВ ========== */
.device-action {
  transform: translateY(0) scale(1);
  transition: transform 160ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.device-action:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.90);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.20);
}

.device-action:focus-visible,
.referral-withdraw-btn:focus-visible {
  outline: 2px solid rgba(119, 233, 201, 0.78);
  outline-offset: 2px;
}

@media (hover: hover) {
  .referral-withdraw-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(149, 135, 255, 0.66);
    background: linear-gradient(135deg, rgba(122, 103, 248, 0.96), rgba(62, 211, 178, 0.80));
    box-shadow: 0 14px 30px rgba(93, 78, 218, 0.30);
  }

  .device-action:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(139, 124, 255, 0.48);
    background: rgba(115, 96, 235, 0.22);
    box-shadow: 0 10px 22px rgba(67, 52, 162, 0.20);
  }

  .device-action.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(118, 98, 244, 0.92), rgba(74, 188, 167, 0.66));
  }

  .device-action.rename:hover:not(:disabled) {
    background: rgba(70, 196, 169, 0.16);
    border-color: rgba(83, 221, 190, 0.34);
  }

  .device-action.danger:hover:not(:disabled) {
    border-color: rgba(255, 116, 130, 0.46);
    background: rgba(176, 44, 58, 0.26);
    color: #ffd0d4;
    box-shadow: 0 10px 22px rgba(120, 28, 39, 0.20);
  }
}

@media (max-width: 360px) {
  .new-header {
    padding-inline: 9px;
  }

  .user-nickname {
    max-width: 58px;
    font-size: 12px;
  }

  .balance-badge {
    padding-inline: 8px;
    gap: 6px;
  }

  #header-balance {
    gap: 4px;
    font-size: 11px;
  }

  .crypto-balance-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }

  .device-action,
  .referral-withdraw-btn {
    transition-duration: 1ms;
  }
}

/* ========== РЕФЕРАЛЬНАЯ ПРОГРАММА: ИНТЕРАКТИВНЫЙ СЛОЙ V51 ========== */
#referral-detail-screen {
  align-items: stretch;
  gap: 16px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom));
}

#referral-detail-screen .screen-title {
  margin: 2px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(29px, 8vw, 38px);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

#referral-detail-screen .glass-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 0%, rgba(83, 224, 187, 0.10), transparent 36%),
    linear-gradient(135deg, rgba(118, 97, 239, 0.12), transparent 54%),
    rgba(14, 20, 29, 0.80);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#referral-detail-screen .referral-stats,
#referral-detail-screen .referral-conditions {
  margin: 0;
  padding: 20px;
}

#referral-detail-screen .section-label {
  margin-bottom: 13px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  letter-spacing: 0.11em;
}

#referral-detail-screen .stat-row {
  padding: 11px 0;
}

#referral-detail-screen .stat-label {
  font-size: 13px;
}

#referral-detail-screen .stat-value {
  font-family: var(--font-display);
  font-size: 18px;
}

#referral-detail-screen .conditions-list {
  margin: 4px 0 16px;
}

#referral-detail-screen .conditions-list li {
  padding: 7px 0 7px 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

#referral-detail-screen .conditions-list li::before {
  color: #65e5c4;
}

#referral-detail-screen .conditions-list strong {
  color: #73e7c9;
}

.referral-calculator {
  position: relative;
  margin-top: 14px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(126, 111, 247, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(87, 232, 193, 0.15), transparent 35%),
    linear-gradient(145deg, rgba(115, 95, 230, 0.19), rgba(9, 18, 24, 0.72));
}

.referral-calculator::before {
  position: absolute;
  top: -70px;
  right: -35px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(106, 231, 200, 0.11);
  border-radius: 50%;
  content: '';
}

.referral-calculator-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.referral-calculator-kicker {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.referral-calculator-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

#referral-friends-output {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(107, 233, 201, 0.26);
  border-radius: 999px;
  background: rgba(70, 211, 176, 0.10);
  color: #83efd3;
  font-size: 10px;
  font-weight: 750;
  box-shadow: 0 0 20px rgba(64, 226, 185, 0.08);
}

.referral-tariff-switch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 2px;
  margin-top: 11px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(5, 10, 17, 0.40);
}

.referral-tariff-switch button {
  min-width: 55px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
  transition: color 150ms ease, background 180ms ease, box-shadow 180ms ease, transform 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.referral-tariff-switch button.is-active {
  background: linear-gradient(135deg, rgba(122, 104, 243, 0.88), rgba(63, 205, 173, 0.64));
  color: #fff;
  box-shadow: 0 4px 13px rgba(77, 207, 177, 0.13);
}

.referral-tariff-switch button:active {
  transform: scale(0.95);
}

.referral-friends-slider {
  --slider-progress: 0%;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 5px;
  margin: 22px 0 0;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(90deg, #8070f6 0 var(--slider-progress), #62e4c3 var(--slider-progress), rgba(255, 255, 255, 0.12) var(--slider-progress));
  cursor: ew-resize;
}

.referral-friends-slider::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border: 4px solid #17202c;
  border-radius: 50%;
  appearance: none;
  background: #76e9cc;
  box-shadow: 0 0 0 1px rgba(128, 112, 246, 0.75), 0 0 21px rgba(91, 230, 195, 0.48);
}

.referral-friends-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 4px solid #17202c;
  border-radius: 50%;
  background: #76e9cc;
  box-shadow: 0 0 0 1px rgba(128, 112, 246, 0.75), 0 0 21px rgba(91, 230, 195, 0.48);
}

.referral-slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.29);
  font-size: 8px;
}

.referral-earning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.referral-earning-card {
  min-width: 0;
  padding: 10px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.referral-earning-card-featured {
  border-color: rgba(107, 231, 201, 0.23);
  background: linear-gradient(145deg, rgba(109, 91, 226, 0.15), rgba(62, 212, 175, 0.09));
}

.referral-earning-card span {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.39);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-earning-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(13px, 3.7vw, 17px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  text-shadow: 0 0 14px rgba(110, 232, 201, 0.10);
}

.referral-earning-card strong.is-spinning {
  color: #8bf2d8;
  text-shadow: 0 0 7px rgba(99, 232, 198, 0.66), 0 0 21px rgba(118, 99, 241, 0.45);
  animation: referralCounterFlicker 90ms steps(2, end) infinite;
}

.referral-calculator-note {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
}

.referral-withdraw-wrap {
  position: relative;
}

.referral-withdraw-btn[aria-disabled='true'] {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  box-shadow: none;
}

.referral-withdraw-btn[aria-disabled='true']:hover,
.referral-withdraw-btn[aria-disabled='true']:active {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.075);
  filter: none;
}

.referral-withdraw-btn.is-refusing {
  animation: referralButtonRefuse 430ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.referral-manager-bubble {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(121, 234, 206, 0.27);
  border-radius: 15px 15px 15px 5px;
  background: rgba(16, 24, 32, 0.97);
  color: rgba(244, 255, 252, 0.92);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.42;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 24px rgba(73, 218, 181, 0.08);
}

.referral-manager-bubble::after {
  position: absolute;
  bottom: -7px;
  left: 28px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(121, 234, 206, 0.21);
  border-bottom: 1px solid rgba(121, 234, 206, 0.21);
  background: rgba(16, 24, 32, 0.97);
  content: '';
  transform: rotate(45deg);
}

.referral-manager-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.referral-link-container {
  position: relative;
}

.referral-link-detail {
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  outline: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.065);
  color: #fff;
  font-size: 12px;
  box-shadow: none;
}

.referral-link-container input.is-copy-pulsing {
  animation: referralLinkPulse 920ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.copy-btn {
  position: relative;
}

.copy-btn.is-copied > :not(.copy-success-label) {
  opacity: 0;
}

.copy-success-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9df5de;
  font-size: 11px;
  font-weight: 800;
}

#referral-screen .copy-success-label {
  font-size: 0;
}

#referral-screen .copy-success-label::after {
  content: '✓';
  font-size: 18px;
}

.referral-coin-burst {
  position: absolute;
  z-index: 8;
  right: 42px;
  bottom: 20px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.referral-coin-burst i {
  position: absolute;
  display: block;
  font-size: 15px;
  font-style: normal;
  opacity: 0;
  animation: referralCoinBurst 820ms var(--coin-delay) cubic-bezier(0.18, 0.74, 0.25, 1) both;
  filter: drop-shadow(0 0 8px rgba(255, 204, 78, 0.28));
}

@keyframes referralCounterFlicker {
  0%, 100% { opacity: 0.70; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

@keyframes referralButtonRefuse {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@keyframes referralLinkPulse {
  0% { border-color: rgba(255, 255, 255, 0.11); box-shadow: 0 0 0 rgba(80, 229, 190, 0); }
  35% { border-color: rgba(109, 244, 208, 0.82); box-shadow: 0 0 0 3px rgba(74, 226, 187, 0.12), 0 0 24px rgba(69, 227, 186, 0.28); }
  100% { border-color: rgba(255, 255, 255, 0.11); box-shadow: 0 0 0 rgba(80, 229, 190, 0); }
}

@keyframes referralCoinBurst {
  0% { opacity: 0; transform: translate(0, 0) scale(0.45) rotate(0); }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--coin-x), var(--coin-y)) scale(1.02) rotate(var(--coin-turn)); }
}

@media (max-width: 360px) {
  .referral-calculator {
    padding-inline: 13px;
  }

  .referral-earning-grid {
    gap: 5px;
  }

  .referral-earning-card {
    padding-inline: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .referral-earning-card strong.is-spinning,
  .referral-withdraw-btn.is-refusing,
  .referral-link-container input.is-copy-pulsing,
  .referral-coin-burst i {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }

  .referral-manager-bubble {
    transition-duration: 1ms;
  }
}

/* ========== ЕДИНЫЙ СТИЛЬ ПОКУПКИ, БАЛАНСА И ПОДКЛЮЧЕНИЙ ========== */
:root {
  --flow-purple: #8b7dff;
  --flow-purple-soft: rgba(128, 108, 247, 0.18);
  --flow-mint: #65e5c4;
  --flow-mint-soft: rgba(74, 220, 184, 0.14);
  --flow-panel: rgba(11, 15, 22, 0.82);
  --flow-border: rgba(255, 255, 255, 0.13);
  --flow-muted: rgba(255, 255, 255, 0.52);
}

#buy-screen,
#topup-screen,
#devices-screen {
  align-items: stretch;
  gap: 14px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

#buy-screen > .back-btn,
#topup-screen > .back-btn,
#devices-screen > .back-btn {
  align-self: flex-start;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
  font-size: 12px;
}

.flow-hero {
  position: relative;
  min-width: 0;
  padding: 7px 2px 4px;
  overflow: hidden;
}

.flow-hero::after {
  position: absolute;
  top: 1px;
  right: 5px;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(99, 231, 198, 0.13);
  border-radius: 18px;
  box-shadow:
    0 0 0 10px rgba(131, 111, 255, 0.035),
    0 0 0 21px rgba(99, 231, 198, 0.02);
  content: '';
  transform: rotate(12deg);
}

.flow-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.flow-kicker > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flow-mint);
  box-shadow: 0 0 11px rgba(101, 229, 196, 0.72);
}

.flow-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 315px;
  font-family: var(--font-display);
  font-size: clamp(23px, 6.8vw, 29px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.flow-hero p {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
  line-height: 1.5;
}

.flow-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.flow-section-head > span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 720;
}

.flow-section-head > small {
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
}

/* Главная: карточка с реальными данными подписки */
.subscription-overview {
  position: relative;
  width: 100%;
  margin: 0 0 18px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--flow-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(64, 222, 181, 0.15), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(123, 101, 247, 0.18), transparent 45%),
    linear-gradient(145deg, rgba(25, 28, 38, 0.94), rgba(9, 13, 19, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}

.subscription-overview::after {
  position: absolute;
  top: -34px;
  right: -34px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(104, 233, 202, 0.14);
  border-radius: 50%;
  content: '';
}

.subscription-overview-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.subscription-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.subscription-overview h2 {
  max-width: 230px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.subscription-state {
  display: inline-flex;
  min-height: 25px;
  padding: 6px 9px;
  align-items: center;
  border: 1px solid rgba(96, 232, 198, 0.22);
  border-radius: 999px;
  background: rgba(61, 196, 163, 0.10);
  color: #8af0d4;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.subscription-state::before {
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  content: '';
}

.subscription-state.is-inactive {
  border-color: rgba(255, 132, 143, 0.22);
  background: rgba(172, 61, 76, 0.11);
  color: #ffb3ba;
}

.subscription-meta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(82px, 0.65fr);
  gap: 8px;
  margin: 18px 0 13px;
}

.subscription-meta-item {
  min-width: 0;
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.subscription-meta-item > span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.40);
  font-size: 8px;
  font-weight: 650;
}

.subscription-meta-item > strong {
  display: block;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.subscription-meta-item:last-child > strong {
  font-family: var(--font-display);
  font-size: 18px;
}

.subscription-connect-btn {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(132, 116, 255, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(115deg, rgba(118, 97, 240, 0.64), rgba(62, 198, 169, 0.38));
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(72, 57, 174, 0.20);
  transition:
    transform 160ms ease,
    border-color 180ms ease,
    filter 180ms ease,
    box-shadow 180ms ease;
}

.subscription-connect-btn > span:last-child {
  font-size: 17px;
  font-weight: 400;
}

.subscription-connect-btn:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.9);
}

.subscription-note {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
  text-align: center;
}

/* Пополнение */
.topup-panel,
.payment-methods-panel,
.tariff-picker-panel,
.purchase-config-card,
.purchase-buttons-container {
  position: relative;
  width: 100%;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--flow-border);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(26, 28, 38, 0.89), rgba(10, 14, 20, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px) saturate(118%);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
}

#topup-screen .amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

#topup-screen .amount-btn {
  display: flex;
  min-width: 0;
  min-height: 82px;
  padding: 14px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  outline: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(117, 98, 240, 0.10), transparent 45%),
    rgba(255, 255, 255, 0.045);
  color: #fff;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

#topup-screen .amount-btn strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

#topup-screen .amount-btn span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8px;
  font-weight: 550;
}

#topup-screen .amount-btn.selected {
  border-color: rgba(128, 238, 210, 0.38);
  background:
    radial-gradient(circle at 100% 0%, rgba(78, 221, 186, 0.20), transparent 48%),
    linear-gradient(145deg, rgba(117, 96, 239, 0.42), rgba(48, 138, 126, 0.19));
  box-shadow: 0 13px 28px rgba(63, 50, 153, 0.23);
  transform: none;
  animation: none;
}

#topup-screen .custom-amount-section {
  margin: 17px 0 0;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#topup-screen .section-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  letter-spacing: 0.08em;
}

#topup-screen .custom-amount-container {
  gap: 8px;
}

#topup-screen #custom-amount {
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  box-shadow: none;
}

#topup-screen #custom-amount:focus {
  border-color: rgba(118, 231, 203, 0.44);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(83, 219, 185, 0.06);
}

#topup-screen .custom-amount-container .action-btn {
  width: auto;
  min-width: 108px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(132, 116, 255, 0.28);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(113, 94, 229, 0.72), rgba(62, 187, 161, 0.48));
  font-size: 10px;
  box-shadow: 0 9px 22px rgba(65, 53, 151, 0.20);
}

.payment-methods-panel {
  background:
    radial-gradient(circle at 95% 0%, rgba(57, 211, 176, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(23, 27, 35, 0.92), rgba(9, 13, 19, 0.84));
}

#topup-screen .payment-grid {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 8px;
}

#topup-screen .payment-btn {
  display: grid;
  width: 100%;
  min-height: 61px;
  padding: 9px 11px;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.payment-icon-wrap {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(126, 107, 244, 0.19), rgba(63, 201, 170, 0.10));
}

#topup-screen .payment-icon {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}

.payment-copy {
  min-width: 0;
}

#topup-screen .payment-copy strong,
#topup-screen .payment-copy small {
  display: block;
  text-align: left;
}

#topup-screen .payment-copy strong {
  font-size: 11px;
  font-weight: 720;
}

#topup-screen .payment-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}

.payment-arrow {
  color: rgba(115, 232, 204, 0.66);
  font-size: 15px;
}

#topup-screen .payment-btn.selected {
  border-color: rgba(102, 229, 197, 0.35);
  background: linear-gradient(135deg, rgba(114, 95, 230, 0.28), rgba(48, 179, 151, 0.16));
  box-shadow: 0 11px 25px rgba(52, 42, 126, 0.20);
  transform: none;
  animation: none;
}

/* Покупка */
.tariff-picker-panel {
  padding: 15px;
  background:
    radial-gradient(circle at 3% 0%, rgba(124, 102, 245, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(25, 28, 38, 0.91), rgba(9, 14, 19, 0.84));
}

#buy-screen .tariff-tabs-container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4px;
  width: 100%;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

#buy-screen .tab-btn {
  min-width: 0;
  min-height: 39px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.40);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.2;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

#buy-screen .tab-btn.active {
  background: linear-gradient(135deg, rgba(125, 106, 239, 0.42), rgba(65, 179, 157, 0.18));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#buy-screen .promo-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 0 0 12px;
}

#buy-screen #promo-input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
}

#buy-screen #promo-input:focus {
  border-color: rgba(104, 228, 197, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

#buy-screen .promo-btn {
  min-width: 86px;
  height: 42px;
  padding: 0 11px;
  border-color: rgba(126, 109, 240, 0.25);
  background: rgba(126, 109, 240, 0.12);
  font-size: 9px;
}

#buy-screen .tariff-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

#buy-screen .tariff-card-new {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 101px;
  margin: 0;
  padding: 14px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  outline: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(91, 220, 188, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.045);
  color: #fff;
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.tariff-topline {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

#buy-screen .tariff-name {
  font-size: 10px;
  font-weight: 680;
  color: rgba(255, 255, 255, 0.64);
}

#buy-screen .vip-badge-icon {
  display: none;
  padding: 3px 5px;
  border: 1px solid rgba(102, 231, 199, 0.20);
  border-radius: 6px;
  background: rgba(65, 201, 169, 0.10);
  color: #88edd2;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

#buy-screen .tariff-price-new {
  display: block;
  margin: 9px 0 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

#buy-screen .tariff-card-new > small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.30);
  font-size: 8px;
}

#buy-screen .tariff-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
  font-weight: 760;
  animation: none;
}

#buy-screen .tariff-card-new.selected {
  border-color: rgba(122, 235, 207, 0.42);
  background:
    radial-gradient(circle at 100% 0%, rgba(76, 222, 185, 0.18), transparent 45%),
    linear-gradient(145deg, rgba(119, 99, 238, 0.38), rgba(43, 129, 119, 0.16));
  box-shadow: 0 13px 29px rgba(61, 48, 151, 0.23);
}

#buy-screen .purchase-config-card {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  overflow: visible;
  animation: xvpnFlowEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.purchase-config-copy > span,
.purchase-config-copy > small {
  display: block;
}

.purchase-config-copy > span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 720;
}

.purchase-config-copy > small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
}

.device-stepper {
  display: grid;
  width: 112px;
  height: 42px;
  grid-template-columns: 35px 42px 35px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
}

.device-stepper button {
  height: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.70);
  font-size: 18px;
  cursor: pointer;
}

.device-stepper span {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

#device-price-note {
  min-height: 12px;
  grid-column: 1 / -1;
  color: #74e8ca;
  font-size: 8px;
}

#buy-screen .purchase-buttons-container {
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

#select-payment-method-btn,
#payment-methods-sub-menu > button {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: none;
  transition:
    transform 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

#select-payment-method-btn {
  display: none;
  justify-content: center;
  background: linear-gradient(135deg, rgba(114, 95, 231, 0.74), rgba(62, 190, 163, 0.52));
  border-color: rgba(129, 114, 245, 0.35);
  box-shadow: 0 12px 27px rgba(68, 53, 161, 0.20);
}

#payment-methods-sub-menu {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-9px);
  transition: opacity 260ms ease, transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

#payment-methods-sub-menu .buy-vpn-btn {
  background:
    linear-gradient(135deg, rgba(117, 98, 237, 0.72), rgba(65, 188, 164, 0.47));
  border-color: rgba(132, 116, 246, 0.34);
}

#payment-methods-sub-menu .animate-gold-gradient {
  background:
    linear-gradient(135deg, rgba(112, 91, 199, 0.56), rgba(163, 116, 76, 0.27));
  background-size: auto;
  border-color: rgba(225, 186, 126, 0.22);
  animation: none;
}

#payment-methods-sub-menu .buy-crypto-btn {
  background:
    linear-gradient(135deg, rgba(48, 159, 139, 0.34), rgba(24, 57, 60, 0.45));
  border-color: rgba(83, 219, 187, 0.24);
}

/* Экран устройств */
#devices-screen .devices-hero {
  padding-bottom: 6px;
}

#devices-screen .devices-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(23px, 6.8vw, 29px);
  font-weight: 650;
  letter-spacing: -0.035em;
  text-align: left;
}

#devices-screen .devices-intro {
  width: auto;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
}

#devices-screen .devices-summary {
  margin: 0;
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0%, rgba(68, 220, 184, 0.13), transparent 40%),
    linear-gradient(145deg, rgba(26, 28, 38, 0.90), rgba(10, 14, 20, 0.83));
}

#devices-screen .devices-help {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

#devices-screen > .secondary-btn {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 11px;
}

/* ========== UI-ПРАВКИ V35 ========== */

/* Одинаковая заметная кнопка «Назад» на каждом экране */
.screen > .back-btn,
#buy-screen > .back-btn,
#topup-screen > .back-btn,
#devices-screen > .back-btn,
#referral-screen > .back-btn,
#connection-screen > .back-btn {
  display: inline-flex;
  width: 132px;
  min-width: 132px;
  min-height: 54px;
  margin: 0 0 4px !important;
  padding: 12px 17px;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(139, 124, 225, 0.35), rgba(255, 255, 255, 0.10));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 9px 22px rgba(0, 0, 0, 0.17);
  transition:
    transform 160ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.screen > .back-btn:active {
  transform: translateY(1px) scale(0.975);
  filter: brightness(0.88);
}

/* Разделяем раскрывающую кнопку и первый способ оплаты */
#payment-methods-sub-menu {
  gap: 10px;
  margin-top: 10px;
}

#payment-methods-sub-menu > button {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

/* Подсказка под реферальным кругом теперь заметнее */
.referral-circle-hint {
  margin-top: 10px;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.referral-circle-hint::before {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 10px rgba(97, 230, 195, 0.72);
}

/* ========== ИНТЕРАКТИВНЫЙ ПУЗЫРЬ УСТАНОВКИ VPN ========== */
#connection-screen {
  align-items: stretch;
  gap: 14px;
}

#connection-screen > .screen-title {
  margin: 2px 0 0;
}

.vpn-bubble-zone {
  --bubble-growth: 0.82;
  position: relative;
  display: flex;
  width: 100%;
  min-height: 230px;
  padding: 4px 0 0;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}

.vpn-bubble-trigger {
  position: relative;
  display: grid;
  width: 192px;
  height: 192px;
  padding: 0;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vpn-bubble-trigger:focus-visible {
  outline: 2px solid rgba(101, 229, 196, 0.74);
  outline-offset: 5px;
}

.vpn-bubble-trigger:disabled {
  cursor: default;
}

#question-animation {
  position: relative;
  z-index: 3;
  display: block;
  width: 120px;
  height: 120px;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(132, 117, 255, 0.20));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.vpn-bubble-shield {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 152px;
  height: 152px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(126, 111, 255, 0);
  border-radius: 50%;
  background:
    radial-gradient(circle at 37% 27%, rgba(255, 255, 255, 0.10), transparent 16%),
    radial-gradient(circle, rgba(113, 95, 237, 0.10), rgba(48, 208, 171, 0.045) 56%, transparent 72%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(var(--bubble-growth));
  box-shadow:
    inset 0 0 25px rgba(115, 97, 240, 0.07),
    0 0 22px rgba(101, 229, 196, 0.05);
  transition:
    width 220ms ease,
    height 220ms ease,
    opacity 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease,
    transform 290ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.vpn-bubble-shield::before,
.vpn-bubble-shield::after {
  position: absolute;
  border-radius: 50%;
  content: '';
}

.vpn-bubble-shield::before {
  inset: 6px;
  border: 1px dashed rgba(99, 230, 198, 0.20);
  opacity: 0;
}

.vpn-bubble-shield::after {
  inset: 17px;
  border: 1px solid rgba(142, 124, 255, 0.12);
  box-shadow: inset 0 0 18px rgba(111, 93, 233, 0.08);
}

.vpn-bubble-zone.is-awake .vpn-bubble-shield {
  border-color: rgba(133, 116, 255, 0.50);
  opacity: 1;
  box-shadow:
    inset 0 0 28px rgba(116, 96, 239, 0.13),
    0 0 22px rgba(115, 97, 240, 0.18),
    0 0 45px rgba(87, 225, 191, 0.08);
}

.vpn-bubble-zone.is-awake .vpn-bubble-shield::before {
  opacity: 1;
  animation: vpnBubbleOrbit 5s linear infinite;
}

.vpn-bubble-zone.is-charged .vpn-bubble-shield {
  border-color: rgba(99, 232, 199, 0.58);
  background:
    radial-gradient(circle at 37% 27%, rgba(255, 255, 255, 0.14), transparent 17%),
    radial-gradient(circle, rgba(120, 100, 245, 0.16), rgba(42, 212, 169, 0.08) 58%, transparent 73%);
  box-shadow:
    inset 0 0 32px rgba(115, 96, 241, 0.16),
    0 0 25px rgba(119, 101, 244, 0.23),
    0 0 58px rgba(76, 225, 188, 0.13);
  animation: vpnBubbleBreath 1.25s ease-in-out infinite;
}

.vpn-bubble-shield.is-hit {
  animation: vpnBubbleHit 270ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vpn-bubble-code {
  color: rgba(126, 240, 211, 0.0);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 7px;
  font-weight: 700;
  line-height: 2;
  letter-spacing: 0.17em;
  text-align: center;
  text-shadow: 0 0 9px rgba(89, 237, 201, 0.58);
  transform: rotate(-8deg) scale(0.86);
  transition: color 220ms ease, transform 280ms ease;
}

.vpn-bubble-zone.is-charged .vpn-bubble-code {
  color: rgba(126, 240, 211, 0.33);
  transform: rotate(-2deg) scale(1);
  animation: vpnCodeFlicker 880ms steps(3, end) infinite;
}

.vpn-bubble-bolt {
  position: absolute;
  width: 24px;
  height: 38px;
  border-top: 2px solid rgba(146, 129, 255, 0);
  border-right: 2px solid rgba(98, 238, 202, 0);
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(105, 232, 201, 0.74));
  transition: opacity 180ms ease, border-color 180ms ease;
}

.bolt-one {
  top: 24px;
  right: 27px;
  transform: skew(-18deg) rotate(21deg);
}

.bolt-two {
  bottom: 24px;
  left: 27px;
  transform: skew(17deg) rotate(201deg);
}

.vpn-bubble-zone[data-level='4'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='5'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='6'] .vpn-bubble-bolt {
  border-color: rgba(112, 239, 208, 0.64);
  opacity: 1;
  animation: vpnBoltFlash 560ms steps(2, end) infinite;
}

.vpn-bubble-zone.is-critical .vpn-bubble-trigger {
  animation: vpnBubbleShake 390ms ease-in-out infinite;
}

.vpn-bubble-zone.is-critical #question-animation {
  filter:
    drop-shadow(0 0 22px rgba(129, 111, 255, 0.50))
    drop-shadow(0 0 12px rgba(82, 232, 195, 0.32));
}

.vpn-bubble-hint {
  position: relative;
  z-index: 5;
  min-height: 17px;
  margin-top: -5px;
  padding-left: 13px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.025em;
  transition: color 180ms ease;
}

.vpn-bubble-hint::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #67e4c3;
  box-shadow: 0 0 9px rgba(103, 228, 195, 0.68);
  content: '';
  transform: translateY(-50%);
}

.vpn-bubble-zone.is-critical .vpn-bubble-hint {
  color: rgba(149, 241, 218, 0.76);
}

.vpn-bubble-particles {
  position: absolute;
  z-index: 8;
  top: 95px;
  left: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.vpn-bubble-particles i {
  --particle-x: 0px;
  --particle-y: 0px;
  --particle-r: 0deg;
  --particle-delay: 0ms;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #8d7dff;
  opacity: 0;
  box-shadow: 0 0 8px currentColor;
}

.vpn-bubble-particles i:nth-child(3n) {
  border-radius: 50%;
  background: #63e5c2;
}

.vpn-bubble-particles i:nth-child(4n) {
  width: 4px;
  height: 10px;
  background: #d8d2ff;
}

.vpn-bubble-particles i:nth-child(1) { --particle-x: -92px; --particle-y: -61px; --particle-r: -90deg; }
.vpn-bubble-particles i:nth-child(2) { --particle-x: -48px; --particle-y: -96px; --particle-r: 110deg; --particle-delay: 30ms; }
.vpn-bubble-particles i:nth-child(3) { --particle-x: 5px; --particle-y: -112px; --particle-r: 180deg; --particle-delay: 45ms; }
.vpn-bubble-particles i:nth-child(4) { --particle-x: 61px; --particle-y: -91px; --particle-r: 230deg; --particle-delay: 20ms; }
.vpn-bubble-particles i:nth-child(5) { --particle-x: 103px; --particle-y: -49px; --particle-r: 300deg; --particle-delay: 55ms; }
.vpn-bubble-particles i:nth-child(6) { --particle-x: 112px; --particle-y: 11px; --particle-r: 380deg; }
.vpn-bubble-particles i:nth-child(7) { --particle-x: 89px; --particle-y: 71px; --particle-r: 440deg; --particle-delay: 35ms; }
.vpn-bubble-particles i:nth-child(8) { --particle-x: 41px; --particle-y: 103px; --particle-r: 520deg; --particle-delay: 65ms; }
.vpn-bubble-particles i:nth-child(9) { --particle-x: -12px; --particle-y: 112px; --particle-r: 600deg; --particle-delay: 30ms; }
.vpn-bubble-particles i:nth-child(10) { --particle-x: -65px; --particle-y: 91px; --particle-r: 670deg; }
.vpn-bubble-particles i:nth-child(11) { --particle-x: -108px; --particle-y: 49px; --particle-r: 740deg; --particle-delay: 45ms; }
.vpn-bubble-particles i:nth-child(12) { --particle-x: -116px; --particle-y: -6px; --particle-r: 810deg; --particle-delay: 70ms; }
.vpn-bubble-particles i:nth-child(13) { --particle-x: -71px; --particle-y: -78px; --particle-r: -420deg; --particle-delay: 80ms; }
.vpn-bubble-particles i:nth-child(14) { --particle-x: 77px; --particle-y: -70px; --particle-r: 520deg; --particle-delay: 85ms; }
.vpn-bubble-particles i:nth-child(15) { --particle-x: 72px; --particle-y: 82px; --particle-r: -610deg; --particle-delay: 75ms; }
.vpn-bubble-particles i:nth-child(16) { --particle-x: -78px; --particle-y: 76px; --particle-r: 710deg; --particle-delay: 95ms; }

.vpn-bubble-zone.is-popped .vpn-bubble-shield {
  animation: vpnBubblePop 430ms cubic-bezier(0.32, 0, 0.67, 0) forwards;
}

.vpn-bubble-zone.is-popped #question-animation {
  animation: vpnLogoAfterPop 520ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.vpn-bubble-zone.is-popped .vpn-bubble-particles i {
  animation: vpnParticleBurst 760ms var(--particle-delay) cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.vpn-bubble-message {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  max-height: 0;
  margin-top: 0;
  padding: 0 16px;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  visibility: hidden;
  border: 1px solid rgba(112, 235, 205, 0);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 100%, rgba(118, 96, 241, 0.21), transparent 48%),
    radial-gradient(circle at 100% 0%, rgba(63, 219, 181, 0.14), transparent 40%),
    rgba(11, 16, 22, 0.92);
  opacity: 0;
  transform: translateY(15px) scale(0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  transition:
    max-height 480ms ease,
    margin 320ms ease,
    padding 320ms ease,
    opacity 340ms ease,
    transform 440ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 340ms ease,
    visibility 0s linear 480ms;
}

.vpn-bubble-message.is-visible {
  max-height: 240px;
  margin-top: 10px;
  padding: 16px;
  visibility: visible;
  border-color: rgba(112, 235, 205, 0.22);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.vpn-bubble-message-mark {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  place-items: center;
  border: 1px solid rgba(131, 116, 248, 0.30);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(126, 106, 243, 0.30), rgba(62, 213, 177, 0.18));
  color: #91f0d6;
  font-size: 14px;
  box-shadow: 0 0 18px rgba(94, 225, 194, 0.11);
}

.vpn-bubble-message strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.vpn-bubble-message p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  line-height: 1.55;
}

#connection-screen.active .vpn-bubble-zone {
  animation: xvpnFlowEnter 540ms 95ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes vpnBubbleOrbit {
  to { transform: rotate(360deg); }
}

@keyframes vpnBubbleBreath {
  0%, 100% {
    box-shadow:
      inset 0 0 26px rgba(115, 96, 241, 0.13),
      0 0 21px rgba(119, 101, 244, 0.18),
      0 0 42px rgba(76, 225, 188, 0.09);
  }
  50% {
    box-shadow:
      inset 0 0 34px rgba(115, 96, 241, 0.20),
      0 0 31px rgba(119, 101, 244, 0.30),
      0 0 64px rgba(76, 225, 188, 0.16);
  }
}

@keyframes vpnBubbleHit {
  0% { transform: translate(-50%, -50%) scale(var(--bubble-growth)); }
  45% { transform: translate(-50%, -50%) scale(calc(var(--bubble-growth) + 0.065)); }
  100% { transform: translate(-50%, -50%) scale(var(--bubble-growth)); }
}

@keyframes vpnCodeFlicker {
  0%, 100% { opacity: 0.46; }
  45% { opacity: 0.86; }
  55% { opacity: 0.30; }
}

@keyframes vpnBoltFlash {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.94; }
}

@keyframes vpnBubbleShake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  25% { transform: translate3d(-2px, 1px, 0) rotate(-0.6deg); }
  50% { transform: translate3d(2px, -1px, 0) rotate(0.6deg); }
  75% { transform: translate3d(-1px, -1px, 0) rotate(-0.3deg); }
}

@keyframes vpnBubblePop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(var(--bubble-growth));
    filter: brightness(1);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(calc(var(--bubble-growth) + 0.24));
    filter: brightness(1.65);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(var(--bubble-growth) + 0.52));
    filter: brightness(2);
  }
}

@keyframes vpnParticleBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  72% { opacity: 0.95; }
  100% {
    opacity: 0;
    transform: translate(var(--particle-x), var(--particle-y)) rotate(var(--particle-r)) scale(0.35);
  }
}

@keyframes vpnLogoAfterPop {
  0% { transform: scale(0.88); filter: brightness(1.5); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); filter: brightness(1); }
}

@media (hover: hover) {
  .screen > .back-btn:hover {
    border-color: rgba(150, 136, 255, 0.46);
    background:
      linear-gradient(145deg, rgba(145, 129, 232, 0.46), rgba(255, 255, 255, 0.13));
    transform: translateY(-2px);
    box-shadow: 0 13px 27px rgba(0, 0, 0, 0.22);
  }

  .vpn-bubble-trigger:hover #question-animation {
    transform: scale(1.04);
    filter: drop-shadow(0 0 24px rgba(132, 117, 255, 0.34));
  }
}

@media (max-width: 360px) {
  .screen > .back-btn,
  #connection-screen > .back-btn {
    width: 124px;
    min-width: 124px;
    min-height: 50px;
  }

  .vpn-bubble-trigger {
    width: 178px;
    height: 178px;
  }

  .vpn-bubble-shield {
    width: 143px;
    height: 143px;
  }

  .vpn-bubble-message {
    gap: 10px;
  }

  .vpn-bubble-message.is-visible {
    padding: 14px;
  }
}

/* V36: десять уровней пузыря и более заметное расширение */
.vpn-bubble-zone {
  --bubble-growth: 0.70;
  --bubble-ring-scale: 0.72;
  --bubble-inner-ring-scale: 0.58;
  --bubble-ring-opacity: 0;
  min-height: 242px;
}

.vpn-bubble-trigger::before,
.vpn-bubble-trigger::after {
  position: absolute;
  z-index: 1;
  inset: 12px;
  border: 1px solid rgba(129, 113, 255, 0.64);
  border-radius: 50%;
  opacity: var(--bubble-ring-opacity);
  content: '';
  pointer-events: none;
  transition:
    opacity 260ms ease,
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms ease,
    box-shadow 300ms ease;
  will-change: transform, opacity;
}

.vpn-bubble-trigger::before {
  transform: scale(var(--bubble-ring-scale));
  box-shadow:
    0 0 18px rgba(126, 109, 255, 0.20),
    inset 0 0 21px rgba(80, 228, 191, 0.07);
}

.vpn-bubble-trigger::after {
  inset: 27px;
  border-color: rgba(92, 232, 197, 0.52);
  transform: scale(var(--bubble-inner-ring-scale));
  box-shadow: 0 0 25px rgba(83, 228, 192, 0.11);
}

.vpn-bubble-zone.is-charged .vpn-bubble-trigger::before {
  animation: vpnBubbleRingPulse 1.5s ease-in-out infinite;
}

.vpn-bubble-zone.is-critical .vpn-bubble-trigger::after {
  border-color: rgba(119, 244, 213, 0.86);
  box-shadow:
    0 0 22px rgba(102, 239, 205, 0.32),
    inset 0 0 16px rgba(126, 110, 255, 0.16);
}

.vpn-bubble-zone.is-popped .vpn-bubble-trigger::before,
.vpn-bubble-zone.is-popped .vpn-bubble-trigger::after {
  animation: vpnBubbleRingPop 470ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vpn-bubble-shield {
  transition:
    opacity 250ms ease,
    border-color 250ms ease,
    box-shadow 280ms ease,
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.vpn-bubble-zone[data-level='5'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='6'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='7'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='8'] .vpn-bubble-bolt,
.vpn-bubble-zone[data-level='9'] .vpn-bubble-bolt {
  border-color: rgba(112, 239, 208, 0.68);
  opacity: 1;
  animation: vpnBoltFlash 500ms steps(2, end) infinite;
}

.vpn-bubble-hint {
  min-height: 22px;
  margin-top: -3px;
  padding-left: 17px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.018em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.vpn-bubble-hint::before {
  width: 8px;
  height: 8px;
  box-shadow:
    0 0 10px rgba(103, 228, 195, 0.78),
    0 0 20px rgba(103, 228, 195, 0.28);
}

@keyframes vpnBubbleRingPulse {
  0%, 100% {
    filter: brightness(0.92);
  }
  50% {
    filter: brightness(1.28);
  }
}

@keyframes vpnBubbleRingPop {
  0% {
    opacity: var(--bubble-ring-opacity);
    filter: brightness(1);
  }
  48% {
    opacity: 1;
    filter: brightness(1.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.62);
    filter: brightness(2.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vpn-bubble-zone * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Плавное появление блоков */
@keyframes xvpnFlowEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#buy-screen.active > .back-btn,
#topup-screen.active > .back-btn,
#devices-screen.active > .back-btn {
  animation: xvpnFlowEnter 390ms 15ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .buy-hero,
#topup-screen.active .topup-hero,
#devices-screen.active .devices-hero {
  animation: xvpnFlowEnter 480ms 70ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .tariff-picker-panel,
#topup-screen.active .topup-panel,
#devices-screen.active .devices-summary {
  animation: xvpnFlowEnter 530ms 135ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .tariff-card-new:nth-child(1),
#topup-screen.active .amount-btn:nth-child(1) {
  animation: xvpnFlowEnter 440ms 195ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .tariff-card-new:nth-child(2),
#topup-screen.active .amount-btn:nth-child(2) {
  animation: xvpnFlowEnter 440ms 235ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .tariff-card-new:nth-child(3),
#topup-screen.active .amount-btn:nth-child(3) {
  animation: xvpnFlowEnter 440ms 275ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#buy-screen.active .tariff-card-new:nth-child(4),
#topup-screen.active .amount-btn:nth-child(4) {
  animation: xvpnFlowEnter 440ms 315ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#topup-screen.active .custom-amount-section {
  animation: xvpnFlowEnter 470ms 360ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#topup-screen .payment-methods-panel:not(.hidden) {
  animation: xvpnFlowEnter 430ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .devices-notice:not(.hidden) {
  animation: xvpnFlowEnter 420ms 185ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .device-card:nth-child(1),
#devices-screen.active .device-skeleton:nth-child(1) {
  animation: xvpnFlowEnter 470ms 210ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .device-card:nth-child(2),
#devices-screen.active .device-skeleton:nth-child(2) {
  animation: xvpnFlowEnter 470ms 260ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .device-card:nth-child(3) {
  animation: xvpnFlowEnter 470ms 310ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .device-card:nth-child(4) {
  animation: xvpnFlowEnter 470ms 360ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .device-card:nth-child(5) {
  animation: xvpnFlowEnter 470ms 410ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active .devices-help {
  animation: xvpnFlowEnter 470ms 390ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active > .secondary-btn:not(.devices-refresh-btn) {
  animation: xvpnFlowEnter 470ms 435ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#devices-screen.active > .devices-refresh-btn {
  animation: xvpnFlowEnter 470ms 475ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@media (hover: hover) {
  .subscription-connect-btn:hover,
  #select-payment-method-btn:hover,
  #payment-methods-sub-menu > button:hover,
  #topup-screen .custom-amount-container .action-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(132, 239, 212, 0.48);
    filter: brightness(1.08);
    box-shadow: 0 14px 30px rgba(61, 49, 148, 0.28);
  }

  #topup-screen .amount-btn:hover,
  #topup-screen .payment-btn:hover,
  #buy-screen .tariff-card-new:hover {
    transform: translateY(-3px);
    border-color: rgba(128, 113, 242, 0.37);
    background-color: rgba(255, 255, 255, 0.075);
    box-shadow: 0 13px 27px rgba(0, 0, 0, 0.20);
  }

  #buy-screen .tab-btn:hover,
  #buy-screen .promo-btn:hover {
    color: #fff;
    background: rgba(125, 106, 239, 0.16);
  }
}

#topup-screen .amount-btn:active,
#topup-screen .payment-btn:active,
#buy-screen .tariff-card-new:active,
#buy-screen .tab-btn:active,
#buy-screen .promo-btn:active,
#select-payment-method-btn:active,
#payment-methods-sub-menu > button:active,
.device-stepper button:active {
  transform: translateY(1px) scale(0.975);
  filter: brightness(0.88);
}

@media (max-width: 360px) {
  .subscription-overview {
    padding: 17px;
  }

  .subscription-overview h2 {
    font-size: 15px;
  }

  .subscription-meta-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(78px, 0.75fr);
  }

  #topup-screen .custom-amount-container .action-btn {
    min-width: 96px;
    padding-inline: 10px;
    font-size: 9px;
  }

  #buy-screen .tariff-picker-panel {
    padding: 13px;
  }

  #buy-screen .tariff-card-new {
    min-height: 96px;
    padding: 12px;
  }

  #buy-screen .purchase-config-card {
    grid-template-columns: 1fr;
  }

  .device-stepper {
    width: 100%;
    grid-template-columns: 1fr 44px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #buy-screen.active > *,
  #topup-screen.active > *,
  #devices-screen.active > *,
  #buy-screen.active .tariff-card-new,
  #topup-screen.active .amount-btn,
  #devices-screen.active .device-card,
  #devices-screen.active .device-skeleton,
  #topup-screen .payment-methods-panel:not(.hidden),
  #buy-screen .purchase-config-card {
    animation: none;
  }

  .subscription-connect-btn,
  #topup-screen button,
  #buy-screen button {
    transition-duration: 1ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .devices-progress span,
  .device-modal-sheet {
    transition: none;
    animation: none;
  }
}

/* ========== МОИ УСТРОЙСТВА: СТИЛЬ ОСНОВНОГО MINI APP ========== */
.devices-home-btn {
  display: block;
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

#devices-screen {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

#devices-screen .back-btn {
  align-self: center;
  margin: 5px 0 18px;
}

.devices-title {
  width: 100%;
  margin-bottom: 0;
  text-align: center;
}

.devices-intro {
  width: 100%;
  margin: -4px 0 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.devices-summary {
  margin: 4px 0 2px;
  padding: 22px;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.devices-summary-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#devices-summary-value {
  display: block;
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 700;
}

#devices-summary-caption {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.45;
}

.devices-plan-badge,
.devices-progress,
.device-card-icon {
  display: none;
}

.devices-notice {
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.55;
}

.devices-list {
  gap: 14px;
}

.device-card {
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.device-card.is-occupied {
  border-color: rgba(255, 255, 255, 0.22);
}

.device-card-head {
  gap: 14px;
}

.device-card-title strong {
  font-size: 18px;
  font-weight: 700;
}

.device-card-title span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.device-status {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #8fe2ad;
  font-size: 12px;
  font-weight: 700;
}

.device-status::before {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.device-status.is-occupied {
  background: transparent;
  color: #ffffff;
}

.device-description {
  margin: 17px 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.55;
}

.device-meta {
  display: none;
}

.device-card-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.device-action {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.device-action.primary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.device-action.rename {
  background: rgba(255, 255, 255, 0.07);
}

.device-action.full-width,
.device-action.danger {
  grid-column: 1 / -1;
}

.device-action.danger {
  border-color: rgba(255, 123, 132, 0.26);
  background: rgba(157, 38, 48, 0.16);
  color: #ffb2b8;
}

.device-skeleton {
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 25%, rgba(255, 255, 255, 0.09) 38%, rgba(255, 255, 255, 0.035) 52%);
  background-size: 200% 100%;
}

.devices-help {
  display: block;
  margin: 2px 0 0;
  padding: 17px 19px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

.devices-refresh-btn {
  display: block;
  width: 100%;
  height: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
}

.devices-refresh-btn.is-loading {
  animation: none;
  opacity: 0.55;
}

.device-error-card strong {
  display: block;
  font-size: 17px;
}

.device-error-card p {
  margin: 8px 0 17px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.device-modal-sheet {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 20, 0.98);
}

#device-name-input:focus {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.device-modal-save {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 360px) {
  .device-card-actions {
    grid-template-columns: 1fr;
  }

  .device-action.full-width,
  .device-action.danger {
    grid-column: 1;
  }
}

/* ========== РЕФЕРАЛЬНАЯ ПРОГРАММА: X VPN ORBIT ========== */
@property --ref-progress {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

#referral-screen,
#referral-screen.active {
  align-items: stretch;
  gap: 14px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

#referral-screen .back-btn {
  align-self: flex-start;
  margin-bottom: 0;
}

.referral-hero {
  position: relative;
  overflow: hidden;
  padding: 8px 2px 3px;
}

.referral-hero::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(117, 235, 205, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 12px rgba(124, 105, 255, 0.045),
    0 0 0 25px rgba(117, 235, 205, 0.025);
  content: '';
}

.referral-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.referral-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56e6bd;
  box-shadow: 0 0 12px rgba(86, 230, 189, 0.75);
  animation: referralPulse 1.8s ease-in-out infinite;
}

.referral-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 330px;
  font-family: var(--font-display);
  font-size: clamp(24px, 7.3vw, 30px);
  font-weight: 650;
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.referral-hero h2 span {
  color: #8b7dff;
  background: linear-gradient(100deg, #998cff 5%, #68e8c4 92%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.referral-hero p {
  max-width: 310px;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.60);
  font-size: 12px;
  line-height: 1.5;
}

.referral-dashboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

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

.referral-metric,
.referral-progress-card,
.referral-share-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(145deg, rgba(28, 28, 39, 0.86), rgba(10, 13, 19, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 40px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}

.referral-metric {
  min-width: 0;
  min-height: 88px;
  padding: 13px 11px 11px;
  border-radius: 18px;
}

.referral-metric::after {
  position: absolute;
  right: -18px;
  bottom: -26px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(125, 107, 255, 0.16);
  filter: blur(16px);
  content: '';
}

.referral-metric-paid::after {
  background: rgba(75, 226, 190, 0.14);
}

.referral-metric-earned::after {
  background: rgba(78, 137, 255, 0.14);
}

.referral-metric > span {
  display: block;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 650;
}

.referral-metric strong {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 2px;
  color: #fff;
  font-family: var(--font-display);
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(17px, 5.4vw, 22px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-metric small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.31);
  font-size: 9px;
}

.referral-progress-card {
  display: flex;
  min-width: 0;
  min-height: 184px;
  padding: 18px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 19px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 8%, rgba(66, 224, 183, 0.16), transparent 38%),
    radial-gradient(circle at 4% 96%, rgba(118, 96, 245, 0.18), transparent 42%),
    linear-gradient(150deg, rgba(25, 28, 37, 0.93), rgba(9, 14, 17, 0.84));
}

.referral-progress-card::after {
  position: absolute;
  top: -36px;
  right: -42px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(80, 228, 190, 0.16);
  border-radius: 50%;
  content: '';
}

.referral-progress-label {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.referral-progress-visual {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 126px;
  flex: 0 0 126px;
  flex-direction: column;
  align-items: center;
}

.referral-progress-ring {
  --ref-progress: 0%;
  position: relative;
  display: grid;
  width: 122px;
  height: 122px;
  margin: 0;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    #8b79ff 0%,
    #52e9c0 var(--ref-progress),
    rgba(255, 255, 255, 0.075) var(--ref-progress),
    rgba(255, 255, 255, 0.075) 100%
  );
  box-shadow:
    0 0 28px rgba(104, 91, 225, 0.14),
    inset 0 0 12px rgba(255, 255, 255, 0.07);
  transition: --ref-progress 780ms cubic-bezier(0.22, 1, 0.36, 1);
}

.referral-progress-ring::before {
  display: none;
}

.referral-progress-ring::after {
  position: absolute;
  inset: -4px;
  border: 1px dashed rgba(111, 231, 203, 0.18);
  border-radius: 50%;
  content: '';
  animation: referralOrbit 9s linear infinite;
  pointer-events: none;
}

.referral-progress-ring.is-fortune-running::after {
  border-color: rgba(111, 238, 208, 0.48);
  animation-duration: 240ms;
}

.referral-fortune-button {
  position: absolute;
  inset: 8px;
  display: grid;
  padding: 10px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  outline: none;
  background:
    radial-gradient(circle at 55% 24%, rgba(127, 111, 255, 0.15), transparent 38%),
    rgba(9, 12, 18, 0.97);
  color: #fff;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow:
    inset 0 2px 15px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(95, 229, 197, 0.04);
  -webkit-tap-highlight-color: transparent;
}

.referral-fortune-button:focus-visible {
  outline: 2px solid rgba(111, 235, 205, 0.76);
  outline-offset: 3px;
}

.referral-fortune-button:active:not(:disabled) {
  transform: scale(0.96);
}

.referral-progress-normal {
  display: block;
  text-align: center;
  transition: opacity 220ms ease, transform 260ms ease;
}

.referral-progress-normal strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.referral-progress-normal > span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.39);
  font-size: 8px;
}

.referral-fortune-message {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  color: rgba(233, 255, 249, 0.94);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
  opacity: 0;
  transform: scale(0.78) rotate(-5deg);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.referral-progress-ring.is-fortune-running {
  animation: referralFortuneSpin 1.65s cubic-bezier(0.36, 0.05, 0.22, 1) both;
}

.referral-progress-ring.is-fortune-running .referral-progress-normal strong {
  animation: referralNumberFlicker 116ms steps(2, end) infinite;
}

.referral-progress-ring.is-fortune-revealed .referral-progress-normal {
  opacity: 0;
  transform: scale(0.72);
}

.referral-progress-ring.is-fortune-revealed .referral-fortune-message {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.referral-circle-hint {
  position: relative;
  margin-top: 9px;
  padding-left: 11px;
  color: rgba(255, 255, 255, 0.37);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.referral-circle-hint::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #61e6c3;
  box-shadow: 0 0 8px rgba(97, 230, 195, 0.62);
  content: '';
  transform: translateY(-50%);
}

.referral-progress-details {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.referral-available-amount {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: clamp(23px, 7vw, 30px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

#referral-screen #referral-withdraw-caption {
  min-height: 16px;
  margin: 4px 0 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
}

.referral-progress-card .referral-withdraw-btn {
  position: relative;
  z-index: 1;
  min-height: 42px;
  margin-top: 0;
  padding: 10px 28px 10px 12px;
  border-radius: 12px;
  font-size: 10px;
  line-height: 1.2;
}

.referral-progress-card .referral-withdraw-btn::after {
  position: absolute;
  top: 50%;
  right: 9px;
  content: '↗';
  font-size: 14px;
  transform: translateY(-52%);
}

.referral-share-card {
  padding: 17px;
  border-radius: 22px;
  background:
    linear-gradient(115deg, rgba(118, 96, 245, 0.10), transparent 46%),
    radial-gradient(circle at 98% 5%, rgba(64, 221, 182, 0.14), transparent 35%),
    rgba(12, 15, 22, 0.82);
}

.referral-share-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.referral-share-eyebrow {
  color: rgba(255, 255, 255, 0.43);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.referral-share-heading h3 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.referral-share-mark {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid rgba(100, 232, 202, 0.25);
  border-radius: 50%;
  background: rgba(72, 218, 184, 0.08);
  color: #6ee8c7;
  font-size: 17px;
  box-shadow: 0 0 20px rgba(69, 218, 181, 0.08);
}

.referral-share-description {
  max-width: 290px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  line-height: 1.45;
}

#referral-screen .referral-link-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  margin: 13px 0 0;
}

#referral-screen #referral-link {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  outline: none;
  background: rgba(0, 0, 0, 0.20);
  color: rgba(255, 255, 255, 0.70);
  font-family: 'SF Mono', 'Courier New', monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.18);
}

#referral-screen .copy-btn {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(116, 236, 207, 0.28);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(113, 94, 238, 0.44), rgba(57, 203, 170, 0.32));
  box-shadow: 0 8px 22px rgba(51, 171, 147, 0.11);
  transition: transform 160ms ease, filter 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#referral-screen .copy-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #b6ffed;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#referral-screen .copy-btn:active {
  transform: translateY(1px) scale(0.95);
  filter: brightness(0.88);
}

.referral-share-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
}

.referral-share-note strong {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.referral-share-note i {
  width: 3px;
  height: 3px;
  flex: 0 0 3px;
  border-radius: 50%;
  background: #62e5c3;
  box-shadow: 0 0 7px rgba(98, 229, 195, 0.65);
}

@keyframes referralPulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes referralOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes referralFortuneSpin {
  0% {
    filter: brightness(1);
    transform: scale(1) rotate(0deg);
  }
  22% {
    filter: brightness(1.18);
    transform: scale(0.95) rotate(-4deg);
  }
  48% {
    filter: brightness(1.28);
    transform: scale(1.055) rotate(5deg);
  }
  72% {
    filter: brightness(1.12);
    transform: scale(0.98) rotate(-2deg);
  }
  100% {
    filter: brightness(1);
    transform: scale(1) rotate(0deg);
  }
}

@keyframes referralNumberFlicker {
  0%, 100% {
    opacity: 0.68;
    transform: translateY(-1px) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translateY(1px) scale(1.06);
  }
}

@keyframes referralObjectEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#referral-screen.active > .back-btn {
  animation: referralObjectEnter 420ms 20ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-hero {
  animation: referralObjectEnter 520ms 75ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-progress-card {
  animation: referralObjectEnter 560ms 145ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-metric:nth-child(1) {
  animation: referralObjectEnter 500ms 230ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-metric:nth-child(2) {
  animation: referralObjectEnter 500ms 285ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-metric:nth-child(3) {
  animation: referralObjectEnter 500ms 340ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#referral-screen.active .referral-share-card {
  animation: referralObjectEnter 560ms 405ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@media (hover: hover) {
  .referral-fortune-button:hover:not(:disabled) {
    background:
      radial-gradient(circle at 55% 24%, rgba(127, 111, 255, 0.22), transparent 40%),
      rgba(12, 17, 23, 0.98);
    box-shadow:
      inset 0 2px 15px rgba(0, 0, 0, 0.22),
      0 0 25px rgba(95, 229, 197, 0.10);
  }

  #referral-screen .copy-btn:hover {
    border-color: rgba(131, 243, 216, 0.54);
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow: 0 12px 27px rgba(51, 171, 147, 0.18);
  }
}

@media (max-width: 360px) {
  .referral-hero h2 {
    font-size: 24px;
  }

  .referral-dashboard {
    gap: 8px;
  }

  .referral-metrics {
    gap: 6px;
  }

  .referral-metric {
    min-height: 82px;
    padding-inline: 9px;
  }

  .referral-metric strong {
    font-size: 17px;
  }

  .referral-progress-card {
    gap: 12px;
    padding: 15px 12px;
  }

  .referral-progress-visual {
    min-width: 110px;
    flex-basis: 110px;
  }

  .referral-progress-ring {
    width: 106px;
    height: 106px;
  }

  .referral-progress-card .referral-withdraw-btn {
    padding-left: 8px;
    font-size: 9px;
  }

  .referral-share-note {
    gap: 6px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .referral-kicker-dot,
  .referral-progress-ring::after {
    animation: none;
  }

  .referral-progress-ring,
  #referral-screen .copy-btn {
    transition-duration: 1ms;
  }

  #referral-screen.active > .back-btn,
  #referral-screen.active .referral-hero,
  #referral-screen.active .referral-progress-card,
  #referral-screen.active .referral-metric,
  #referral-screen.active .referral-share-card,
  .referral-progress-ring.is-fortune-running,
  .referral-progress-ring.is-fortune-running .referral-progress-normal strong {
    animation: none;
  }
}

/* Финальный слой экрана устройств поверх старых совместимых правил */
#devices-screen > .back-btn {
  align-self: flex-start;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
  font-size: 12px;
}

#devices-screen .devices-title {
  width: auto;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(23px, 6.8vw, 29px);
  font-weight: 650;
  letter-spacing: -0.035em;
  text-align: left;
}

#devices-screen .devices-intro {
  width: auto;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
}

#devices-screen .devices-summary {
  margin: 0;
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0%, rgba(68, 220, 184, 0.13), transparent 40%),
    linear-gradient(145deg, rgba(26, 28, 38, 0.90), rgba(10, 14, 20, 0.83));
}

#devices-screen .devices-help {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

#devices-screen > .secondary-btn {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 11px;
}

/* V35: финальные приоритеты после всех старых правил */
.screen > .back-btn,
#buy-screen > .back-btn,
#topup-screen > .back-btn,
#devices-screen > .back-btn,
#referral-screen > .back-btn,
#connection-screen > .back-btn {
  display: inline-flex;
  width: 132px;
  min-width: 132px;
  min-height: 54px;
  margin: 0 0 4px !important;
  padding: 12px 17px;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(139, 124, 225, 0.35), rgba(255, 255, 255, 0.10));
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 9px 22px rgba(0, 0, 0, 0.17);
}

.referral-circle-hint {
  margin-top: 10px;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.referral-circle-hint::before {
  width: 7px;
  height: 7px;
  box-shadow: 0 0 10px rgba(97, 230, 195, 0.72);
}

@media (max-width: 360px) {
  .screen > .back-btn,
  #connection-screen > .back-btn {
    width: 124px;
    min-width: 124px;
    min-height: 50px;
  }
}

/* V37: мини-игра «Сигнал» в сводке устройств */
.devices-summary-stage {
  width: 100%;
}

#devices-screen .devices-summary {
  position: relative;
  display: block;
  width: 100%;
  min-height: 158px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid rgba(130, 115, 244, 0.25);
  outline: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 180ms ease,
    border-color 210ms ease,
    box-shadow 220ms ease,
    filter 180ms ease;
}

#devices-screen .devices-summary::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 0 46%, rgba(119, 104, 246, 0.06) 47% 48%, transparent 49% 100%),
    radial-gradient(circle at 88% 22%, rgba(71, 229, 190, 0.18), transparent 36%),
    radial-gradient(circle at 8% 100%, rgba(124, 105, 246, 0.19), transparent 45%);
  content: '';
}

#devices-screen .devices-summary::after {
  position: absolute;
  z-index: -1;
  top: 19px;
  right: 18px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(100, 237, 203, 0.16);
  border-radius: 17px;
  content: '';
  transform: rotate(12deg);
  box-shadow:
    0 0 0 9px rgba(104, 229, 198, 0.025),
    0 0 25px rgba(79, 223, 187, 0.06);
}

#devices-screen .devices-summary:focus-visible {
  border-color: rgba(113, 239, 207, 0.62);
  box-shadow: 0 0 0 3px rgba(91, 229, 195, 0.13);
}

#devices-screen .devices-summary:active {
  transform: scale(0.985);
  filter: brightness(0.91);
}

.devices-summary-game-hint {
  display: inline-flex;
  margin-top: 15px;
  padding: 7px 10px 7px 8px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(104, 231, 200, 0.18);
  border-radius: 999px;
  background: rgba(40, 176, 147, 0.075);
  color: rgba(158, 242, 220, 0.76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.devices-summary-game-hint > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(102, 234, 200, 0.13);
  color: #76ebcc;
  font-size: 7px;
  box-shadow: 0 0 13px rgba(94, 231, 197, 0.15);
}

.devices-snake-game {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 11px;
  animation: devicesSnakeReveal 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.devices-snake-board {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(116, 233, 205, 0.22);
  border-radius: 21px;
  background: #0b141d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 17px 38px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(74, 216, 181, 0.06);
  isolation: isolate;
}

.devices-snake-board::after {
  position: absolute;
  z-index: 3;
  inset: 40px 0 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
  content: '';
  pointer-events: none;
}

.devices-snake-head {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 12, 19, 0.88);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}

.devices-snake-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.devices-snake-head span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #62e8c4;
  box-shadow: 0 0 11px rgba(98, 232, 196, 0.82);
  animation: devicesSnakeSignalPulse 1.1s ease-in-out infinite;
}

.devices-snake-head strong {
  color: #a9f4df;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#devices-snake-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  touch-action: none;
}

.devices-snake-ready {
  position: absolute;
  z-index: 5;
  top: calc(50% + 20px);
  left: 50%;
  padding: 8px 13px;
  border: 1px solid rgba(133, 117, 246, 0.29);
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.82);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 750;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    opacity 220ms ease,
    transform 260ms ease;
}

.devices-snake-ready.is-hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  pointer-events: none;
}

.devices-snake-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.devices-snake-controls button {
  display: flex;
  min-height: 54px;
  padding: 8px 12px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  outline: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(126, 108, 246, 0.15), transparent 50%),
    rgba(255, 255, 255, 0.055);
  color: #fff;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 150ms ease,
    background 180ms ease,
    border-color 180ms ease,
    filter 150ms ease;
}

.devices-snake-controls button span {
  color: #9af2dc;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 0 12px rgba(93, 231, 197, 0.38);
}

.devices-snake-controls button small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 720;
}

.devices-snake-controls button:focus-visible {
  border-color: rgba(108, 238, 205, 0.56);
  box-shadow: 0 0 0 3px rgba(85, 225, 190, 0.10);
}

.devices-snake-controls button:active,
.devices-snake-controls button.is-pressed {
  border-color: rgba(102, 235, 202, 0.38);
  background: rgba(70, 205, 174, 0.15);
  transform: scale(0.96);
  filter: brightness(1.12);
}

.devices-snake-stop {
  min-height: 50px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 118, 134, 0.18);
  border-radius: 15px;
  background: rgba(150, 45, 60, 0.10);
  color: #ffadb7;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 150ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.devices-snake-stop:active {
  background: rgba(166, 50, 66, 0.18);
  transform: scale(0.98);
}

.devices-snake-result {
  display: flex;
  width: 100%;
  padding: 13px 14px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(99, 231, 198, 0.19);
  border-radius: 17px;
  background:
    radial-gradient(circle at 0% 100%, rgba(125, 106, 245, 0.16), transparent 52%),
    rgba(12, 20, 25, 0.78);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: devicesSnakeResultReveal 430ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.devices-snake-result > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(122, 102, 242, 0.25), rgba(56, 210, 174, 0.16));
  color: #84efd3;
  font-size: 12px;
}

.devices-snake-result p {
  padding-top: 2px;
  font-size: 10px;
  font-weight: 610;
  line-height: 1.55;
}

@keyframes devicesSnakeReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes devicesSnakeResultReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes devicesSnakeSignalPulse {
  0%, 100% {
    opacity: 0.56;
    transform: scale(0.84);
  }
  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@media (hover: hover) {
  #devices-screen .devices-summary:hover {
    border-color: rgba(112, 234, 204, 0.37);
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 17px 34px rgba(0, 0, 0, 0.25),
      0 0 24px rgba(70, 215, 180, 0.06);
  }

  .devices-snake-controls button:hover {
    border-color: rgba(110, 235, 205, 0.30);
    background: rgba(73, 201, 171, 0.11);
    transform: translateY(-1px);
  }

  .devices-snake-stop:hover {
    border-color: rgba(255, 129, 144, 0.30);
    background: rgba(162, 49, 64, 0.16);
  }
}

@media (max-width: 360px) {
  #devices-screen .devices-summary {
    min-height: 150px;
    padding: 18px;
  }

  .devices-summary-game-hint {
    font-size: 8px;
  }

  .devices-snake-controls button {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .devices-snake-game,
  .devices-snake-result,
  .devices-snake-head span i {
    animation: none;
  }

  #devices-screen .devices-summary,
  .devices-snake-controls button,
  .devices-snake-ready {
    transition-duration: 1ms;
  }
}

/* ========== БОНУСЫ: ДЕМОНСТРАЦИОННЫЙ ЭКРАН ========== */
.bonuses-home-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding-inline: 20px;
  border-color: rgba(118, 235, 205, 0.30);
  background:
    radial-gradient(circle at 92% 18%, rgba(75, 230, 190, 0.20), transparent 34%),
    linear-gradient(110deg, rgba(113, 91, 235, 0.26), rgba(15, 25, 32, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bonuses-home-btn::before {
  position: absolute;
  top: -70%;
  left: -34%;
  width: 44%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  content: '';
  transform: rotate(18deg);
  animation: bonusHomeGleam 4.8s ease-in-out infinite;
  pointer-events: none;
}

.bonuses-home-btn > span {
  position: relative;
  z-index: 1;
}

.bonuses-home-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #72ebc9;
  background: rgba(3, 10, 14, 0.30);
  transition: transform 240ms ease, background-color 240ms ease;
}

.bonuses-home-btn:active {
  transform: translateY(1px) scale(0.985);
}

.bonuses-home-btn:active .bonuses-home-arrow {
  transform: translateX(3px);
}

@keyframes bonusHomeGleam {
  0%, 58% {
    transform: translateX(-120%) rotate(18deg);
    opacity: 0;
  }
  68% {
    opacity: 1;
  }
  88%, 100% {
    transform: translateX(430%) rotate(18deg);
    opacity: 0;
  }
}

#bonuses-screen {
  position: relative;
  isolation: isolate;
  padding-bottom: 28px;
}

#bonuses-screen::before {
  position: absolute;
  z-index: -1;
  top: 72px;
  right: -34px;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: rgba(55, 224, 181, 0.11);
  filter: blur(44px);
  content: '';
  animation: bonusesAura 5.5s ease-in-out infinite alternate;
  pointer-events: none;
}

#bonuses-screen > .back-btn {
  align-self: flex-start;
}

.bonuses-hero,
.bonuses-overview,
.bonus-tasks {
  width: 100%;
}

.bonuses-hero {
  position: relative;
  min-height: 218px;
  overflow: hidden;
  padding: 24px 142px 24px 22px;
  border: 1px solid rgba(140, 127, 226, 0.25);
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(118, 95, 240, 0.18), transparent 48%),
    radial-gradient(circle at 88% 46%, rgba(68, 229, 190, 0.16), transparent 35%),
    rgba(12, 16, 25, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 22px 48px rgba(0, 0, 0, 0.22);
}

.bonuses-hero::after {
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(118, 231, 202, 0.09);
  border-radius: 32px;
  content: '';
  transform: rotate(18deg);
}

.bonuses-hero-copy {
  position: relative;
  z-index: 2;
}

.bonuses-hero .flow-kicker {
  margin-bottom: 14px;
}

.bonuses-hero h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(23px, 7vw, 30px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.055em;
}

.bonuses-hero h2 span {
  color: #78e8c7;
}

.bonuses-hero p {
  max-width: 255px;
  margin: 15px 0 0;
  color: rgba(238, 240, 247, 0.64);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.52;
}

.bonus-orbit {
  position: absolute;
  z-index: 1;
  top: 38px;
  right: 13px;
  width: 118px;
  height: 142px;
  animation: bonusOrbitFloat 4.2s ease-in-out infinite;
}

.bonus-orbit-ring {
  position: absolute;
  top: 24px;
  left: 11px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(103, 233, 200, 0.27);
  border-radius: 50%;
}

.bonus-orbit-ring-one {
  box-shadow:
    0 0 28px rgba(80, 222, 187, 0.12),
    inset 0 0 26px rgba(116, 94, 236, 0.16);
  animation: bonusRingPulse 2.7s ease-in-out infinite;
}

.bonus-orbit-ring-two {
  top: 10px;
  left: 24px;
  width: 76px;
  height: 126px;
  border-color: rgba(132, 111, 246, 0.23);
  transform: rotate(52deg);
  animation: bonusRingSpin 8s linear infinite;
}

.bonus-token {
  position: absolute;
  top: 47px;
  left: 34px;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, rgba(126, 104, 247, 0.96), rgba(51, 205, 171, 0.87));
  box-shadow:
    0 14px 30px rgba(51, 184, 158, 0.23),
    inset 0 1px 1px rgba(255, 255, 255, 0.36);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  transform: rotate(-9deg);
}

.bonus-token::after {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  content: '';
}

.bonus-orbit-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ceac8;
  box-shadow: 0 0 12px currentColor;
}

.bonus-orbit-dot-one {
  top: 21px;
  right: 7px;
  animation: bonusDotBlink 1.9s ease-in-out infinite;
}

.bonus-orbit-dot-two {
  bottom: 15px;
  left: 18px;
  color: #998aff;
  background: currentColor;
  animation: bonusDotBlink 1.9s 0.7s ease-in-out infinite;
}

.bonuses-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 10px;
}

.bonus-stat-main,
.bonus-progress {
  min-height: 154px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background: rgba(11, 15, 23, 0.73);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.bonus-stat-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 100%, rgba(120, 96, 245, 0.17), transparent 56%),
    rgba(11, 15, 23, 0.76);
}

.bonus-stat-main > span,
.bonus-progress > div:last-child > span {
  color: rgba(236, 238, 246, 0.52);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.35;
}

.bonus-stat-main > strong {
  margin-top: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.04em;
}

.bonus-stat-main > small,
.bonus-progress > div:last-child > small {
  margin-top: 8px;
  color: rgba(237, 239, 245, 0.39);
  font-size: 9px;
  line-height: 1.35;
}

.bonus-progress {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(65, 222, 184, 0.13), transparent 55%),
    rgba(11, 15, 23, 0.76);
}

.bonus-progress-ring {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#72e9c7 0deg, rgba(255, 255, 255, 0.095) 0deg);
  box-shadow: 0 0 25px rgba(75, 218, 181, 0.08);
}

.bonus-progress-ring::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background: #10141d;
  content: '';
}

.bonus-progress-ring > span {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.bonus-progress-ring strong {
  font-family: var(--font-display);
  font-size: 20px;
}

.bonus-progress-ring small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 8px;
}

.bonus-progress > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.bonus-progress > div:last-child > strong {
  margin-top: 5px;
  color: #fff;
  font-size: 13px;
}

.bonus-tasks {
  margin-top: 8px;
}

.bonus-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 2px 2px 14px;
}

.bonus-section-heading > div > span {
  color: #70e5c4;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.bonus-section-heading h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.bonus-task-count {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.47);
  background: rgba(255, 255, 255, 0.045);
  font-size: 9px;
  font-weight: 700;
}

.bonus-task-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  margin-bottom: 10px;
  overflow: hidden;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 22px;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.04), transparent 48%),
    rgba(10, 14, 21, 0.80);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bonus-task-card::after {
  position: absolute;
  top: -36px;
  right: -34px;
  width: 98px;
  height: 98px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: '';
}

.bonus-task-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.bonus-task-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.bonus-task-channel .bonus-task-icon {
  color: #75baff;
  background: rgba(60, 145, 228, 0.12);
}

.bonus-task-friend .bonus-task-icon {
  color: #ac92ff;
  background: rgba(125, 100, 232, 0.13);
}

.bonus-task-plan .bonus-task-icon {
  color: #71e8c7;
  background: rgba(54, 208, 171, 0.12);
}

.bonus-task-copy {
  min-width: 0;
}

.bonus-task-copy > span {
  color: rgba(255, 255, 255, 0.37);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.bonus-task-copy h4 {
  margin: 3px 0 4px;
  color: #fff;
  font-size: 13px;
  line-height: 1.25;
}

.bonus-task-copy p {
  color: rgba(234, 237, 244, 0.48);
  font-size: 9px;
  line-height: 1.4;
}

.bonus-task-side {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 60px;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.bonus-task-side strong {
  color: #76e9c8;
  font-size: 13px;
  white-space: nowrap;
}

.bonus-task-side span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.41);
  background: rgba(255, 255, 255, 0.045);
  font-size: 8px;
  font-weight: 700;
}

.bonus-coming-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed rgba(116, 231, 202, 0.18);
  border-radius: 19px;
  color: rgba(238, 240, 246, 0.50);
  background: rgba(37, 92, 80, 0.07);
  font-size: 10px;
  line-height: 1.5;
}

.bonus-coming-note > span {
  color: #72e7c6;
  font-size: 19px;
}

.bonus-coming-note strong {
  color: rgba(255, 255, 255, 0.78);
}

.bonuses-development-modal {
  position: fixed;
  z-index: 4200;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 240ms ease, visibility 240ms ease;
}

body.bonuses-modal-open {
  overflow: hidden;
}

.bonuses-development-modal.is-visible {
  visibility: visible;
  opacity: 1;
}

.bonuses-development-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 5, 9, 0.72);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.bonuses-development-card {
  position: relative;
  width: min(100%, 340px);
  overflow: hidden;
  padding: 30px 24px 25px;
  border: 1px solid rgba(144, 128, 241, 0.31);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 6%, rgba(68, 224, 184, 0.18), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(125, 102, 241, 0.19), transparent 45%),
    rgba(16, 20, 30, 0.96);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: translateY(16px) scale(0.96);
  transition: transform 330ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bonuses-development-modal.is-visible .bonuses-development-card {
  transform: translateY(0) scale(1);
}

.bonuses-development-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.055);
  font-family: var(--font-body);
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.bonuses-development-close:active {
  transform: scale(0.90);
  background: rgba(255, 255, 255, 0.11);
}

.bonuses-development-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid rgba(113, 235, 204, 0.30);
  border-radius: 18px;
  color: #79ebca;
  background: linear-gradient(145deg, rgba(116, 94, 237, 0.25), rgba(51, 209, 173, 0.16));
  box-shadow: 0 0 26px rgba(59, 214, 176, 0.11);
  font-size: 22px;
}

.bonuses-development-mark span {
  animation: bonusNoticeSpark 2.4s ease-in-out infinite;
}

.bonuses-development-label {
  color: #77e7c6;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.bonuses-development-card h3 {
  margin: 8px 0 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.bonuses-development-card p {
  max-width: 250px;
  color: rgba(236, 239, 246, 0.57);
  font-size: 12px;
  line-height: 1.58;
}

#bonuses-screen.active > .back-btn {
  animation: xvpnFlowEnter 390ms 15ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonuses-hero {
  animation: xvpnFlowEnter 500ms 75ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonuses-overview {
  animation: xvpnFlowEnter 520ms 145ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonus-section-heading {
  animation: xvpnFlowEnter 440ms 210ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonus-task-card:nth-of-type(1) {
  animation: xvpnFlowEnter 470ms 260ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonus-task-card:nth-of-type(2) {
  animation: xvpnFlowEnter 470ms 315ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonus-task-card:nth-of-type(3) {
  animation: xvpnFlowEnter 470ms 370ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#bonuses-screen.active .bonus-coming-note {
  animation: xvpnFlowEnter 470ms 425ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes bonusesAura {
  from { transform: translate3d(-18px, -12px, 0) scale(0.92); opacity: 0.62; }
  to { transform: translate3d(18px, 24px, 0) scale(1.12); opacity: 1; }
}

@keyframes bonusOrbitFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes bonusRingPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.56; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes bonusRingSpin {
  to { transform: rotate(412deg); }
}

@keyframes bonusDotBlink {
  0%, 100% { transform: scale(0.72); opacity: 0.45; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes bonusNoticeSpark {
  0%, 100% { transform: rotate(0) scale(0.90); opacity: 0.74; }
  50% { transform: rotate(25deg) scale(1.16); opacity: 1; }
}

@media (hover: hover) {
  .bonuses-home-btn:hover {
    border-color: rgba(119, 235, 205, 0.45);
    background:
      radial-gradient(circle at 92% 18%, rgba(75, 230, 190, 0.28), transparent 36%),
      linear-gradient(110deg, rgba(113, 91, 235, 0.34), rgba(15, 25, 32, 0.88));
  }

  .bonuses-home-btn:hover .bonuses-home-arrow {
    transform: translateX(3px);
    background: rgba(68, 215, 179, 0.10);
  }

  .bonuses-development-close:hover {
    transform: rotate(8deg) scale(1.05);
    background: rgba(255, 255, 255, 0.10);
  }
}

@media (max-width: 360px) {
  .bonuses-hero {
    min-height: 205px;
    padding: 21px 122px 21px 18px;
  }

  .bonuses-hero h2 {
    font-size: 21px;
  }

  .bonus-orbit {
    right: 2px;
    transform: scale(0.90);
  }

  .bonus-stat-main,
  .bonus-progress {
    min-height: 145px;
  }

  .bonus-progress {
    flex-direction: column;
    align-items: flex-start;
  }

  .bonus-task-card {
    grid-template-columns: 43px minmax(0, 1fr) auto;
    gap: 9px;
    padding-inline: 12px;
  }

  .bonus-task-icon {
    width: 43px;
    height: 43px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bonuses-home-btn::before,
  .bonus-orbit,
  .bonus-orbit-ring,
  .bonus-orbit-dot,
  .bonuses-development-mark span,
  #bonuses-screen::before {
    animation: none !important;
  }

  .bonuses-development-card,
  .bonuses-development-modal {
    transition-duration: 1ms;
  }
}
