:root {
  --bg-body: #08080c;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-elevated: rgba(255, 255, 255, 0.05);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(255, 255, 255, 0.12);
  --text: #f0f0f0;
  --text-dim: #6b6b78;
  --gold: #d4a542;
  --gold-light: #f0d078;
  --gold-dark: #a87c28;
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --blue: #3b82f6;
  --tg-blue: #2aabee;
  --tg-blue-light: #5bc6ff;
  --radius: 16px;
  --radius-sm: 14px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text);
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   ANIMATED BACKGROUND
   ══════════════════════════════════════ */

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

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  will-change: transform;
}

.bg__orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  top: -10%;
  left: -5%;
  animation: float-1 18s ease-in-out infinite;
}

.bg__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  top: 50%;
  right: -10%;
  animation: float-2 22s ease-in-out infinite;
}

.bg__orb--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #d4a542, transparent 70%);
  bottom: -5%;
  left: 30%;
  opacity: 0.15;
  animation: float-3 20s ease-in-out infinite;
}

.bg__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.bg__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -30px) scale(1.05); }
  66% { transform: translate(40px, -60px) scale(0.9); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.15); }
  66% { transform: translate(-40px, 20px) scale(0.95); }
}

/* ══════════════════════════════════════
   PAGE
   ══════════════════════════════════════ */

.page {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */

.btn {
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.15s;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after {
  opacity: 1;
}

.btn--gold {
  background: linear-gradient(135deg, var(--tg-blue-light), var(--tg-blue));
  color: #021017;
  box-shadow: 0 4px 24px rgba(42, 171, 238, 0.35), 0 0 0 1px rgba(42, 171, 238, 0.25);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(42, 171, 238, 0.55), 0 0 0 1px rgba(91, 198, 255, 0.4);
}

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

.btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none !important;
  box-shadow: 0 4px 24px rgba(212, 165, 66, 0.08) !important;
}

.btn:disabled::after {
  display: none;
}

/* ══════════════════════════════════════
   WELCOME OVERLAY
   ══════════════════════════════════════ */

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  animation: fade-in 0.3s ease-out;
}

.welcome-overlay--hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.welcome-popup {
  position: relative;
  text-align: center;
  padding: 44px 32px 32px;
  border-radius: 24px;
  background: linear-gradient(170deg, rgba(30, 30, 40, 0.95), rgba(14, 14, 18, 0.98));
  border: 1px solid var(--border-focus);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 120px rgba(139, 92, 246, 0.08);
  max-width: 380px;
  width: calc(100% - 32px);
  animation: pop-in 0.4s ease-out;
}

.welcome-popup__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--tg-blue-light), var(--tg-blue));
  color: #021017;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(212, 165, 66, 0.3);
}

.welcome-popup__icon-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.welcome-popup__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
}

.welcome-popup__icon {
  position: relative;
}

.welcome-popup__icon img {
  width: 120px;
  height: 120px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.75));
  animation: welcome-bear 5s ease-in-out infinite;
}

.welcome-popup__title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-popup__text {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 24px;
}

.welcome-popup__text strong {
  color: var(--gold-light);
}

.welcome-popup .btn {
  width: 100%;
}

@keyframes shimmer {
  0% { transform: translateX(-150%); }
  50%, 100% { transform: translateX(150%); }
}

@keyframes welcome-bear {
  0% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-6px) scale(1.03);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(3px) scale(0.99);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* ══════════════════════════════════════
   MAIN HEADER
   ══════════════════════════════════════ */

.main__header {
  text-align: center;
  margin-bottom: 32px;
}

.main__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tg-blue-light);
  background: rgba(42, 171, 238, 0.12);
  border: 1px solid rgba(42, 171, 238, 0.35);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.main__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main__hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ══════════════════════════════════════
   ROULETTE
   ══════════════════════════════════════ */

.roulette {
  position: relative;
  background: linear-gradient(170deg, rgba(20, 20, 28, 0.8), rgba(10, 10, 14, 0.9));
  border: 1px solid var(--border-focus);
  border-radius: 24px;
  padding: 24px 0 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.roulette::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(42, 171, 238, 0.4) 35%,
    rgba(91, 198, 255, 0.8) 50%,
    rgba(42, 171, 238, 0.4) 65%,
    transparent 100%
  );
  opacity: 0;
  transform: scale(0.96);
}

.roulette--spinning::after {
  opacity: 1;
  animation: roulette-lightning 1.2s linear infinite;
}

.roulette__glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 220px;
  background: radial-gradient(ellipse, rgba(42, 171, 238, 0.17), transparent 72%);
  pointer-events: none;
}

.roulette__pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% - 58px);
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.roulette__pointer::before {
  content: "";
  flex: 1;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(91, 198, 255, 0.95),
    rgba(42, 171, 238, 0.4)
  );
  box-shadow: 0 0 18px rgba(42, 171, 238, 0.8);
}

.roulette__pointer-diamond {
  width: 14px;
  height: 14px;
  background: var(--tg-blue-light);
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 0 22px rgba(91, 198, 255, 0.9);
  flex-shrink: 0;
  margin-top: -2px;
}

.roulette__viewport {
  overflow: hidden;
  margin: 0 20px 18px;
  border-radius: var(--radius);
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.roulette__track {
  display: flex;
  gap: 10px;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 150px;
  height: 150px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.roulette-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.roulette-item__icon {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
}

.roulette-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.roulette-item__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 0, 0, 0.85)
  );
}

.roulette__btn {
  display: flex;
  width: calc(100% - 40px);
  margin: 0 auto;
  font-size: 16px;
  padding: 16px 28px;
}

/* ══════════════════════════════════════
   CONTENTS — «Что внутри»
   ══════════════════════════════════════ */

.contents {
  margin-top: 40px;
  text-align: center;
}

.contents__title {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.4),
    #ffffff,
    var(--gold-light),
    rgba(255, 255, 255, 0.5)
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: congrats-shimmer 5s linear infinite;
}

.contents__grid {
  display: inline-grid;
  grid-template-columns: repeat(5, 105px);
  gap: 10px;
  justify-content: center;
}

.gift-card {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: 8px 8px 10px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.gift-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.gift-card:hover {
  border-color: var(--border-focus);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.gift-card__icon {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  animation: card-float 6s ease-in-out infinite;
}

.gift-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.gift-card__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  line-height: 1.3;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 14, 0.1),
    rgba(10, 10, 14, 0.9)
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gift-card__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gift-card__sparkles span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--spark-color, rgba(255, 255, 255, 0.6));
  filter: blur(4px);
  opacity: 0;
}

/* Вариант 1: мягкие вертикальные искры */
.gift-card__sparkles--soft span:nth-child(1) {
  top: 18%;
  left: 22%;
  animation: card-spark-soft 4.4s ease-in-out infinite;
}

.gift-card__sparkles--soft span:nth-child(2) {
  top: 50%;
  left: 68%;
  animation: card-spark-soft 4.8s ease-in-out infinite 0.8s;
}

.gift-card__sparkles--soft span:nth-child(3) {
  top: 72%;
  left: 32%;
  animation: card-spark-soft 5.1s ease-in-out infinite 1.6s;
}

/* Вариант 2: «молнии» по диагонали */
.gift-card__sparkles--bolt span:nth-child(1) {
  top: 10%;
  left: 10%;
  animation: card-spark-bolt 3.2s ease-out infinite;
}

.gift-card__sparkles--bolt span:nth-child(2) {
  top: 40%;
  left: 55%;
  animation: card-spark-bolt 3.6s ease-out infinite 0.5s;
}

.gift-card__sparkles--bolt span:nth-child(3) {
  top: 78%;
  left: 20%;
  animation: card-spark-bolt 3.9s ease-out infinite 1s;
}

/* Вариант 3: орбита вокруг центра */
.gift-card__sparkles--orbit span:nth-child(1),
.gift-card__sparkles--orbit span:nth-child(2),
.gift-card__sparkles--orbit span:nth-child(3) {
  top: 50%;
  left: 50%;
  transform-origin: -10px -10px;
}

.gift-card__sparkles--orbit span:nth-child(1) {
  animation: card-spark-orbit 6s linear infinite;
}

.gift-card__sparkles--orbit span:nth-child(2) {
  animation: card-spark-orbit 7s linear infinite 0.8s;
}

.gift-card__sparkles--orbit span:nth-child(3) {
  animation: card-spark-orbit 5s linear infinite 1.4s;
}

@keyframes card-spark-soft {
  0% {
    transform: translate3d(0, 0, 0) scale(0.4);
    opacity: 0;
  }
  12% {
    opacity: 0.85;
  }
  45% {
    transform: translate3d(22px, -18px, 0) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translate3d(-12px, -40px, 0) scale(0.2);
    opacity: 0;
  }
}

@keyframes card-spark-bolt {
  0% {
    transform: translate3d(0, 0, 0) scale(0.4) skewX(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  40% {
    transform: translate3d(40px, -26px, 0) scale(1.1) skewX(-18deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(70px, -60px, 0) scale(0.5) skewX(-30deg);
    opacity: 0;
  }
}

@keyframes card-spark-orbit {
  0% {
    transform: rotate(0deg) translateX(16px) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: rotate(360deg) translateX(16px) scale(0.8);
    opacity: 0;
  }
}

@keyframes card-float {
  0% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-4px) scale(1.02);
  }
  60% {
    transform: translateY(2px) scale(0.99);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* ══════════════════════════════════════
   RESULT MODAL
   ══════════════════════════════════════ */

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

.modal--visible {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fade-in 0.25s;
}

.modal__card {
  position: relative;
  width: 320px;
  padding: 44px 28px 28px;
  border-radius: 28px;
  background: linear-gradient(170deg, rgba(26, 26, 34, 0.97), rgba(12, 12, 16, 0.98));
  border: 1px solid var(--border-focus);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  text-align: center;
  animation: result-pop 0.5s ease-out;
  overflow: hidden;
}

.modal__glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 165, 66, 0.15), transparent 65%);
  pointer-events: none;
}

.modal__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: 0;
  animation: sparkle-float 2s ease-out infinite;
}

.sparkle--1 { left: 20%; top: 30%; animation-delay: 0s; }
.sparkle--2 { left: 75%; top: 25%; animation-delay: 0.3s; }
.sparkle--3 { left: 15%; top: 60%; animation-delay: 0.6s; }
.sparkle--4 { left: 80%; top: 55%; animation-delay: 0.9s; }
.sparkle--5 { left: 40%; top: 20%; animation-delay: 1.2s; }
.sparkle--6 { left: 60%; top: 70%; animation-delay: 1.5s; }

.modal__congrats {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(
    90deg,
    var(--gold-light),
    var(--gold),
    #fff,
    var(--gold-light),
    var(--gold)
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: congrats-shimmer 3s linear infinite;
}

@keyframes congrats-shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.modal__icon-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 26px;
  border-radius: 36px;
  background: radial-gradient(circle at 20% 0%, rgba(91, 198, 255, 0.28), transparent 55%),
    linear-gradient(145deg, rgba(42, 171, 238, 0.22), rgba(0, 25, 51, 0.9));
  border: 1px solid rgba(91, 198, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation:
    icon-bounce 0.6s ease-out 0.15s both,
    icon-idle 4.5s ease-in-out 0.8s infinite;
}

.modal__icon {
  font-size: 76px;
  line-height: 1;
}

.modal__icon img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 14px;
}

.modal__icon-wrap--claim {
  animation: icon-claim 0.6s ease-out;
}

.modal__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.modal__code {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.modal__code-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.modal__code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal__code-value {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(91, 198, 255, 0.25);
}

.modal__copy {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(91, 198, 255, 0.35);
  background: rgba(42, 171, 238, 0.12);
  color: var(--tg-blue-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.modal__copy:hover {
  transform: translateY(-1px);
  background: rgba(42, 171, 238, 0.18);
  box-shadow: 0 10px 24px rgba(42, 171, 238, 0.22);
}

.modal__copy:active {
  transform: translateY(0);
}

.modal__copy--done {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: rgba(34, 197, 94, 1);
}

.modal__info-left {
  text-align: left;
  min-width: 0;
  flex: 1;
}

.modal__info-right {
  text-align: right;
  flex-shrink: 0;
}

.modal__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.modal__name {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.75));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal__price-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.modal__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--tg-blue-light);
}

.modal__btn {
  width: 100%;
  padding: 16px 28px;
  font-size: 16px;
  animation: btn-pulse 3s ease-in-out infinite;
}

/* ══════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════ */

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { transform: scale(0.88); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes result-pop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes icon-bounce {
  0% { transform: scale(0.4) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

@keyframes icon-idle {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(91, 198, 255, 0);
  }
  25% {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(3px) scale(0.98);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(91, 198, 255, 0);
  }
}

@keyframes sparkle-float {
  0% { transform: translateY(0) scale(0); opacity: 0; }
  20% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { transform: translateY(-50px) scale(0); opacity: 0; }
}

@keyframes icon-claim {
  0% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.08) rotate(-4deg);
  }
  60% {
    transform: scale(1.08) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes btn-pulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 18px rgba(42, 171, 238, 0.35);
  }
  40% {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 28px rgba(91, 198, 255, 0.55);
  }
  70% {
    transform: translateY(0) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 18px rgba(42, 171, 238, 0.35);
  }
}

/* ── Spin effects ── */

.roulette--spinning .roulette__glow {
  animation: glow-pulse 0.8s ease-in-out infinite;
}

.roulette--spinning .roulette__pointer-diamond {
  animation: diamond-pulse 0.5s ease-in-out infinite;
}

.roulette--finishing .roulette__pointer-diamond {
  animation: diamond-flash 0.3s ease-out 3;
}

.roulette--finishing .roulette__glow {
  animation: glow-burst 0.6s ease-out;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 1.6; transform: translateX(-50%) scale(1.35); }
}

@keyframes diamond-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(42, 171, 238, 0.9); }
  50% { box-shadow: 0 0 32px rgba(91, 198, 255, 1), 0 0 64px rgba(42, 171, 238, 0.5); }
}

@keyframes diamond-flash {
  0% { box-shadow: 0 0 18px rgba(42, 171, 238, 0.8); transform: rotate(45deg) scale(1); }
  50% { box-shadow: 0 0 40px rgba(91, 198, 255, 1), 0 0 80px rgba(42, 171, 238, 0.6); transform: rotate(45deg) scale(1.35); }
  100% { box-shadow: 0 0 18px rgba(42, 171, 238, 0.8); transform: rotate(45deg) scale(1); }
}

@keyframes glow-burst {
  0% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 2; transform: translateX(-50%) scale(2); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes roulette-lightning {
  0% {
    opacity: 0.2;
    filter: blur(6px);
    box-shadow: 0 0 0 rgba(91, 198, 255, 0);
    transform: scale(0.96);
  }
  20% {
    opacity: 0.9;
    filter: blur(2px);
    box-shadow: 0 0 26px rgba(91, 198, 255, 0.7);
    transform: scale(1);
  }
  40% {
    opacity: 0.4;
    filter: blur(4px);
    box-shadow: 0 0 12px rgba(42, 171, 238, 0.4);
  }
  60% {
    opacity: 0.9;
    filter: blur(1px);
    box-shadow: 0 0 32px rgba(91, 198, 255, 0.9);
  }
  100% {
    opacity: 0.2;
    filter: blur(6px);
    box-shadow: 0 0 0 rgba(91, 198, 255, 0);
    transform: scale(0.96);
  }
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 440px) {
  .page {
    padding: 20px 10px 56px;
  }

  .main__title {
    font-size: 26px;
  }

  .roulette-item {
    flex: 0 0 100px;
    height: 100px;
  }

  .roulette-item__icon {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  .contents__grid {
    grid-template-columns: repeat(3, 1fr);
    display: grid;
    width: 100%;
  }

  .modal__card {
    width: calc(100% - 24px);
  }
}
