@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

html, body {
  height: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#particles-js {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: transparent;
}

/* Цветовые переменные под статики (совместимость с React-темой) */
:root {
  --color-primary-300: #5bbbf2;
  --color-text-dim: #a9b6d9;

  /* Шрифты */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-heading: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;

  /* Веса шрифтов */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
}

/* Мелкие утилиты, которых нет в CDN-конфиге */
.bg-right-center {
  background-position: right center;
}

/* Модальное окно */
#stream-modal[data-open="true"] { display: flex; }

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Утилитарные классы для font-weight */
.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

/* Lottery helpers */
.lottery-grid-number {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.70);
  transition: all 150ms ease;
  overflow: hidden;
}

.lottery-grid-number:hover:not(:disabled):not(.selected) {
  background: rgba(91, 187, 242, 0.15);
  border-color: rgba(91, 187, 242, 0.3);
  transform: scale(1.05);
}

.lottery-grid-number.selected {
  background: linear-gradient(135deg, #ffcc26 0%, #ffb020 100%) !important;
  border-color: rgba(255, 196, 0, 0.5) !important;
  color: #0a1426 !important;
  box-shadow: 0 8px 24px -8px rgba(255, 196, 0, 0.5);
  transform: scale(1.05);
}

.lottery-grid-number.selected:hover {
  transform: scale(1.08);
}

.lottery-grid-number:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lottery-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.lottery-character-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: visible !important;
  background: linear-gradient(135deg, #ffcc26 0%, #ffb020 100%);
  box-shadow: 0 12px 32px -12px rgba(255, 196, 0, 0.6);
  position: relative;
}

.lottery-character-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lottery-character-empty {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 500;
}

.lottery-character-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff3a2f !important;
  color: white !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  border: 2px solid white !important;
  box-shadow: 0 2px 12px rgba(255, 58, 47, 0.6), 0 0 0 3px rgba(255, 58, 47, 0.2);
  opacity: 0;
  transition: all 150ms;
  z-index: 10;
}

.lottery-character:hover .lottery-character-remove {
  opacity: 1;
  transform: scale(1.1);
}

.lottery-character-remove:hover {
  background: #e63027 !important;
  box-shadow: 0 4px 16px rgba(255, 58, 47, 0.8), 0 0 0 3px rgba(255, 58, 47, 0.3);
  transform: scale(1.2);
}

@keyframes characterBounce {
  0% {
    opacity: 0;
    transform: scale(0) translateY(-30px);
  }
  50% {
    transform: scale(1.15) translateY(10px);
  }
  70% {
    transform: scale(0.95) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes characterFlip {
  0% {
    opacity: 0;
    transform: rotateY(90deg) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: rotateY(-10deg) scale(1.1);
  }
  100% {
    transform: rotateY(0) scale(1);
  }
}

@keyframes characterZoomRotate {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes characterSlideFade {
  0% {
    opacity: 0;
    transform: translateX(-50px) scale(0.7);
    filter: blur(10px);
  }
  50% {
    opacity: 0.7;
    transform: translateX(10px) scale(1.05);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes characterElastic {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  20% {
    opacity: 1;
    transform: scale(1.3);
  }
  40% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.15);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes characterSwirl {
  0% {
    opacity: 0;
    transform: rotate(540deg) scale(0);
  }
  50% {
    opacity: 1;
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes characterPop {
  0% {
    opacity: 0;
    transform: scale(0) translateY(20px);
  }
  40% {
    opacity: 1;
    transform: scale(1.4) translateY(-10px);
  }
  60% {
    transform: scale(0.9) translateY(5px);
  }
  80% {
    transform: scale(1.05) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 12px 32px -12px rgba(255, 196, 0, 0.6);
  }
  50% {
    box-shadow: 0 12px 48px -8px rgba(255, 196, 0, 0.9), 0 0 80px rgba(255, 196, 0, 0.4);
  }
}

.lottery-character-image.effect-pop {
  animation: characterPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.lottery-character-image.effect-pop::before,
.lottery-character-image.effect-pop::after {
  content: "✨";
  position: absolute;
  font-size: 20px;
  animation: sparkle 0.6s ease-out;
}

.lottery-character-image.effect-pop::before {
  top: -10px;
  left: -10px;
  animation-delay: 0.1s;
}

.lottery-character-image.effect-pop::after {
  bottom: -10px;
  right: -10px;
  animation-delay: 0.2s;
}

.lottery-character-image.effect-bounce {
  animation: characterBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lottery-character-image.effect-flip {
  animation: characterFlip 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lottery-character-image.effect-zoom-rotate {
  animation: characterZoomRotate 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lottery-character-image.effect-slide-fade {
  animation: characterSlideFade 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.lottery-character-image.effect-elastic {
  animation: characterElastic 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.lottery-character-image.effect-swirl {
  animation: characterSwirl 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.lottery-character-image.with-glow {
  animation: characterBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), glowPulse 1.5s ease-in-out;
}

.effect-btn.effect-active {
  background: linear-gradient(135deg, rgba(255, 204, 38, 0.15) 0%, rgba(255, 176, 32, 0.15) 100%);
  border-color: rgba(255, 196, 0, 0.3);
  color: rgba(255, 204, 38, 0.9);
}

#numbers-grid {
  grid-template-columns: repeat(20, minmax(0, 1fr));
}

@media (max-width: 640px) {
  #numbers-grid {
    padding: 0.5rem !important;
    gap: 0.25rem !important;
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
  }

  #selection {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Убираем дефолтные стили браузера для input */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input:not([type="checkbox"]):not([type="radio"]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Сброс focus стилей для input - пусть Tailwind управляет */
input:focus {
  outline: none;
  box-shadow: none;
}

/* Против autofill, чтобы поля не становились белыми */
.account-profile-page input:-webkit-autofill,
.account-profile-page input:-webkit-autofill:hover,
.account-profile-page input:-webkit-autofill:focus,
.account-profile-page select:-webkit-autofill,
.account-profile-page select:-webkit-autofill:hover,
.account-profile-page select:-webkit-autofill:focus,
.account-security-page input:-webkit-autofill,
.account-security-page input:-webkit-autofill:hover,
.account-security-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: #eaf2ff;
  -webkit-box-shadow: 0 0 0px 1000px #152345 inset;
  box-shadow: 0 0 0px 1000px #152345 inset;
  transition: background-color 9999s ease 0s;
  caret-color: #eaf2ff;
}

.account-profile-page input[type="text"],
.account-profile-page input[type="email"],
.account-profile-page input[type="number"],
.account-profile-page input[type="password"],
.account-profile-page input[data-profile-field="true"],
.account-security-page input[type="text"],
.account-security-page input[type="email"],
.account-security-page input[type="number"],
.account-security-page input[type="password"],
.account-security-page select,
.account-security-page input[data-security-field="true"] {
  background-color: #152345;
  border-color: #223257;
}

.account-profile-page input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}


.scratch-winning-cell {
  position: relative;
  border-color: rgba(23, 178, 106, 0.65) !important;
  background: linear-gradient(135deg, rgba(23, 178, 106, 0.22), rgba(7, 37, 23, 0.25));
  box-shadow: 0 0 28px rgba(23, 178, 106, 0.45), inset 0 0 14px rgba(23, 178, 106, 0.25);
  animation: scratch-win-pulse 1.15s ease-in-out infinite alternate;
}

.scratch-winning-cell::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(226, 255, 239, 0.35);
  box-shadow: 0 0 18px rgba(226, 255, 239, 0.35);
  pointer-events: none;
}

@keyframes scratch-win-pulse {
  0% {
    box-shadow: 0 0 12px rgba(23, 178, 106, 0.25), inset 0 0 8px rgba(23, 178, 106, 0.18);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 34px rgba(23, 178, 106, 0.55), inset 0 0 16px rgba(23, 178, 106, 0.3);
    transform: scale(1.02);
  }
}


.scratch-result-banner {
  display: none;
  border-radius: 18px;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 18px 40px rgba(10, 20, 38, 0.38);
  transition: transform 200ms ease, opacity 200ms ease;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
}

.scratch-result-banner[data-visible="true"] {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.scratch-result-banner--win {
  background: linear-gradient(135deg, rgba(23, 178, 106, 0.18), rgba(5, 54, 34, 0.28));
  border: 1px solid rgba(23, 178, 106, 0.5);
  color: #d9ffe8;
  text-shadow: 0 0 12px rgba(23, 178, 106, 0.4);
}

.scratch-result-banner--lose {
  background: linear-gradient(135deg, rgba(255, 58, 47, 0.16), rgba(60, 20, 20, 0.28));
  border: 1px solid rgba(255, 85, 73, 0.45);
  color: #ffb3af;
  text-shadow: 0 0 10px rgba(255, 90, 70, 0.28);
}

.scratch-banner-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

#win-animation-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  pointer-events: none;
}

#win-animation-overlay.scratch-animation-active {
  display: block;
}

/* Jackpot Gold Text Styles */
.jackpot-gold {
  position: relative;
  display: inline-block;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.jackpot-v1 {
  background-image: linear-gradient(180deg, #F2F275 0%, #F2F275 18%, #CA8A04 52%, #C6730E 58%, #E2AD0B 100%);
  filter: drop-shadow(0 3px 3px rgba(60, 30, 0, 0.95));
}

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

.hero-amount-font {
   font-family: "Inter", "Segoe UI", "Arial", sans-serif !important;
   font-weight: 900 !important;
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-counter {
  font-variant-numeric: tabular-nums;
}

body:not(.scratch-purchase-page) .ticket-card {
  background: linear-gradient(145deg, rgba(35, 39, 84, 0.7), rgba(15, 18, 48, 0.7));
  backdrop-filter: blur(5px);
  border: 1px solid;
  border-radius: 16px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 1.35rem 1.35rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

body:not(.scratch-purchase-page) .ticket-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(75, 90, 247, 0.2);
}

body:not(.scratch-purchase-page) .ticket-price-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 75px;
  height: 75px;
  padding-top: 5px;
  padding-right: 10px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: flex-end;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.2);
}

body:not(.scratch-purchase-page) .ticket-main-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

body:not(.scratch-purchase-page) .ticket-sub-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  color: #a0a0b0;
  font-size: 0.9rem;
}

body:not(.scratch-purchase-page) .ticket-serial-info {
  font-weight: 700;
  color: #ffffff;
}

body:not(.scratch-purchase-page) .ticket-date-info {
  color: #8b949e;
  font-size: 0.85rem;
}

body:not(.scratch-purchase-page) .ticket-scratch-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

body:not(.scratch-purchase-page) .ticket-result-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #a0a0b0;
}

body:not(.scratch-purchase-page) .ticket-result-bar {
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-top: 0.7rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

body:not(.scratch-purchase-page) .ticket-result-bar.is-win {
  background: #2ea043;
  color: #ffffff;
}

body:not(.scratch-purchase-page) .ticket-result-bar.is-loss {
  background: #30363d;
  color: #a0a0b0;
}

body:not(.scratch-purchase-page) .ticket-card.grade-1 {
  border-color: #cd7f32;
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-1 {
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-1:hover {
  box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
}

body:not(.scratch-purchase-page) .grade-1 .ticket-price-corner {
  background: linear-gradient(135deg, #e9967a 0%, #cd7f32 50%, #8b4513 100%);
}

body:not(.scratch-purchase-page) .ticket-card.grade-5 {
  border-color: #c0c0c0;
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-5 {
  box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-5:hover {
  box-shadow: 0 0 20px rgba(192, 192, 192, 0.5);
}

body:not(.scratch-purchase-page) .grade-5 .ticket-price-corner {
  background: linear-gradient(135deg, #e8e8e8 0%, #c0c0c0 50%, #a8a8a8 100%);
}

body:not(.scratch-purchase-page) .ticket-card.grade-20 {
  border-color: #ffd93d;
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-20 {
  box-shadow: 0 0 15px rgba(255, 217, 61, 0.3);
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-20:hover {
  box-shadow: 0 0 20px rgba(255, 217, 61, 0.5);
}

body:not(.scratch-purchase-page) .grade-20 .ticket-price-corner {
  background: linear-gradient(135deg, #ffd93d 0%, #d4a017 50%, #9a7d0a 100%);
}

body:not(.scratch-purchase-page) .ticket-card.grade-100 {
  border-color: #eff2f8;
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-100 {
  box-shadow: 0 0 25px rgba(239, 242, 248, 0.4);
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-100:hover {
  box-shadow: 0 0 35px rgba(239, 242, 248, 0.6);
}

body:not(.scratch-purchase-page) .ticket-card:not(.used).grade-100 .ticket-price-corner {
  background: linear-gradient(135deg, #FDFEFF 0%, #EFF2F8 30%, #E3E7F0 70%, #D5DBE8 100%);
  color: #212121;
}

body:not(.scratch-purchase-page) .ticket-card.used {
  background: rgba(33, 38, 45, 0.7);
  border-color: #30363d !important;
  cursor: default;
}

body:not(.scratch-purchase-page) .ticket-card.used:hover {
  transform: none;
  box-shadow: none;
}

body:not(.scratch-purchase-page) .ticket-card.used .ticket-price-corner {
  background-color: #30363d !important;
  box-shadow: none;
  color: #d1d5db;
}

body:not(.scratch-purchase-page) .ticket-card.used .ticket-sub-info {
  color: #8b949e;
}

body:not(.scratch-purchase-page) .ticket-card.used .ticket-serial-info {
  color: #c9d1d9;
}

body:not(.scratch-purchase-page) .ticket-card.used .ticket-result-title {
  color: #a0a0b0;
}

body:not(.scratch-purchase-page) .ticket-card.is-winner {
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

body:not(.scratch-purchase-page) .ticket-card.is-winner:hover {
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
}

body:not(.scratch-purchase-page) .ticket-actions {
  margin-top: 0.9rem;
}

body:not(.scratch-purchase-page) .ticket-actions button {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 640px) {
  body:not(.scratch-purchase-page) .ticket-card {
    padding: 1.25rem;
  }

  body:not(.scratch-purchase-page) .ticket-price-corner {
    width: 65px;
    height: 65px;
    font-size: 1rem;
  }

  body:not(.scratch-purchase-page) .ticket-scratch-title,
  body:not(.scratch-purchase-page) .ticket-result-title {
    font-size: 1.1rem;
  }

  body:not(.scratch-purchase-page) .ticket-result-bar {
    font-size: 0.9rem;
  }
}

.purchase-modal {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.25s ease, opacity 0.25s ease;
}

.purchase-modal.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.purchase-modal[aria-hidden="true"] [data-modal-panel] {
  transform: translateY(24px) scale(0.95);
  opacity: 0;
}

.purchase-modal.is-visible [data-modal-panel] {
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.purchase-modal[aria-hidden="true"] [data-modal-overlay] {
  opacity: 0;
}

.purchase-modal.is-visible [data-modal-overlay] {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.purchase-modal [data-modal-close]:not([data-modal-overlay]) {
  z-index: 20;
  pointer-events: auto;
}

.pulse-ring::before,
.pulse-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 9999px;
  border: 1px solid rgba(23, 178, 106, 0.35);
  opacity: 0;
  animation: pulse-ring 2.4s ease-out infinite;
}

.pulse-ring::after {
  animation-delay: 0.8s;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  30% {
    opacity: 0.35;
  }
  70% {
    opacity: 0;
    transform: scale(1.25);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.success-icon {
  opacity: 0;
  transform: scale(0.92);
  animation: success-pop 0.6s ease forwards;
}

@keyframes success-pop {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  60% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
#wheel-container {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(132, 83, 255, 0.45) 0%, rgba(132, 83, 255, 0) 55%),
    radial-gradient(circle at 50% 70%, rgba(255, 149, 255, 0.35) 0%, rgba(74, 11, 121, 0) 46%),
    radial-gradient(circle at 15% 30%, rgba(214, 135, 255, 0.32) 0%, rgba(214, 135, 255, 0) 48%),
    linear-gradient(160deg, #0a011d 0%, #14062f 28%, #1f0f48 55%, #0b021f 100%);
}

#wheel-container::before,
#wheel-container::after {
  content: "";
  position: absolute;
  inset: -35% -20% auto;
  width: 110%;
  height: 110%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

#wheel-container::before {
  background: radial-gradient(circle, rgba(255, 168, 255, 0.4) 0%, rgba(255, 168, 255, 0) 65%);
  transform: translate(-15%, -25%);
  filter: blur(4px);
}

#wheel-container::after {
  background: radial-gradient(circle, rgba(122, 63, 255, 0.45) 0%, rgba(122, 63, 255, 0) 70%);
  transform: translate(55%, 48%);
  filter: blur(10px);
}

#wheel-container > * {
  position: relative;
  z-index: 1;
}

.wheel-container-new {
  position: relative;
  width: min(75vw, 440px);
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease-in;
  will-change: opacity;
}

.wheel-container-new.loaded {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wheel {
  --pointer-scale: 0.4;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: auto 12% -8%;
  height: 28%;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.05) 70%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.wheel__rim {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118%;
  transform: translate(-50%, -50%) translate(-2px, 0);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.wheel__rim img {
  display: block;
  width: 100%;
  height: auto;
}

.wheel__pointer {
  position: absolute;
  left: 86%;
  width: calc(min(75vw, 440px) * var(--pointer-scale));
  transform-origin: 82% 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.wheel__pointer img {
  display: block;
  width: 100%;
  height: auto;
}

.roulette__sign {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% * 1.7), clamp(260px, 94vw, 550px));
  margin-top: calc(min(75vw, 440px) * -0.13);
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.roulette__sign img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 1200px) {
  .roulette__sign {
    width: min(calc(100% * 1.35), clamp(240px, 92vw, 640px));
  }
}

.wheel__image {
  width: 100%;
  height: auto;
  transform: rotate(var(--rotation, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
  z-index: 1;
  pointer-events: none;
}

.wheel__spin-button {
  position: absolute;
  width: 160px;
  height: 160px;
  border: none;
  border-radius: 50%;
  background: url("../images/wheel/centerButton.png") center / cover no-repeat;
  cursor: pointer;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.5),
    0 20px 45px rgba(0, 0, 0, 0.45);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.wheel__spin-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  filter: grayscale(28%) brightness(0.92);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.35),
    0 16px 34px rgba(0, 0, 0, 0.35);
}

.wheel__spin-button:not(:disabled):hover {
  transform: translate(-50%, -52%) scale(1.02);
}

.wheel__spin-button:not(:disabled):active {
  transform: translate(-50%, -48%) scale(0.98);
  box-shadow:
    inset 0 3px 12px rgba(255, 255, 255, 0.4),
    0 12px 24px rgba(0, 0, 0, 0.45);
}

.roulette__result {
  min-height: 2em;
  padding: 0.5rem 1rem;
  --tw-translate-y: -1rem;
  transform: translateY(var(--tw-translate-y));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .wheel-container-new {
    width: min(85vw, 360px);
  }

  .wheel__spin-button {
    width: 120px;
    height: 120px;
  }
}
