/* ========== БАЗОВЫЕ СТИЛИ ========== */
@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);
}

/* ========== ПАРТНЁРСКИЕ УРОВНИ ========== */
.partner-home-card,
.partner-referral-card {
  width: 100%;
  border: 1px solid rgba(116, 235, 207, 0.28);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.partner-home-card {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 17px 18px 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 16%, rgba(78, 229, 196, 0.17), transparent 38%),
    linear-gradient(118deg, rgba(56, 43, 112, 0.92), rgba(10, 29, 39, 0.95));
  box-shadow: 0 16px 34px rgba(3, 7, 18, 0.24);
  transition: transform 180ms ease, border-color 180ms ease;
}

.partner-home-card:active,
.partner-referral-card:active {
  transform: scale(0.985);
}

.partner-home-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partner-home-eyebrow {
  color: rgba(224, 234, 245, 0.64);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.partner-home-copy strong {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.partner-home-copy small {
  overflow: hidden;
  color: rgba(230, 238, 245, 0.7);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-home-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
}

.partner-home-side b {
  padding: 7px 10px;
  border: 1px solid rgba(108, 235, 205, 0.32);
  border-radius: 999px;
  color: #75efd1;
  background: rgba(36, 187, 155, 0.1);
  font-size: 13px;
}

.partner-home-side span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: #9ff6df;
}

.partner-home-progress {
  position: absolute;
  right: 18px;
  bottom: 9px;
  left: 18px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.partner-home-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d6eff, #5fe2c2);
  box-shadow: 0 0 12px rgba(95, 226, 194, 0.55);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-home-orbit {
  position: absolute;
  top: -48px;
  right: -26px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(122, 234, 210, 0.11);
  border-radius: 50%;
}

.partner-home-orbit i:last-child {
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(142, 111, 255, 0.12);
  border-radius: inherit;
}

.partner-referral-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(42, 34, 88, 0.93), rgba(11, 39, 42, 0.94));
  box-shadow: 0 14px 28px rgba(3, 7, 18, 0.18);
  transition: transform 180ms ease, border-color 180ms ease;
}

.partner-referral-medal {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(122, 239, 210, 0.34);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(124, 91, 234, 0.68), rgba(43, 186, 158, 0.54));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.partner-referral-card > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partner-referral-card small,
.partner-referral-card em {
  color: rgba(227, 235, 243, 0.63);
  font-size: 10px;
  font-style: normal;
}

.partner-referral-card strong {
  font-size: 15px;
}

.partner-referral-card > i {
  color: #70e6c8;
  font-size: 20px;
  font-style: normal;
}

#partner-level-screen.active {
  align-items: stretch;
  gap: 14px;
  padding-bottom: 30px;
}

.partner-level-hero,
.partner-level-progress-card,
.partner-tier-card,
.partner-milestones-card,
.partner-level-rule {
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.partner-level-hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 27px;
  background:
    radial-gradient(circle at 88% 10%, rgba(74, 229, 195, 0.2), transparent 38%),
    linear-gradient(132deg, rgba(67, 48, 130, 0.94), rgba(9, 34, 39, 0.96));
}

.partner-level-kicker,
.partner-section-heading > span {
  color: #75e7ca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.partner-level-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
}

.partner-level-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6de7c8;
  box-shadow: 0 0 12px rgba(109, 231, 200, 0.72);
}

.partner-level-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.partner-level-hero-row small {
  color: rgba(231, 237, 245, 0.62);
  font-size: 11px;
}

.partner-level-hero h2 {
  margin: 4px 0 7px;
  font-family: var(--font-display);
  font-size: clamp(25px, 9vw, 35px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.partner-level-hero p {
  max-width: 215px;
  color: rgba(235, 240, 247, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

.partner-level-emblem {
  display: grid;
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  place-items: center;
  border: 1px solid rgba(115, 235, 207, 0.32);
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, rgba(126, 92, 232, 0.78), rgba(41, 183, 157, 0.58));
  box-shadow: 0 12px 32px rgba(15, 9, 51, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 700;
}

.partner-manual-badge {
  display: inline-flex;
  margin-top: 15px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 210, 111, 0.25);
  border-radius: 999px;
  color: #ffdc8d;
  background: rgba(255, 193, 77, 0.09);
  font-size: 10px;
  font-weight: 700;
}

.partner-level-progress-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(13, 23, 34, 0.94);
}

.partner-level-progress-card > div:first-child {
  display: flex;
  flex-direction: column;
}

.partner-level-progress-card > div:first-child span,
.partner-level-progress-copy span {
  color: rgba(222, 232, 241, 0.55);
  font-size: 10px;
}

.partner-level-progress-card > div:first-child strong {
  font-family: var(--font-display);
  font-size: 29px;
}

.partner-level-progress-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.partner-level-progress-copy strong {
  font-size: 12px;
}

.partner-level-track {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.partner-level-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8e6dff, #5be3c0);
  box-shadow: 0 0 14px rgba(91, 227, 192, 0.5);
  transition: width 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-level-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.partner-section-heading {
  padding: 7px 4px 4px;
}

.partner-section-heading h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.04em;
}

.partner-tier-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border-radius: 21px;
  background: linear-gradient(135deg, rgba(23, 27, 43, 0.95), rgba(10, 28, 34, 0.96));
  opacity: 0.72;
  transition: transform 200ms ease, opacity 200ms ease, border-color 200ms ease;
}

.partner-tier-card.is-achieved {
  opacity: 0.9;
}

.partner-tier-card.is-current {
  border-color: rgba(101, 234, 202, 0.62);
  opacity: 1;
  box-shadow: 0 18px 40px rgba(19, 91, 81, 0.18), inset 0 0 0 1px rgba(120, 104, 255, 0.13);
  transform: translateY(-1px);
}

.partner-tier-card.is-current::after {
  content: 'ВАШ УРОВЕНЬ';
  position: absolute;
  top: 10px;
  right: 11px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #8cf0d6;
  background: rgba(73, 209, 178, 0.1);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.partner-tier-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: 11px;
}

.partner-tier-copy {
  min-width: 0;
}

.partner-tier-copy > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-right: 2px;
}

.partner-tier-copy h4 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.04em;
}

.partner-tier-copy > div strong {
  color: #74e8cb;
  font-size: 15px;
}

.partner-tier-copy > span {
  display: block;
  margin-top: 4px;
  color: rgba(224, 234, 243, 0.64);
  font-size: 10px;
  font-weight: 700;
}

.partner-tier-copy p {
  margin-top: 8px;
  color: rgba(229, 236, 244, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.partner-milestones-card {
  padding: 17px;
  border-radius: 22px;
  background: linear-gradient(140deg, rgba(39, 31, 76, 0.94), rgba(9, 31, 35, 0.96));
}

.partner-milestone-row {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.partner-milestone-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.partner-milestone-row b {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #9ef2dc;
  background: rgba(80, 216, 184, 0.1);
  font-size: 12px;
}

.partner-milestone-row span {
  color: rgba(229, 236, 244, 0.67);
  font-size: 11px;
}

.partner-milestone-row strong {
  color: #fff0b7;
  font-size: 13px;
}

.partner-level-rule {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 11px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(10, 28, 33, 0.94);
}

.partner-level-rule > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #071613;
  background: #69e4c5;
  font-weight: 900;
}

.partner-level-rule p {
  color: rgba(229, 237, 244, 0.7);
  font-size: 11px;
  line-height: 1.52;
}

.partner-level-rule strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 12px;
}

#partner-level-screen.active > .back-btn,
#partner-level-screen.active .partner-level-hero,
#partner-level-screen.active .partner-level-progress-card,
#partner-level-screen.active .partner-tier-card,
#partner-level-screen.active .partner-milestones-card,
#partner-level-screen.active .partner-level-rule {
  animation: partnerLevelEnter 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#partner-level-screen.active .partner-level-hero { animation-delay: 35ms; }
#partner-level-screen.active .partner-level-progress-card { animation-delay: 70ms; }
#partner-level-screen.active .partner-tier-card:nth-of-type(1) { animation-delay: 100ms; }
#partner-level-screen.active .partner-tier-card:nth-of-type(2) { animation-delay: 130ms; }
#partner-level-screen.active .partner-tier-card:nth-of-type(3) { animation-delay: 160ms; }
#partner-level-screen.active .partner-tier-card:nth-of-type(4) { animation-delay: 190ms; }
#partner-level-screen.active .partner-milestones-card { animation-delay: 220ms; }
#partner-level-screen.active .partner-level-rule { animation-delay: 250ms; }

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

@media (hover: hover) {
  .partner-home-card:hover,
  .partner-referral-card:hover {
    border-color: rgba(111, 239, 208, 0.52);
    transform: translateY(-2px);
  }
}

@media (max-width: 360px) {
  .partner-home-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .partner-home-copy strong {
    font-size: 18px;
  }

  .partner-home-side b {
    padding: 6px 8px;
  }

  .partner-level-hero {
    padding: 19px;
  }

  .partner-level-emblem {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .partner-tier-card.is-current::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #partner-level-screen.active > .back-btn,
  #partner-level-screen.active .partner-level-hero,
  #partner-level-screen.active .partner-level-progress-card,
  #partner-level-screen.active .partner-tier-card,
  #partner-level-screen.active .partner-milestones-card,
  #partner-level-screen.active .partner-level-rule {
    animation: none !important;
  }

  .partner-home-progress i,
  .partner-level-track i {
    transition: none;
  }
}

/* ========== V61: ИГРОВЫЕ ЛИГИ И МИНИ-ИГРЫ ПАРТНЁРОВ ========== */

#payment-methods-sub-menu .purchase-primary-cta .purchase-cta-arrow {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

#payment-methods-sub-menu .purchase-primary-cta:active .purchase-cta-arrow {
  transform: translateY(-50%) scale(0.94);
}

.partner-inline-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: rgba(var(--partner-accent-rgb), 0.78);
  font-size: 8px;
  font-weight: 700;
}

.partner-inline-hint i {
  color: var(--partner-accent);
  font-style: normal;
  animation: partnerHintTwinkle 2.4s ease-in-out infinite;
}

@keyframes partnerHintTwinkle {
  0%, 100% { transform: scale(0.72) rotate(0); opacity: 0.5; }
  50% { transform: scale(1.18) rotate(90deg); opacity: 1; }
}

.partner-progress-orb {
  padding: 0;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.partner-progress-orb > i {
  position: absolute;
  z-index: 2;
  top: -4px;
  right: -4px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid #0d1923;
  border-radius: 50%;
  color: #11151a;
  background: linear-gradient(145deg, #fff2a5, #e9aa2d);
  box-shadow: 0 4px 12px rgba(232, 172, 49, 0.28);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  animation: partnerCoinHint 2.8s ease-in-out infinite;
}

.partner-progress-orb:active {
  transform: scale(0.94);
}

@keyframes partnerCoinHint {
  0%, 72%, 100% { transform: translateY(0) rotate(0); }
  80% { transform: translateY(-4px) rotate(-16deg); }
  90% { transform: translateY(1px) rotate(12deg); }
}

.partner-level-progress-card.coin-game-active {
  border-color: rgba(255, 215, 113, 0.54);
  box-shadow: 0 0 0 1px rgba(255, 214, 109, 0.12), 0 18px 42px rgba(0, 0, 0, 0.27);
}

/* Дорожка лиг: пройденная часть сплошная, закрытая — пунктирная. */
.partner-level-list {
  --partner-timeline-top: 80px;
  --partner-timeline-bottom: 31px;
  --partner-timeline-height: 0px;
}

.partner-level-list::before {
  z-index: 0;
  top: var(--partner-timeline-top);
  bottom: var(--partner-timeline-bottom);
  left: 36px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(118, 137, 158, 0.31) 0 6px,
    transparent 6px 12px
  );
}

.partner-level-list::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: var(--partner-timeline-top);
  left: 36px;
  width: 2px;
  height: var(--partner-timeline-height);
  min-height: 0;
  border-radius: 999px;
  background: linear-gradient(to bottom, #67e4c4, #7f9cff, #ffd276);
  box-shadow: 0 0 11px rgba(103, 228, 196, 0.52);
  pointer-events: none;
}

/* У каждой лиги собственный материал и характер. */
.partner-tier-card {
  min-height: 126px;
  padding: 17px;
  opacity: 1;
}

.partner-tier-start {
  border-color: rgba(103, 228, 196, 0.30);
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 213, 184, 0.09), transparent 38%),
    linear-gradient(140deg, rgba(20, 31, 39, 0.98), rgba(10, 28, 31, 0.98));
}

.partner-tier-pro {
  border-color: rgba(155, 128, 255, 0.40);
  background:
    radial-gradient(circle at 86% 12%, rgba(156, 119, 255, 0.24), transparent 39%),
    radial-gradient(circle at 4% 100%, rgba(95, 58, 188, 0.20), transparent 45%),
    linear-gradient(135deg, rgba(39, 25, 72, 0.98), rgba(16, 23, 48, 0.99));
}

.partner-tier-pro .partner-tier-copy > div strong {
  color: #b8a7ff;
  text-shadow: 0 0 14px rgba(159, 128, 255, 0.52);
}

.partner-tier-elite {
  border-color: rgba(79, 164, 255, 0.43);
  background:
    radial-gradient(circle at 88% 8%, rgba(62, 165, 255, 0.20), transparent 36%),
    linear-gradient(135deg, rgba(8, 33, 67, 0.99), rgba(7, 17, 38, 0.99));
}

.partner-tier-elite .partner-tier-copy > div strong {
  color: #76c7ff;
  text-shadow: 0 0 15px rgba(55, 167, 255, 0.50);
}

.partner-tier-top {
  border-color: rgba(255, 207, 100, 0.54);
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 205, 88, 0.21), transparent 37%),
    radial-gradient(circle at 2% 100%, rgba(147, 92, 21, 0.17), transparent 44%),
    linear-gradient(135deg, rgba(42, 31, 21, 0.99), rgba(17, 24, 31, 0.99));
  animation: partnerTopFrame 5s ease-in-out infinite;
}

.partner-tier-top .partner-tier-copy h4,
.partner-tier-top .partner-tier-copy > div strong {
  color: #ffe49a;
  background: linear-gradient(90deg, #fff0ae, #f2b83f 48%, #fff2bd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

@keyframes partnerTopFrame {
  0%, 72%, 100% {
    border-color: rgba(255, 207, 100, 0.43);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  }
  84% {
    border-color: rgba(255, 224, 143, 0.82);
    box-shadow: 0 0 25px rgba(239, 179, 49, 0.17), 0 16px 38px rgba(0, 0, 0, 0.25);
  }
}

.partner-tier-fx {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.partner-tier-pro .partner-tier-fx::before {
  content: '';
  position: absolute;
  top: -70%;
  right: -20%;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(181, 155, 255, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 30px rgba(140, 102, 255, 0.06);
}

.partner-tier-elite .partner-tier-fx {
  inset: -35% -20%;
  opacity: 0.28;
  background: repeating-linear-gradient(
    118deg,
    transparent 0 15px,
    rgba(87, 184, 255, 0.16) 15px 16px,
    transparent 16px 31px
  );
  animation: partnerEliteLines 7s linear infinite;
}

@keyframes partnerEliteLines {
  from { transform: translate3d(-32px, 0, 0); }
  to { transform: translate3d(42px, 0, 0); }
}

.partner-tier-top .partner-tier-fx::before {
  content: '';
  position: absolute;
  top: -80%;
  bottom: -80%;
  left: -45%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 231, 165, 0.22), transparent);
  transform: rotate(17deg) translate3d(-180%, 0, 0);
  animation: partnerTopSheen 5s ease-in-out infinite;
}

.partner-tier-top .partner-tier-fx::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 218, 126, 0.13);
  border-radius: 17px;
  animation: partnerTopInnerFrame 5s ease-in-out infinite;
}

@keyframes partnerTopSheen {
  0%, 64% { transform: rotate(17deg) translate3d(-220%, 0, 0); opacity: 0; }
  72% { opacity: 1; }
  91%, 100% { transform: rotate(17deg) translate3d(760%, 0, 0); opacity: 0; }
}

@keyframes partnerTopInnerFrame {
  0%, 70%, 100% { opacity: 0.22; }
  84% { opacity: 0.9; }
}

.partner-tier-card.is-locked {
  opacity: 0.48;
  border-color: rgba(150, 161, 178, 0.17);
  box-shadow: none;
}

.partner-tier-card.is-locked .partner-tier-fx {
  opacity: 0.12;
  animation-play-state: paused;
}

.partner-tier-card.is-locked .partner-tier-copy > span,
.partner-tier-card.is-locked .partner-tier-copy p {
  color: rgba(208, 217, 229, 0.46);
}

.partner-tier-card.is-locked .partner-tier-copy > div strong {
  color: rgba(218, 225, 235, 0.58);
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

.partner-tier-card.is-locked .partner-tier-number {
  color: transparent;
  font-size: 0;
  background: rgba(151, 163, 180, 0.07);
  border-color: rgba(171, 181, 194, 0.19);
}

.partner-tier-card.is-locked .partner-tier-number::after {
  content: '🔒';
  position: static;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  color: rgba(221, 228, 237, 0.64);
  background: none;
  font-size: 14px;
  filter: grayscale(1);
}

.partner-tier-card.is-current {
  opacity: 1;
}

.partner-tier-card.is-current .partner-tier-number::before {
  content: '';
  position: absolute;
  z-index: 4;
  top: 50%;
  left: -13px;
  width: 9px;
  height: 9px;
  border: 2px solid #102129;
  border-radius: 50%;
  background: var(--tier-accent);
  box-shadow: 0 0 13px var(--tier-accent);
  transform: translateY(-50%);
  animation: partnerTimelinePulse 1.8s ease-in-out infinite;
}

@keyframes partnerTimelinePulse {
  0%, 100% { transform: translateY(-50%) scale(0.72); opacity: 0.62; }
  50% { transform: translateY(-50%) scale(1.22); opacity: 1; }
}

/* Копилка и заряд бонусов. */
.partner-milestones-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 4%, rgba(255, 204, 83, 0.13), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(104, 78, 211, 0.18), transparent 44%),
    linear-gradient(140deg, rgba(35, 29, 69, 0.98), rgba(9, 29, 34, 0.98));
}

.partner-milestone-row {
  grid-template-columns: 47px minmax(0, 1fr) minmax(91px, auto);
  min-height: 66px;
  gap: 10px;
  padding: 10px 0;
}

.partner-milestone-row > b {
  position: relative;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(139, 154, 176, 0.19);
  border-radius: 50%;
  color: rgba(220, 228, 237, 0.55);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.08), transparent 27%),
    rgba(106, 121, 143, 0.08);
  box-shadow: inset 0 0 0 4px rgba(6, 16, 25, 0.28);
}

.partner-milestone-row.is-next > b {
  color: #9cebd8;
  border-color: rgba(101, 228, 197, 0.34);
  background: rgba(68, 196, 164, 0.11);
}

.partner-milestone-row.is-achieved > b {
  color: #061712;
  border-color: rgba(163, 255, 224, 0.64);
  background: linear-gradient(145deg, #a8f4dd, #4fd0af);
  box-shadow: 0 0 21px rgba(86, 218, 185, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.partner-milestone-row.is-achieved > b::after {
  top: -3px;
  right: -3px;
  left: auto;
  width: 16px;
  height: 16px;
  border: 2px solid #14202a;
  color: #071613;
  background: #effff9;
  font-size: 9px;
}

.partner-bonus-trigger {
  --bonus-charge: 0%;
  position: relative;
  display: flex;
  min-width: 91px;
  padding: 8px 9px;
  overflow: visible;
  border: 1px solid rgba(255, 213, 121, 0.14);
  border-radius: 12px;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
  color: rgba(222, 228, 237, 0.48);
  background: rgba(255, 255, 255, 0.025);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.partner-bonus-trigger > span {
  font-size: 12px;
  font-weight: 900;
}

.partner-bonus-trigger > i {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.partner-bonus-trigger > i > u {
  display: block;
  width: var(--bonus-charge);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d6aff, #64e7c6, #ffe17f);
  box-shadow: 0 0 10px rgba(101, 231, 198, 0.5);
  text-decoration: none;
  transition: width 130ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

.partner-bonus-trigger:active {
  transform: scale(0.94);
}

.partner-milestone-row.is-achieved .partner-bonus-trigger {
  color: #fff0b7;
  border-color: rgba(255, 219, 137, 0.25);
}

.partner-milestone-row.is-boosting .partner-bonus-trigger {
  color: #fff2b8;
  border-color: rgba(125, 226, 204, 0.43);
  box-shadow: 0 0 18px rgba(96, 224, 193, 0.12);
}

.partner-bonus-trigger.is-charged {
  color: #fff7d2;
  border-color: rgba(255, 225, 137, 0.72);
  background: linear-gradient(135deg, rgba(114, 91, 224, 0.24), rgba(231, 178, 54, 0.16));
  box-shadow: 0 0 27px rgba(255, 211, 105, 0.30);
  animation: partnerBonusFlash 520ms ease-out both;
}

@keyframes partnerBonusFlash {
  0% { transform: scale(0.95); filter: brightness(1); }
  44% { transform: scale(1.08); filter: brightness(1.65); }
  100% { transform: scale(1); filter: brightness(1.12); }
}

.partner-boost-spark {
  position: absolute;
  z-index: 5;
  top: 40%;
  left: 50%;
  color: #ffe587;
  font-size: 10px;
  font-style: normal;
  pointer-events: none;
  animation: partnerBoostSpark 650ms var(--boost-spark-delay, 0ms) ease-out both;
}

@keyframes partnerBoostSpark {
  from { transform: translate3d(-50%, 0, 0) scale(0.4); opacity: 1; }
  to { transform: translate3d(calc(-50% + var(--boost-spark-x)), -38px, 0) scale(1.2) rotate(80deg); opacity: 0; }
}

/* Переворачивающееся главное правило и скрытый сейф. */
.partner-safe-card {
  position: relative;
  width: 100%;
  height: 148px;
  perspective: 1000px;
  transition: height 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-safe-card.is-playing {
  height: 405px;
}

.partner-safe-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-safe-inner.is-flipped {
  transform: rotateY(180deg);
}

.partner-safe-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  background: rgba(10, 28, 33, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.partner-safe-front {
  display: grid;
}

.partner-safe-trigger {
  display: grid;
  width: 100%;
  padding: 17px;
  border: 0;
  grid-template-columns: 37px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: inherit;
  background:
    radial-gradient(circle at 4% 20%, rgba(102, 229, 198, 0.10), transparent 33%),
    transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.partner-rule-check {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 13px;
  color: #071613;
  background: #69e4c5;
  box-shadow: 0 0 0 0 rgba(105, 228, 197, 0.28);
  font-weight: 900;
  animation: partnerSafeHint 2.8s ease-in-out infinite;
}

@keyframes partnerSafeHint {
  0%, 65%, 100% { transform: rotate(0) scale(1); box-shadow: 0 0 0 0 rgba(105, 228, 197, 0.24); }
  74% { transform: rotate(-8deg) scale(1.08); box-shadow: 0 0 0 8px rgba(105, 228, 197, 0); }
  84% { transform: rotate(7deg) scale(1.04); }
}

.partner-rule-copy {
  color: rgba(229, 237, 244, 0.70);
  font-size: 10px;
  line-height: 1.52;
}

.partner-rule-copy > strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 12px;
}

.partner-rule-copy > small {
  display: block;
  margin-top: 8px;
  color: rgba(111, 231, 202, 0.67);
  font-size: 8px;
  font-weight: 700;
}

.partner-rule-copy > small i {
  color: #91f0d7;
  font-style: normal;
}

.partner-safe-back {
  display: flex;
  padding: 15px;
  align-items: center;
  flex-direction: column;
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 44%, rgba(95, 223, 192, 0.13), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(126, 91, 228, 0.18), transparent 38%),
    linear-gradient(145deg, #101c27, #090f18);
}

.partner-safe-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}

.partner-safe-head > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #dfe9f1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.partner-safe-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6be5c6;
  box-shadow: 0 0 12px rgba(107, 229, 198, 0.68);
}

.partner-safe-head > button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  place-items: center;
  border-radius: 50%;
  color: rgba(231, 238, 245, 0.72);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
}

.partner-safe-vault {
  position: relative;
  display: grid;
  width: 205px;
  height: 205px;
  margin-top: 9px;
  place-items: center;
  border: 1px solid rgba(138, 155, 177, 0.27);
  border-radius: 29px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 30%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 7px),
    #172331;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.33), inset 0 0 0 8px #0d1721, inset 0 0 0 9px rgba(255, 255, 255, 0.06);
  transition: transform 220ms ease;
}

.partner-safe-vault::before,
.partner-safe-vault::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: #0b121b;
  box-shadow: 181px 0 #0b121b, 0 181px #0b121b, 181px 181px #0b121b;
  top: 8px;
  left: 8px;
}

.partner-safe-vault.is-miss {
  animation: partnerSafeMiss 330ms ease;
}

.partner-safe-vault.is-hit {
  animation: partnerSafeHit 360ms ease;
}

@keyframes partnerSafeMiss {
  20% { transform: translateX(-5px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
}

@keyframes partnerSafeHit {
  40% { transform: scale(1.035); filter: brightness(1.35); }
}

.partner-safe-dial {
  position: relative;
  z-index: 3;
  display: grid;
  width: 132px;
  height: 132px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(169, 188, 207, 0.34);
  place-items: center;
  border-radius: 50%;
  color: #edf7fa;
  background:
    radial-gradient(circle, #263646 0 18%, #111d29 19% 53%, transparent 54%),
    repeating-conic-gradient(from -2deg, rgba(224, 236, 244, 0.45) 0 1deg, transparent 1deg 15deg),
    #0a131d;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35), inset 0 0 0 7px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.partner-safe-dial > b {
  position: relative;
  z-index: 4;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: #111f2c;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32);
  font-family: var(--font-display);
  font-size: 14px;
}

.partner-safe-target {
  --safe-target-start: 64.62deg;
  --safe-target-end: 95.22deg;
  position: absolute;
  z-index: 1;
  inset: 5px;
  border-radius: 50%;
  background: conic-gradient(
    transparent 0 var(--safe-target-start),
    rgba(91, 207, 255, 0.98) var(--safe-target-start) var(--safe-target-end),
    transparent var(--safe-target-end) 1turn
  );
  -webkit-mask: radial-gradient(circle, transparent 0 50%, #000 51% 62%, transparent 63%);
  mask: radial-gradient(circle, transparent 0 50%, #000 51% 62%, transparent 63%);
  filter: drop-shadow(0 0 6px rgba(91, 207, 255, 0.88));
}

.partner-safe-target.is-jumping {
  animation: partnerSafeTargetJump 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes partnerSafeTargetJump {
  0% { opacity: 0.2; transform: scale(0.84) rotate(-7deg); }
  58% { opacity: 1; transform: scale(1.09) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.partner-safe-needle {
  --partner-safe-duration: 2200ms;
  position: absolute;
  z-index: 3;
  bottom: 50%;
  left: calc(50% - 1px);
  width: 3px;
  height: 49px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(to top, #f7fbff, #79f2d0);
  box-shadow: 0 0 8px rgba(102, 238, 201, 0.62);
  transform-origin: 50% 100%;
}

.partner-safe-needle.is-spinning {
  animation: partnerSafeNeedle var(--partner-safe-duration) linear infinite;
}

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

.partner-safe-door {
  position: absolute;
  z-index: 2;
  right: 19px;
  bottom: 17px;
  display: grid;
  width: 43px;
  height: 47px;
  place-items: center;
  border: 1px solid rgba(255, 215, 117, 0.22);
  border-radius: 10px;
  color: #ffd874;
  background: #111b25;
  box-shadow: inset 0 0 0 4px #0b141d;
  transform-origin: 100% 50%;
  transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;
}

.partner-safe-vault.is-open .partner-safe-door {
  transform: perspective(160px) rotateY(-82deg) translateX(8px);
  filter: brightness(1.6);
}

.partner-safe-vault.is-open .partner-safe-dial {
  animation: partnerSafeOpen 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes partnerSafeOpen {
  0% { transform: translateX(0) rotate(0); }
  55% { transform: translateX(-7px) rotate(-7deg); }
  100% { transform: translateX(-16px) rotate(-12deg) scale(0.92); }
}

.partner-safe-progress {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}

.partner-safe-progress i {
  width: 29px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.partner-safe-progress i.is-filled {
  background: #68e3c4;
  box-shadow: 0 0 10px rgba(104, 227, 196, 0.55);
  transform: scaleY(1.25);
}

.partner-safe-status {
  margin-top: 7px;
  color: rgba(226, 235, 243, 0.65);
  font-size: 9px;
  font-weight: 700;
}

.partner-safe-result {
  max-width: 310px;
  margin-top: 8px;
  color: #ffeeb7;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  animation: partnerSafeResult 450ms ease-out both;
}

@keyframes partnerSafeResult {
  from { opacity: 0; transform: translateY(7px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.partner-gold-burst {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.partner-gold-burst i {
  position: absolute;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #7a4c00;
  background: linear-gradient(145deg, #fff1a0, #eca92e);
  box-shadow: 0 0 11px rgba(255, 207, 78, 0.43);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  animation: partnerGoldBurst 1s var(--burst-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes partnerGoldBurst {
  from { transform: translate3d(-50%, -50%, 0) scale(0.3) rotate(0); opacity: 1; }
  to { transform: translate3d(var(--burst-x), var(--burst-y), 0) scale(1) rotate(260deg); opacity: 0; }
}

.partner-money-shower {
  position: absolute;
  z-index: 9;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.partner-money-shower > i {
  position: absolute;
  top: -28px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255, 240, 153, 0.72);
  border-radius: 50%;
  color: #704100;
  background: linear-gradient(145deg, #fff4a5, #e5a02a);
  box-shadow: 0 0 13px rgba(255, 204, 69, 0.42);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  animation: partnerMoneyShower var(--money-duration, 1400ms) var(--money-delay, 0ms) cubic-bezier(0.2, 0.65, 0.35, 1) both;
}

@keyframes partnerMoneyShower {
  0% { opacity: 0; transform: translate3d(0, -30px, 0) rotate(0) scale(0.55); }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--money-drift), 430px, 0) rotate(var(--money-spin)) scale(1); }
}

/* Общий игровой toast. */
.partner-game-toast {
  position: fixed;
  z-index: 2200;
  right: 18px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  left: 18px;
  padding: 13px 15px;
  border: 1px solid rgba(112, 233, 203, 0.32);
  border-radius: 16px;
  color: #e9fff9;
  background: rgba(10, 26, 34, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.97);
}

.partner-game-toast.is-visible {
  animation: partnerToastIn 2.8s ease both;
}

@keyframes partnerToastIn {
  0% { opacity: 0; transform: translateY(18px) scale(0.97); }
  10%, 84% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* Полноэкранная игра с монетами. */
body.partner-game-open {
  overflow: hidden;
}

.partner-coin-game {
  position: fixed;
  z-index: 2000;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  background:
    radial-gradient(circle at 50% 15%, rgba(99, 228, 196, 0.18), transparent 32%),
    radial-gradient(circle at 90% 80%, rgba(126, 91, 231, 0.23), transparent 39%),
    linear-gradient(160deg, #07121c, #090a15 65%, #111029);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.025);
  transition: opacity 260ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 300ms;
}

.partner-coin-game.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition-delay: 0s;
}

.partner-coin-game::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(96, 229, 196, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 229, 196, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.partner-coin-game-top,
.partner-coin-hud {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.partner-coin-game-top {
  padding: calc(18px + env(safe-area-inset-top)) 18px 10px;
}

.partner-coin-game-top > div {
  display: flex;
  flex-direction: column;
}

.partner-coin-game-top small {
  color: #64e2c2;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.partner-coin-game-top strong {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 21px;
}

.partner-coin-game-top > button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  place-items: center;
  border-radius: 50%;
  color: #e9f1f6;
  background: rgba(255, 255, 255, 0.05);
  font-size: 21px;
}

.partner-coin-hud {
  margin: 0 18px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 15px;
  background: rgba(8, 20, 30, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.partner-coin-hud > span {
  color: rgba(226, 235, 243, 0.63);
  font-size: 9px;
  font-weight: 700;
}

.partner-coin-hud b {
  margin-left: 4px;
  color: #fff;
  font-size: 13px;
}

.partner-coin-stop {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(111, 229, 203, 0.25);
  border-radius: 10px;
  color: rgba(234, 255, 249, 0.88);
  background: rgba(81, 196, 170, 0.09);
  font: inherit;
  font-size: 8px;
  font-weight: 850;
}

.partner-coin-stop:active {
  transform: scale(0.96);
  background: rgba(81, 196, 170, 0.17);
}

.partner-coin-bank {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 209, 91, 0.09);
}

.partner-coin-bank > i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #6f4300;
  background: linear-gradient(145deg, #fff0a4, #e9a62d);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.partner-coin-bank.is-catching {
  animation: partnerBankCatch 380ms ease-out;
}

@keyframes partnerBankCatch {
  45% { transform: scale(1.12); filter: brightness(1.35); }
}

.partner-coin-field {
  position: absolute;
  z-index: 2;
  inset: 112px 0 0;
  overflow: hidden;
}

.partner-falling-coin,
.partner-caught-coin {
  display: grid;
  padding: 0;
  border: 2px solid #f7dc78;
  place-items: center;
  border-radius: 50%;
  color: #724500;
  background:
    radial-gradient(circle at 34% 29%, #fff5b5 0 11%, transparent 12%),
    linear-gradient(145deg, #ffe989, #df9221);
  box-shadow: 0 0 0 3px rgba(116, 67, 0, 0.28), 0 8px 16px rgba(0, 0, 0, 0.28), 0 0 19px rgba(255, 197, 53, 0.23);
  font-family: var(--font-display);
  font-weight: 900;
  -webkit-tap-highlight-color: transparent;
}

.partner-falling-coin {
  position: absolute;
  top: -58px;
  font-size: 14px;
  cursor: pointer;
  animation: partnerCoinFall var(--coin-fall-duration, 3300ms) linear forwards;
  will-change: transform;
}

.partner-falling-item {
  z-index: 2;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.partner-falling-item::before {
  content: '';
  position: absolute;
  inset: -11px;
  border-radius: 50%;
}

.partner-falling-bomb::before {
  inset: 0;
}

.partner-falling-bomb {
  position: absolute;
  z-index: 3;
  top: -62px;
  display: grid;
  padding: 0;
  border: 1px solid rgba(255, 126, 105, 0.44);
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(145deg, #313641, #090d12 70%);
  box-shadow:
    0 0 0 4px rgba(236, 76, 67, 0.07),
    0 10px 20px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(255, 91, 68, 0.16);
  font-size: 23px;
  cursor: pointer;
  animation: partnerCoinFall var(--coin-fall-duration, 4700ms) linear forwards;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.partner-falling-item.is-fading {
  animation: partnerCoinFade 180ms ease-out forwards;
}

.partner-falling-bomb.is-exploding {
  z-index: 7;
  animation: partnerBombExplosion 520ms cubic-bezier(0.2, 0.8, 0.25, 1) forwards !important;
}

.partner-coin-game.is-bomb-hit {
  animation: partnerBombScreen 480ms ease both;
}

@keyframes partnerBombExplosion {
  0% { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
  36% { transform: scale(1.7) rotate(-18deg); filter: brightness(2.8); }
  100% { opacity: 0; transform: scale(4.6) rotate(25deg); filter: brightness(0.5); }
}

@keyframes partnerBombScreen {
  18% { transform: translate3d(-5px, 2px, 0); filter: saturate(1.5); }
  36% { transform: translate3d(5px, -2px, 0); }
  54% { transform: translate3d(-3px, 1px, 0); }
  100% { transform: translate3d(0, 0, 0); filter: none; }
}

@keyframes partnerCoinFall {
  0% { transform: translate3d(0, -40px, 0) rotateY(0) rotateZ(-8deg); }
  50% { transform: translate3d(var(--coin-drift), 45vh, 0) rotateY(420deg) rotateZ(14deg); }
  100% { transform: translate3d(0, 105vh, 0) rotateY(840deg) rotateZ(-10deg); }
}

@keyframes partnerCoinFade {
  to { opacity: 0; transform: scale(0.5); }
}

.partner-caught-coin {
  position: fixed;
  z-index: 2150;
  font-size: 13px;
  pointer-events: none;
  transition: transform 430ms cubic-bezier(0.2, 0.75, 0.25, 1), opacity 400ms ease;
}

.partner-coin-finish {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: flex;
  padding: 28px;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(5, 10, 18, 0.78);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 320ms;
}

.partner-coin-finish.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition-delay: 0s;
}

.partner-coin-finish > span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(255, 217, 123, 0.34);
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(121, 90, 232, 0.28), rgba(238, 180, 50, 0.19));
  box-shadow: 0 0 32px rgba(255, 205, 80, 0.12);
  font-size: 36px;
}

.partner-coin-finish > strong {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 24px;
}

.partner-coin-finish > p {
  max-width: 310px;
  margin-top: 9px;
  color: rgba(225, 234, 242, 0.68);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.partner-coin-finish > button {
  min-width: 210px;
  margin-top: 20px;
  padding: 13px 18px;
  border: 1px solid rgba(106, 232, 201, 0.34);
  border-radius: 14px;
  color: #f4fffc;
  background: linear-gradient(135deg, rgba(109, 87, 225, 0.73), rgba(48, 175, 148, 0.60));
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 380px) {
  .partner-level-list::before,
  .partner-level-list::after {
    left: 33px;
  }

  .partner-tier-card {
    padding: 15px;
  }

  .partner-milestone-row {
    grid-template-columns: 43px minmax(0, 1fr) minmax(83px, auto);
    gap: 7px;
  }

  .partner-milestone-row > b {
    width: 39px;
    height: 39px;
  }

  .partner-bonus-trigger {
    min-width: 83px;
    padding-inline: 7px;
  }

  .partner-safe-card.is-playing {
    height: 420px;
  }

  .partner-safe-vault {
    transform: scale(0.94);
    margin-top: 2px;
  }
}

/* V62: выразительный игровой круг активных рефералов. */
.partner-progress-orb {
  isolation: isolate;
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  overflow: visible;
  border: 1px solid rgba(109, 234, 210, 0.34);
  background:
    conic-gradient(
      from -90deg,
      #6ce8cb 0deg,
      #72b9ff var(--partner-progress-angle),
      rgba(123, 151, 177, 0.13) var(--partner-progress-angle),
      rgba(123, 151, 177, 0.13) 360deg
    );
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.27),
    0 0 0 4px rgba(91, 221, 193, 0.035),
    0 0 28px rgba(92, 226, 198, 0.16);
}

.partner-progress-orb::before {
  z-index: 0;
  inset: 6px;
  border: 1px solid rgba(134, 230, 222, 0.14);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.12), transparent 26%),
    radial-gradient(circle at 70% 76%, rgba(103, 112, 242, 0.13), transparent 48%),
    linear-gradient(145deg, #132632, #09121d 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -10px 22px rgba(0, 0, 0, 0.28);
}

.partner-progress-orb::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -5px;
  border: 1px dashed rgba(103, 227, 203, 0.24);
  border-radius: 50%;
  pointer-events: none;
  animation: partnerOrbOrbit 10s linear infinite;
}

.partner-progress-orb strong {
  z-index: 2;
  color: #f4fffd;
  text-shadow:
    0 0 14px rgba(113, 236, 216, 0.30),
    0 3px 8px rgba(0, 0, 0, 0.34);
}

.partner-progress-orb > i {
  z-index: 3;
  top: -3px;
  right: -3px;
  width: 21px;
  height: 21px;
  border-color: #0b1720;
  background: linear-gradient(145deg, #fff4a8, #efb637 58%, #ce8120);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.31),
    0 0 14px rgba(239, 182, 55, 0.26);
}

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

@media (max-width: 380px) {
  .partner-progress-orb {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-progress-orb::after,
  .partner-safe-target.is-jumping {
    animation: none !important;
  }
}

/* V63 final cascade: замки и длинные счётчики поверх прежних тем. */
.partner-tier-card.is-locked .partner-tier-number {
  display: grid;
  place-items: center;
}

.partner-tier-card.is-locked .partner-tier-number::after {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

.partner-progress-orb strong {
  max-width: 48px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.partner-progress-orb[data-digits="3"] strong {
  font-size: 20px;
}

.partner-progress-orb[data-digits="4"] strong {
  font-size: 17px;
}

.partner-progress-orb[data-digits="5plus"] strong {
  font-size: 14px;
}

@media (max-width: 360px) {
  .partner-coin-hud {
    margin-inline: 12px;
    padding-inline: 9px;
  }

  .partner-coin-stop {
    padding-inline: 7px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-money-shower > i,
  .partner-coin-game.is-bomb-hit {
    animation-duration: 1ms !important;
  }
}

/* V63: точное центрирование замков и адаптивное число в круге. */
.partner-tier-card.is-locked .partner-tier-number {
  display: grid;
  place-items: center;
}

.partner-tier-card.is-locked .partner-tier-number::after {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

.partner-progress-orb strong {
  max-width: 48px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.partner-progress-orb[data-digits="3"] strong {
  font-size: 20px;
}

.partner-progress-orb[data-digits="4"] strong {
  font-size: 17px;
}

.partner-progress-orb[data-digits="5plus"] strong {
  font-size: 14px;
}

@media (max-width: 360px) {
  .partner-coin-hud {
    margin-inline: 12px;
    padding-inline: 9px;
  }

  .partner-coin-stop {
    padding-inline: 7px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-money-shower > i,
  .partner-coin-game.is-bomb-hit {
    animation-duration: 1ms !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .partner-tier-top {
    animation: none;
  }

  .partner-tier-card.is-locked .partner-tier-fx,
  .partner-tier-card.is-locked.partner-tier-top {
    animation: none !important;
  }

  .partner-coin-game::before {
    opacity: 0.11;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-inline-hint i,
  .partner-progress-orb > i,
  .partner-tier-elite .partner-tier-fx,
  .partner-tier-top,
  .partner-tier-top .partner-tier-fx::before,
  .partner-tier-top .partner-tier-fx::after,
  .partner-tier-card.is-current .partner-tier-number::before,
  .partner-rule-check,
  .partner-bonus-trigger.is-charged {
    animation: none !important;
  }

  .partner-safe-inner,
  .partner-safe-card,
  .partner-coin-game,
  .partner-coin-finish {
    transition-duration: 1ms !important;
  }
}

*,
*::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: 6px;
  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;
  animation: balanceBadgePulse 4s ease-in-out infinite;
}

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

.balance-wallet-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

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

.balance-badge .plus-icon {
  color: #66e4bd;
  font-size: 17px;
  line-height: 1;
}

.payment-methods-note {
  margin: 12px 3px 0;
  color: rgba(210, 219, 231, 0.58);
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}

@keyframes balanceBadgePulse {
  0%, 100% { transform: scale(1); }
  5% { transform: scale(1.045); }
  10% { transform: scale(1); }
}

/* ========== ВЫВОД РЕФЕРАЛЬНЫХ СРЕДСТВ ========== */
.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;
  }

}

@media (prefers-reduced-motion: reduce) {
  .balance-badge {
    animation: none;
  }

  body::before,
  body::after {
    animation: none;
  }

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

/* ========== UI-ПРАВКИ V55: ЖИВОЙ MINI APP ========== */
.new-header {
  overflow: visible;
}

.avatar-discovery {
  position: fixed;
  z-index: 1100;
  top: 66px;
  left: 15px;
  display: flex;
  width: min(260px, calc(100vw - 30px));
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(111, 237, 207, 0.28);
  border-radius: 19px;
  color: #fff;
  background:
    radial-gradient(circle at 9% 50%, rgba(119, 96, 242, 0.30), transparent 34%),
    linear-gradient(125deg, rgba(21, 23, 38, 0.96), rgba(13, 39, 42, 0.95));
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 28px rgba(78, 224, 188, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(-18px, -8px, 0) rotate(-3deg) scale(0.92);
  transform-origin: 22px -9px;
  pointer-events: none;
}

.avatar-discovery::before {
  position: absolute;
  top: -7px;
  left: 21px;
  width: 13px;
  height: 13px;
  border-top: 1px solid rgba(111, 237, 207, 0.28);
  border-left: 1px solid rgba(111, 237, 207, 0.28);
  background: #171a29;
  content: '';
  transform: rotate(45deg);
}

.avatar-discovery.is-visible {
  visibility: visible;
  animation:
    avatarHintArrival 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
    avatarHintFloat 1100ms 420ms ease-in-out infinite alternate;
}

.avatar-discovery.is-leaving {
  visibility: visible;
  animation: avatarHintLeave 400ms ease forwards;
}

.avatar-discovery > span:last-child {
  display: flex;
  flex-direction: column;
  color: rgba(238, 242, 248, 0.62);
  font-size: 10px;
  line-height: 1.35;
}

.avatar-discovery strong {
  margin-bottom: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
}

.avatar-discovery-orbit {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 239, 208, 0.20), transparent 67%);
}

.avatar-discovery-orbit i {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(115, 239, 208, 0.63);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(88, 229, 195, 0.20);
  animation: avatarOrbitWhirl 950ms linear infinite;
}

.avatar-discovery-orbit i:nth-child(2) {
  width: 31px;
  height: 14px;
  border-color: rgba(147, 124, 255, 0.58);
  animation-direction: reverse;
  animation-duration: 1250ms;
}

.avatar-discovery-orbit i:nth-child(3) {
  width: 8px;
  height: 8px;
  border: 0;
  background: #7aebcd;
  box-shadow: 0 0 13px #5bd9b9;
  animation: avatarOrbitPulse 720ms ease-in-out infinite alternate;
}

@keyframes avatarHintArrival {
  0% { opacity: 0; transform: translate3d(-22px, -10px, 0) rotate(-5deg) scale(0.88); filter: blur(5px); }
  65% { opacity: 1; transform: translate3d(4px, 1px, 0) rotate(1.5deg) scale(1.02); filter: blur(0); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); filter: blur(0); }
}

@keyframes avatarHintFloat {
  from { opacity: 1; transform: translate3d(0, 0, 0) rotate(-0.7deg); }
  to { opacity: 1; transform: translate3d(5px, 2px, 0) rotate(0.7deg); }
}

@keyframes avatarHintLeave {
  from { opacity: 1; transform: translate3d(2px, 1px, 0) rotate(0); filter: blur(0); }
  to { opacity: 0; transform: translate3d(-13px, -8px, 0) rotate(-4deg) scale(0.92); filter: blur(4px); }
}

@keyframes avatarOrbitWhirl {
  to { transform: rotate(360deg) scaleX(0.76); }
}

@keyframes avatarOrbitPulse {
  from { transform: scale(0.72); opacity: 0.55; }
  to { transform: scale(1.28); opacity: 1; }
}

.action-buttons .secondary-btn {
  display: flex;
  width: 100%;
  height: 68px;
  min-height: 68px;
  margin: 0;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
}

.action-buttons .bonuses-home-btn {
  height: 68px;
  min-height: 68px;
  justify-content: center;
}

.action-buttons .bonuses-home-btn > span:first-child {
  width: 100%;
  text-align: center;
}

.action-buttons .bonuses-home-btn .bonuses-home-arrow {
  position: absolute;
  right: 18px;
}

.home-action-reveal {
  opacity: 0;
  transform: translate3d(0, -22px, 0) scale(0.985);
  transition:
    opacity 430ms ease,
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms ease,
    border-color 180ms ease;
  transition-delay: calc(var(--home-action-index, 0) * 55ms);
}

.home-action-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.custom-amount-field {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
}

.custom-amount-field #custom-amount {
  width: 100%;
  height: 100%;
}

.custom-amount-error {
  position: absolute;
  z-index: 12;
  bottom: calc(100% + 10px);
  left: 8px;
  width: max-content;
  max-width: min(250px, calc(100vw - 54px));
  padding: 9px 11px;
  border: 1px solid rgba(255, 160, 103, 0.36);
  border-radius: 11px;
  color: #ffe0cc;
  background:
    linear-gradient(135deg, rgba(75, 35, 39, 0.98), rgba(43, 28, 35, 0.98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34), 0 0 20px rgba(255, 109, 77, 0.08);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px) scale(0.96);
  transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
  pointer-events: none;
}

.custom-amount-error::after {
  position: absolute;
  bottom: -5px;
  left: 18px;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(255, 160, 103, 0.36);
  border-bottom: 1px solid rgba(255, 160, 103, 0.36);
  background: #4d252b;
  content: '';
  transform: rotate(45deg);
}

.custom-amount-field.has-error .custom-amount-error {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-amount-field.has-error {
  animation: customAmountNo 480ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.custom-amount-field.has-error #custom-amount {
  border-color: rgba(255, 132, 91, 0.78);
  background:
    linear-gradient(110deg, rgba(135, 48, 49, 0.19), rgba(255, 146, 79, 0.08)),
    rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 3px rgba(255, 103, 72, 0.09), 0 0 22px rgba(255, 103, 72, 0.11);
}

@keyframes customAmountNo {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

#payment-methods-sub-menu {
  overflow: visible;
}

#payment-methods-sub-menu .purchase-primary-cta {
  position: relative;
  display: flex;
  min-height: 62px;
  overflow: hidden;
  padding: 15px 15px 15px 19px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(138, 239, 214, 0.46);
  background:
    linear-gradient(105deg, #6755e7 0%, #7461ef 27%, #279f92 67%, #6c58e5 100%);
  background-size: 260% 100%;
  box-shadow:
    0 15px 35px rgba(69, 51, 181, 0.32),
    0 0 24px rgba(65, 215, 181, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation: purchaseCtaFlow 4.8s ease-in-out infinite;
}

#payment-methods-sub-menu .purchase-primary-cta::before {
  position: absolute;
  top: -80%;
  left: -25%;
  width: 35%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.20), transparent);
  content: '';
  transform: rotate(17deg);
  animation: purchaseCtaGleam 3.6s ease-in-out infinite;
}

#main-buy-btn-text,
.purchase-cta-arrow {
  position: relative;
  z-index: 1;
}

#main-buy-btn-text {
  font-size: 13px;
}

#main-buy-price,
#stars-buy-price {
  display: inline-block;
  min-width: 1ch;
  font-family: var(--font-display);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

#main-buy-price.is-counting,
#stars-buy-price.is-counting {
  animation: paymentDigitRoll 210ms ease-in-out infinite alternate;
}

.purchase-cta-arrow {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  background: rgba(9, 14, 25, 0.18);
  font-size: 15px;
}

#payment-methods-sub-menu .purchase-stars-btn {
  position: relative;
  display: flex;
  min-height: 54px;
  overflow: visible;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(232, 193, 104, 0.28);
  color: #fff !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 205, 91, 0.10), transparent 32%),
    linear-gradient(135deg, rgba(33, 30, 49, 0.98), rgba(29, 31, 39, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: none;
}

.purchase-stars-icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  color: #ffd568;
  background: rgba(255, 208, 88, 0.08);
  box-shadow: 0 0 17px rgba(255, 204, 80, 0.18);
  font-size: 15px;
  transform-style: preserve-3d;
  animation: starsNativePulse 4.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.purchase-stars-spark {
  position: absolute;
  z-index: 6;
  top: 48%;
  left: 50%;
  color: #ffdc7c;
  font-size: 12px;
  font-style: normal;
  text-shadow: 0 0 10px rgba(255, 203, 83, 0.85);
  opacity: 0;
  pointer-events: none;
  animation: starsSparkFly 720ms var(--spark-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#payment-methods-sub-menu .buy-crypto-btn {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.payment-brand-icons {
  display: inline-flex;
  align-items: center;
}

.payment-brand-icons > * {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  margin-left: -5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #17242a;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.28);
  font-style: normal;
}

.payment-brand-icons > *:first-child {
  margin-left: 0;
}

.payment-brand-icons img {
  padding: 4px;
  object-fit: contain;
  filter: none;
}

.payment-brand-ton {
  color: #75cfff;
  font-size: 6px;
  font-weight: 850;
}

.payment-brand-usdt {
  color: #66e4bd;
  font-size: 13px;
  font-weight: 850;
}

#payment-menu-collapse-btn.payment-menu-toggle-link {
  display: none;
  width: auto;
  min-height: 34px;
  margin: 3px auto 0;
  padding: 7px 12px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  color: rgba(237, 240, 247, 0.55) !important;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 650;
  text-decoration: none;
}

#payment-menu-collapse-btn.payment-menu-toggle-link:active {
  color: #75e9c9 !important;
  transform: translateY(1px);
}

@keyframes purchaseCtaFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes purchaseCtaGleam {
  0%, 58% { opacity: 0; transform: translateX(-130%) rotate(17deg); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(470%) rotate(17deg); }
}

@keyframes paymentDigitRoll {
  from { opacity: 0.64; transform: translateY(2px) scale(0.98); filter: blur(0.35px); }
  to { opacity: 1; transform: translateY(-1px) scale(1.025); filter: blur(0); }
}

@keyframes starsNativePulse {
  0%, 70%, 100% { transform: rotateY(0) scale(1); }
  78% { transform: rotateY(180deg) scale(1.14); }
  86% { transform: rotateY(360deg) scale(1); }
  92% { transform: rotateY(360deg) scale(1.10); }
}

@keyframes starsSparkFly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) rotate(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(1.2) rotate(140deg); }
}

/* Единый стеклянный стиль встроенных модальных окон */
.xvpn-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.xvpn-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(2, 5, 10, 0.76);
  backdrop-filter: blur(12px) saturate(0.85);
  -webkit-backdrop-filter: blur(12px) saturate(0.85);
}

.xvpn-modal-card {
  position: relative;
  width: min(100%, 350px);
  overflow: hidden;
  padding: 27px 23px 23px;
  border: 1px solid rgba(137, 121, 241, 0.30);
  border-radius: 27px;
  background:
    radial-gradient(circle at 95% 3%, rgba(74, 225, 187, 0.17), transparent 39%),
    radial-gradient(circle at 0% 100%, rgba(121, 98, 239, 0.20), transparent 44%),
    rgba(15, 20, 30, 0.97);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

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

.device-modal-sheet {
  padding: 27px 23px 23px;
  border-radius: 27px;
  background:
    radial-gradient(circle at 95% 3%, rgba(74, 225, 187, 0.17), transparent 39%),
    radial-gradient(circle at 0% 100%, rgba(121, 98, 239, 0.20), transparent 44%),
    rgba(15, 20, 30, 0.97);
  animation: xvpnModalCardIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.xvpn-modal-close,
.bonuses-development-close {
  position: absolute;
  z-index: 2;
  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.66);
  background: rgba(255, 255, 255, 0.055);
  font: 300 25px/1 var(--font-body);
}

.xvpn-modal-mark {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgba(113, 235, 204, 0.28);
  border-radius: 17px;
  color: #79ebca;
  background: linear-gradient(145deg, rgba(116, 94, 237, 0.25), rgba(51, 209, 173, 0.16));
  box-shadow: 0 0 25px rgba(59, 214, 176, 0.10);
  font-size: 21px;
}

.device-modal-sheet h3 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.04em;
}

.device-modal-sheet p {
  max-width: 260px;
  color: rgba(236, 239, 246, 0.57);
  font-size: 11px;
  line-height: 1.55;
}

#device-name-input {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}

#device-name-input:focus {
  border-color: rgba(111, 231, 202, 0.50);
  box-shadow: 0 0 0 3px rgba(81, 220, 184, 0.09);
}

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

.device-modal-save {
  background: linear-gradient(135deg, #6958e8, #309e92);
  box-shadow: 0 9px 22px rgba(53, 79, 155, 0.20);
}

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

@media (max-width: 360px) {
  .avatar-discovery {
    left: 10px;
    width: min(250px, calc(100vw - 20px));
  }

  .custom-amount-container {
    align-items: stretch;
  }

  .custom-amount-container .action-btn {
    padding-inline: 16px;
  }

  .payment-brand-icons > * {
    width: 21px;
    height: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-discovery.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .avatar-discovery.is-leaving {
    animation: none;
    opacity: 0;
  }

  .avatar-discovery-orbit i,
  .home-action-reveal,
  .purchase-stars-icon,
  #payment-methods-sub-menu .purchase-primary-cta,
  #payment-methods-sub-menu .purchase-primary-cta::before,
  #main-buy-price.is-counting,
  #stars-buy-price.is-counting,
  .purchase-stars-spark,
  .custom-amount-field.has-error,
  .device-modal-sheet {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .home-action-reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* ========== РЕФЕРАЛЬНАЯ ПРОГРАММА: ИНТЕРАКТИВНЫЙ СЛОЙ 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));
}

.referral-coin-burst .referral-css-coin {
  display: grid;
  width: var(--coin-size);
  height: var(--coin-size);
  place-items: center;
  box-sizing: border-box;
  border: 1px solid rgba(255, 243, 163, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #fff8bf 0 11%, transparent 12%),
    radial-gradient(circle at 38% 32%, #ffe983 0 18%, #f2b72e 48%, #a96708 100%);
  color: #714300;
  font-family: Arial, sans-serif;
  font-size: calc(var(--coin-size) * 0.56);
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset -1px -1px 2px rgba(92, 48, 0, 0.38),
    inset 1px 1px 2px rgba(255, 255, 224, 0.72),
    0 0 11px rgba(255, 190, 50, 0.33);
}

.referral-coin-burst .referral-css-coin span {
  transform: translateY(-0.2px);
}

.referral-coin-burst .referral-coin-spark {
  color: #fff0a3;
  font-size: 13px;
  text-shadow: 0 0 8px rgba(255, 209, 82, 0.72);
}

@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;
  }
}

/* V55 должен оставаться последним слоем каскада поверх прежних тем. */
#payment-methods-sub-menu .purchase-primary-cta {
  background:
    linear-gradient(105deg, #6755e7 0%, #7461ef 27%, #279f92 67%, #6c58e5 100%);
  background-size: 260% 100%;
  border-color: rgba(138, 239, 214, 0.46);
  box-shadow:
    0 15px 35px rgba(69, 51, 181, 0.32),
    0 0 24px rgba(65, 215, 181, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation: purchaseCtaFlow 4.8s ease-in-out infinite;
}

#payment-methods-sub-menu .purchase-stars-btn {
  border-color: rgba(232, 193, 104, 0.28);
  color: #fff !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 205, 91, 0.10), transparent 32%),
    linear-gradient(135deg, rgba(33, 30, 49, 0.98), rgba(29, 31, 39, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: none;
}

.xvpn-modal .xvpn-modal-backdrop {
  background: rgba(2, 5, 10, 0.76);
  backdrop-filter: blur(12px) saturate(0.85);
  -webkit-backdrop-filter: blur(12px) saturate(0.85);
}

.xvpn-modal .xvpn-modal-card {
  width: min(100%, 350px);
  padding: 27px 23px 23px;
  border: 1px solid rgba(137, 121, 241, 0.30);
  border-radius: 27px;
  background:
    radial-gradient(circle at 95% 3%, rgba(74, 225, 187, 0.17), transparent 39%),
    radial-gradient(circle at 0% 100%, rgba(121, 98, 239, 0.20), transparent 44%),
    rgba(15, 20, 30, 0.97);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

@media (prefers-reduced-motion: reduce) {
  #payment-methods-sub-menu .purchase-primary-cta {
    animation: none;
  }
}

/* ========== UI-ПРАВКИ V56: РАВНЫЕ КНОПКИ И МОБИЛЬНАЯ ОПТИМИЗАЦИЯ ========== */
#payment-methods-sub-menu > button {
  width: 100%;
  height: 66px;
  min-height: 66px;
  max-height: 66px;
  margin: 0;
  padding-block: 12px;
}

#payment-methods-sub-menu .purchase-primary-cta {
  padding-inline: 54px;
  justify-content: center;
  text-align: center;
}

#payment-methods-sub-menu .purchase-stars-btn,
#payment-methods-sub-menu .buy-crypto-btn {
  justify-content: center;
  text-align: center;
}

.purchase-cta-arrow {
  position: absolute;
  right: 16px;
}

.bonuses-home-btn > span:first-child {
  width: 100%;
  padding-inline: 38px;
  text-align: center;
}

.bonuses-home-btn .bonuses-home-arrow {
  position: absolute;
  right: 18px;
}

@keyframes avatarHintMobileIn {
  from { opacity: 0; transform: translate3d(0, -12px, 0) scale(0.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@media (hover: none) and (pointer: coarse), (max-width: 600px) {
  body {
    background:
      radial-gradient(circle at 12% 14%, rgba(112, 88, 245, 0.25), transparent 34%),
      radial-gradient(circle at 88% 33%, rgba(45, 202, 171, 0.19), transparent 38%),
      radial-gradient(circle at 48% 88%, rgba(57, 91, 198, 0.17), transparent 42%),
      #050509;
    background-attachment: scroll;
  }

  body::before,
  body::after {
    display: none;
  }

  .new-header {
    background: rgba(7, 10, 16, 0.90);
  }

  .new-header,
  .settings-btn,
  .balance-badge,
  .glass-card,
  .secondary-btn,
  .subscription-overview,
  .topup-panel,
  .payment-methods-panel,
  .tariff-picker-panel,
  .purchase-config-card,
  .purchase-buttons-container,
  .referral-metric,
  .referral-progress-card,
  .referral-share-card,
  .devices-snake-head,
  .devices-snake-ready,
  .xvpn-modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .main-logo {
    animation: none;
    filter:
      drop-shadow(0 0 24px rgba(255, 255, 255, 0.56))
      drop-shadow(0 0 44px rgba(255, 255, 255, 0.32));
  }

  .bonuses-home-btn::before,
  #payment-methods-sub-menu .purchase-primary-cta,
  #payment-methods-sub-menu .purchase-primary-cta::before,
  #bonuses-screen::before {
    animation: none !important;
  }

  #payment-methods-sub-menu .purchase-primary-cta {
    background-position: 52% 50%;
  }

  #bonuses-screen::before {
    filter: none;
    opacity: 0.20;
  }

  .avatar-discovery.is-visible {
    animation: avatarHintMobileIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .avatar-discovery.is-leaving {
    animation: avatarHintLeave 260ms ease forwards;
  }

  .home-action-reveal {
    transition:
      opacity 360ms ease,
      transform 440ms cubic-bezier(0.16, 1, 0.3, 1),
      background-color 160ms ease,
      border-color 160ms ease;
  }
}

/* ========== V60: РАЗДЕЛЬНАЯ ОПЛАТА И ЖИВЫЕ ПАРТНЁРСКИЕ УРОВНИ ========== */

#payment-methods-sub-menu .payment-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #fff !important;
  text-align: left;
}

#payment-methods-sub-menu .buy-sbp-btn {
  background:
    radial-gradient(circle at 12% 18%, rgba(64, 165, 235, 0.19), transparent 34%),
    linear-gradient(135deg, rgba(24, 64, 91, 0.97), rgba(20, 75, 72, 0.95));
  border-color: rgba(72, 179, 225, 0.31);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#payment-methods-sub-menu .buy-crypto-btn {
  color: #fff !important;
  background:
    radial-gradient(circle at 86% 18%, rgba(72, 224, 187, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(19, 43, 51, 0.98), rgba(16, 62, 59, 0.96));
  border-color: rgba(83, 219, 187, 0.27);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.payment-provider-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.payment-provider-copy strong {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.payment-provider-copy small {
  color: rgba(224, 236, 241, 0.59);
  font-size: 9px;
  font-weight: 600;
}

#payment-methods-sub-menu .buy-sbp-btn .payment-brand-icons > * {
  width: 29px;
  height: 29px;
  margin-left: 0;
}

#payment-methods-sub-menu .payment-provider-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

#payment-methods-sub-menu .payment-provider-btn.is-loading .payment-brand-icons {
  animation: paymentProviderLoading 720ms ease-in-out infinite alternate;
}

@keyframes paymentProviderLoading {
  from { transform: scale(0.92); opacity: 0.58; }
  to { transform: scale(1.05); opacity: 1; }
}

#partner-level-screen {
  --partner-accent: #67e4c4;
  --partner-accent-rgb: 103, 228, 196;
}

#partner-level-screen[data-current-tier="pro"] {
  --partner-accent: #9a82ff;
  --partner-accent-rgb: 154, 130, 255;
}

#partner-level-screen[data-current-tier="elite"] {
  --partner-accent: #63b9ff;
  --partner-accent-rgb: 99, 185, 255;
}

#partner-level-screen[data-current-tier="top_partner"] {
  --partner-accent: #ffd57a;
  --partner-accent-rgb: 255, 213, 122;
}

#partner-level-screen.active > .back-btn,
#partner-level-screen.active .partner-level-hero,
#partner-level-screen.active .partner-level-progress-card,
#partner-level-screen.active .partner-tier-card,
#partner-level-screen.active .partner-milestones-card,
#partner-level-screen.active .partner-level-rule {
  animation: none;
}

#partner-level-screen .partner-motion {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 520ms ease var(--partner-motion-delay, 0ms),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1) var(--partner-motion-delay, 0ms),
    border-color 220ms ease,
    background-color 220ms ease;
}

#partner-level-screen .partner-motion.is-motion-pending {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
}

#partner-level-screen .partner-motion.is-motion-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.partner-level-hero {
  isolation: isolate;
  min-height: 190px;
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--partner-accent-rgb), 0.22), transparent 38%),
    radial-gradient(circle at 10% 100%, rgba(120, 91, 238, 0.19), transparent 44%),
    linear-gradient(132deg, rgba(45, 35, 91, 0.97), rgba(8, 31, 37, 0.98));
}

.partner-hero-aurora {
  position: absolute;
  z-index: -1;
  top: -96px;
  right: -68px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(var(--partner-accent-rgb), 0.14);
  border-radius: 50%;
  pointer-events: none;
  animation: partnerAuroraOrbit 16s linear infinite;
}

.partner-hero-aurora i {
  position: absolute;
  border: 1px solid rgba(153, 126, 255, 0.11);
  border-radius: 50%;
}

.partner-hero-aurora i:first-child {
  inset: 32px;
}

.partner-hero-aurora i:last-child {
  inset: 67px;
  border-color: rgba(var(--partner-accent-rgb), 0.18);
}

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

.partner-level-kicker span {
  background: var(--partner-accent);
  box-shadow: 0 0 13px rgba(var(--partner-accent-rgb), 0.76);
  animation: partnerSignalPulse 2.2s ease-in-out infinite;
}

@keyframes partnerSignalPulse {
  0%, 100% { transform: scale(0.82); opacity: 0.62; }
  50% { transform: scale(1.18); opacity: 1; }
}

.partner-level-emblem {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-color: rgba(var(--partner-accent-rgb), 0.43);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.22), transparent 22%),
    linear-gradient(145deg, rgba(126, 92, 232, 0.88), rgba(var(--partner-accent-rgb), 0.60));
  box-shadow:
    0 14px 36px rgba(9, 7, 35, 0.37),
    0 0 28px rgba(var(--partner-accent-rgb), 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.partner-level-emblem > span {
  position: relative;
  z-index: 2;
}

.partner-level-emblem > i {
  position: absolute;
  z-index: -1;
  inset: -9px;
  border: 1px solid rgba(var(--partner-accent-rgb), 0.20);
  border-radius: 28px;
  animation: partnerEmblemOrbit 8s linear infinite;
}

.partner-level-emblem > i:nth-child(2) {
  inset: -17px;
  border-color: rgba(151, 124, 255, 0.12);
  border-radius: 33px;
  animation-direction: reverse;
  animation-duration: 12s;
}

@keyframes partnerEmblemOrbit {
  50% { transform: rotate(180deg) scale(1.04); }
  to { transform: rotate(360deg); }
}

.partner-level-progress-card {
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  border-color: rgba(var(--partner-accent-rgb), 0.20);
  background:
    radial-gradient(circle at 2% 50%, rgba(var(--partner-accent-rgb), 0.08), transparent 35%),
    rgba(11, 22, 33, 0.97);
}

.partner-level-count {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.partner-level-count > span {
  color: rgba(226, 235, 243, 0.57);
  font-size: 8px;
  text-align: center;
}

.partner-progress-orb {
  --partner-progress-angle: 0deg;
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--partner-accent) 0deg,
      var(--partner-accent) var(--partner-progress-angle),
      rgba(255, 255, 255, 0.08) var(--partner-progress-angle),
      rgba(255, 255, 255, 0.08) 360deg
    );
  box-shadow: 0 0 24px rgba(var(--partner-accent-rgb), 0.12);
}

.partner-progress-orb::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  background: #0d1923;
}

.partner-progress-orb strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 23px;
}

.partner-level-track {
  position: relative;
  height: 7px;
}

.partner-level-track i {
  background: linear-gradient(90deg, #8e6dff, var(--partner-accent));
  box-shadow: 0 0 15px rgba(var(--partner-accent-rgb), 0.45);
}

.partner-level-list {
  position: relative;
}

.partner-level-list::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 78px;
  bottom: 25px;
  left: 35px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(103, 228, 196, 0.36),
    rgba(151, 124, 255, 0.24),
    rgba(255, 213, 122, 0.22)
  );
}

.partner-tier-card {
  --tier-accent: #67e4c4;
  z-index: 1;
  isolation: isolate;
  grid-template-areas: 'number copy';
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--tier-accent) 9%, transparent), transparent 38%),
    linear-gradient(135deg, rgba(22, 27, 43, 0.98), rgba(9, 28, 34, 0.98));
  opacity: 0.77;
}

.partner-tier-pro { --tier-accent: #9a82ff; }
.partner-tier-elite { --tier-accent: #63b9ff; }
.partner-tier-top { --tier-accent: #ffd57a; }

.partner-tier-card.is-achieved {
  opacity: 0.91;
}

.partner-tier-card.is-current {
  grid-template-areas:
    'badge badge'
    'number copy';
  grid-template-rows: auto auto;
  gap: 10px 12px;
  border-color: color-mix(in srgb, var(--tier-accent) 66%, transparent);
  opacity: 1;
  box-shadow:
    0 18px 42px rgba(4, 12, 24, 0.29),
    inset 0 0 0 1px color-mix(in srgb, var(--tier-accent) 14%, transparent);
  transform: none;
}

.partner-tier-card.is-current::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -110%;
  bottom: -110%;
  left: -32%;
  width: 23%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.10),
    transparent
  );
  transform: rotate(18deg) translateX(-220%);
  animation: partnerTierSheen 5.4s ease-in-out infinite;
  pointer-events: none;
}

.partner-tier-card.is-current::after {
  content: '';
  position: absolute;
  inset: auto -24px -34px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tier-accent) 17%, transparent), transparent 68%);
  animation: partnerTierGlow 3.2s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes partnerTierSheen {
  0%, 62% { transform: rotate(18deg) translateX(-220%); opacity: 0; }
  72% { opacity: 1; }
  92%, 100% { transform: rotate(18deg) translateX(720%); opacity: 0; }
}

@keyframes partnerTierGlow {
  0%, 100% { transform: scale(0.82); opacity: 0.32; }
  50% { transform: scale(1.15); opacity: 0.72; }
}

.partner-tier-card.is-current > .partner-tier-current-badge {
  display: inline-flex;
}

.partner-tier-current-badge {
  grid-area: badge;
  display: none;
  width: max-content;
  align-items: center;
  justify-self: end;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--tier-accent) 31%, transparent);
  border-radius: 999px;
  color: var(--tier-accent);
  background: color-mix(in srgb, var(--tier-accent) 9%, rgba(7, 18, 25, 0.82));
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.partner-tier-current-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: partnerCurrentDot 1.8s ease-in-out infinite;
}

@keyframes partnerCurrentDot {
  0%, 100% { transform: scale(0.72); opacity: 0.55; }
  50% { transform: scale(1.18); opacity: 1; }
}

.partner-tier-number {
  grid-area: number;
  width: 42px;
  height: 42px;
  border-color: color-mix(in srgb, var(--tier-accent) 25%, transparent);
  color: color-mix(in srgb, var(--tier-accent) 76%, white);
  background: color-mix(in srgb, var(--tier-accent) 7%, rgba(255, 255, 255, 0.025));
  position: relative;
  z-index: 1;
}

.partner-tier-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
}

.partner-tier-copy > div strong {
  color: var(--tier-accent);
}

.partner-tier-copy h4 {
  line-height: 1.08;
}

.partner-milestone-row {
  position: relative;
  transition: opacity 220ms ease, transform 220ms ease;
}

.partner-milestone-row.is-achieved b {
  color: #071613;
  background: #69e4c5;
  box-shadow: 0 0 18px rgba(105, 228, 197, 0.22);
}

.partner-milestone-row.is-achieved b::after {
  content: '✓';
  position: absolute;
  top: 8px;
  left: 27px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 2px solid #14202a;
  border-radius: 50%;
  color: #071613;
  background: #a8f5df;
  font-size: 8px;
}

.partner-milestone-row.is-next {
  transform: translateX(3px);
}

.partner-milestone-row.is-next strong {
  text-shadow: 0 0 15px rgba(255, 219, 137, 0.28);
}

@media (max-width: 380px) {
  .payment-provider-copy strong {
    font-size: 12px;
  }

  .payment-provider-copy small {
    font-size: 8px;
  }

  .partner-level-progress-card {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 15px;
  }

  .partner-progress-orb {
    width: 55px;
    height: 55px;
    flex-basis: 55px;
  }

  .partner-tier-copy > div {
    align-items: flex-start;
  }

  .partner-tier-copy h4 {
    font-size: 14px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .partner-tier-card.is-current::before,
  .partner-tier-card.is-current::after,
  #payment-methods-sub-menu .payment-provider-btn.is-loading .payment-brand-icons {
    animation: none !important;
  }

  .partner-hero-aurora {
    animation-duration: 24s;
  }

  .partner-level-emblem > i {
    animation-duration: 14s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-hero-aurora,
  .partner-level-kicker span,
  .partner-level-emblem > i,
  .partner-tier-card.is-current::before,
  .partner-tier-card.is-current::after,
  .partner-tier-current-badge i,
  #payment-methods-sub-menu .payment-provider-btn.is-loading .payment-brand-icons {
    animation: none !important;
  }

  #partner-level-screen .partner-motion,
  #partner-level-screen .partner-motion.is-motion-pending,
  #partner-level-screen .partner-motion.is-motion-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* V61 final cascade: лиги и игровая копилка поверх прежних тем. */
.partner-level-list::before {
  top: var(--partner-timeline-top);
  bottom: var(--partner-timeline-bottom);
  left: 36px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(118, 137, 158, 0.31) 0 6px,
    transparent 6px 12px
  );
}

.partner-tier-card {
  min-height: 126px;
  padding: 17px;
  opacity: 1;
}

.partner-tier-start {
  border-color: rgba(103, 228, 196, 0.30);
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 213, 184, 0.09), transparent 38%),
    linear-gradient(140deg, rgba(20, 31, 39, 0.98), rgba(10, 28, 31, 0.98));
}

.partner-tier-pro {
  border-color: rgba(155, 128, 255, 0.40);
  background:
    radial-gradient(circle at 86% 12%, rgba(156, 119, 255, 0.24), transparent 39%),
    radial-gradient(circle at 4% 100%, rgba(95, 58, 188, 0.20), transparent 45%),
    linear-gradient(135deg, rgba(39, 25, 72, 0.98), rgba(16, 23, 48, 0.99));
}

.partner-tier-elite {
  border-color: rgba(79, 164, 255, 0.43);
  background:
    radial-gradient(circle at 88% 8%, rgba(62, 165, 255, 0.20), transparent 36%),
    linear-gradient(135deg, rgba(8, 33, 67, 0.99), rgba(7, 17, 38, 0.99));
}

.partner-tier-top {
  border-color: rgba(255, 207, 100, 0.54);
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 205, 88, 0.21), transparent 37%),
    radial-gradient(circle at 2% 100%, rgba(147, 92, 21, 0.17), transparent 44%),
    linear-gradient(135deg, rgba(42, 31, 21, 0.99), rgba(17, 24, 31, 0.99));
}

.partner-tier-card.is-achieved {
  opacity: 0.93;
}

.partner-tier-card.is-locked {
  opacity: 0.48;
  border-color: rgba(150, 161, 178, 0.17);
  box-shadow: none;
}

.partner-tier-card.is-current {
  opacity: 1;
}

.partner-milestones-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 4%, rgba(255, 204, 83, 0.13), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(104, 78, 211, 0.18), transparent 44%),
    linear-gradient(140deg, rgba(35, 29, 69, 0.98), rgba(9, 29, 34, 0.98));
}

.partner-milestone-row {
  grid-template-columns: 47px minmax(0, 1fr) minmax(91px, auto);
  min-height: 66px;
  gap: 10px;
  padding: 10px 0;
}

.partner-milestone-row.is-achieved .partner-bonus-trigger {
  color: #fff0b7;
}

@media (max-width: 380px) {
  .partner-level-list::before {
    left: 33px;
  }

  .partner-tier-card {
    padding: 15px;
  }

  .partner-milestone-row {
    grid-template-columns: 43px minmax(0, 1fr) minmax(83px, auto);
    gap: 7px;
  }
}

/* V62 final cascade: новый круг должен перекрывать базовую тему V60. */
.partner-progress-orb {
  isolation: isolate;
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  overflow: visible;
  border: 1px solid rgba(109, 234, 210, 0.34);
  background:
    conic-gradient(
      from -90deg,
      #6ce8cb 0deg,
      #72b9ff var(--partner-progress-angle),
      rgba(123, 151, 177, 0.13) var(--partner-progress-angle),
      rgba(123, 151, 177, 0.13) 360deg
    );
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.27),
    0 0 0 4px rgba(91, 221, 193, 0.035),
    0 0 28px rgba(92, 226, 198, 0.16);
}

.partner-progress-orb::before {
  z-index: 0;
  inset: 6px;
  border: 1px solid rgba(134, 230, 222, 0.14);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.12), transparent 26%),
    radial-gradient(circle at 70% 76%, rgba(103, 112, 242, 0.13), transparent 48%),
    linear-gradient(145deg, #132632, #09121d 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -10px 22px rgba(0, 0, 0, 0.28);
}

.partner-progress-orb::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -5px;
  border: 1px dashed rgba(103, 227, 203, 0.24);
  border-radius: 50%;
  pointer-events: none;
  animation: partnerOrbOrbit 10s linear infinite;
}

.partner-progress-orb strong {
  z-index: 2;
  color: #f4fffd;
  text-shadow:
    0 0 14px rgba(113, 236, 216, 0.30),
    0 3px 8px rgba(0, 0, 0, 0.34);
}

.partner-progress-orb > i {
  z-index: 3;
  top: -3px;
  right: -3px;
  width: 21px;
  height: 21px;
  border-color: #0b1720;
  background: linear-gradient(145deg, #fff4a8, #efb637 58%, #ce8120);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.31),
    0 0 14px rgba(239, 182, 55, 0.26);
}

@media (max-width: 380px) {
  .partner-progress-orb {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-progress-orb::after,
  .partner-safe-target.is-jumping {
    animation: none !important;
  }
}

/* V63 final cascade: замки и длинные счётчики поверх прежних тем. */
.partner-tier-card.is-locked .partner-tier-number {
  display: grid;
  place-items: center;
}

.partner-tier-card.is-locked .partner-tier-number::after {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

.partner-progress-orb strong {
  max-width: 48px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
}

.partner-progress-orb[data-digits="3"] strong {
  font-size: 20px;
}

.partner-progress-orb[data-digits="4"] strong {
  font-size: 17px;
}

.partner-progress-orb[data-digits="5plus"] strong {
  font-size: 14px;
}

@media (max-width: 360px) {
  .partner-coin-hud {
    margin-inline: 12px;
    padding-inline: 9px;
  }

  .partner-coin-stop {
    padding-inline: 7px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .partner-money-shower > i,
  .partner-coin-game.is-bomb-hit {
    animation-duration: 1ms !important;
  }
}
