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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

.body {
  font-family: "system-ui", "Roboto", "Helvetica", "sans-serif";
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.main-container {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(50% 50% at 50% 50%, #dc002b 0%, #490310 100%);
}

.container {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  height: 100vh;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container {
    max-width: 600px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 700px;
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: 980px;
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

.spin-screen {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}
.spin-screen.hidden {
  display: none;
}

.spin-screen.spin-screen--stable-wheel-layout .container {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
  justify-items: center;
  row-gap: var(--wheel-layout-gap, 1rem);
  padding-top: var(--wheel-layout-padding-top, 2rem);
}
.spin-screen.spin-screen--stable-wheel-layout .main-title {
  margin: 0;
  padding-top: 0;
  max-width: var(--wheel-title-max-width, 22rem);
  font-size: var(--wheel-title-size, 2rem);
  line-height: 1.12;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.spin-screen.spin-screen--stable-wheel-layout .subtitle {
  margin-top: 0;
  max-width: var(--wheel-subtitle-max-width, 20rem);
  font-size: var(--wheel-subtitle-size, 1.125rem);
  line-height: 1.25;
  text-wrap: balance;
}
.spin-screen.spin-screen--stable-wheel-layout .timer-highlight {
  display: inline-block;
  white-space: nowrap;
}
.spin-screen.spin-screen--stable-wheel-layout .wheel-wrapper,
.spin-screen.spin-screen--stable-wheel-layout .wheel-plane-ai-wheel {
  margin-top: var(--wheel-layout-wheel-gap, 1rem);
  justify-self: center;
}
.spin-screen.spin-screen--stable-wheel-layout .attempts-counter {
  margin-top: var(--wheel-layout-counter-gap, 1.25rem);
}

/* Headers */
.main-title {
  position: relative;
  z-index: 30;
  animation: fadeInDelay 0.6s ease-in;
  padding-top: 3rem;
  text-align: center;
  font-weight: 800;
  font-size: 2.25rem;
  color: white;
  text-transform: uppercase;
}

.main-title .title-highlight {
  color: #FFC73A;
}

.subtitle {
  position: relative;
  z-index: 30;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  max-width: 14rem;
  animation: fadeInDelay 0.6s ease-in;
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
}

.timer-highlight {
  padding: 0.125rem 0.625rem;
  background: #4c010f;
  border-radius: 0.625rem;
  color: #ffc73a;
}

/* Wheel Styles */
.wheel-wrapper {
  position: relative;
  z-index: 30;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5rem;
  font-size: 70%;
  cursor: pointer;
}

.wheel-border {
  pointer-events: none;
  position: absolute;
  top: 54%;
  left: 50%;
  z-index: 5;
  height: 30em;
  width: 30em;
  transform: translate(-50%, -50%);
  background-size: cover;
  background-image: url("../images/border-silver.webp");
}
@media (min-width: 768px) {
  .wheel-border {
    height: 38em;
    width: 38em;
  }
}

.wheel-container {
  position: relative;
  z-index: 2;
  margin-left: auto;
  margin-right: auto;
  height: 20rem;
  width: 20rem;
  animation: none;
}
.wheel-container.wheel-initial-sway {
  animation: spinnerDefault 2s ease-in-out infinite;
}
.wheel-container.spinning-to-nothing {
  animation: spinToNothing 1.6s cubic-bezier(0.12, 0.68, 0.18, 1) forwards;
}
.wheel-container.spinning-to-prize-1351 {
  animation: spinToPrize-1351 2s ease-in-out forwards;
}
.wheel-container.spinning-to-prize-1530 {
  animation: spinToPrize-1530 2s ease-in-out forwards;
}

.wheel-image {
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 23em;
  width: 23em;
  transform: translate(-50%, -50%);
}
@media (min-width: 768px) {
  .wheel-image {
    height: 33em;
    width: 33em;
  }
}

.wheel-segments {
  pointer-events: none;
  position: absolute;
  right: 4rem;
  bottom: 1.5rem;
  z-index: 5;
  height: 100%;
  width: 100%;
}

.wheel-segment {
  position: absolute;
  display: flex;
  height: 8em;
  width: 23em;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-right: 1em;
  padding-left: 2em;
  font-weight: 700;
  color: white;
}
.wheel-segment p {
  height: 3em;
  width: 4rem;
  word-break: normal;
  text-align: center;
  font-size: 0.875rem;
  line-height: 150%;
  text-transform: uppercase;
  white-space: pre-line;
}
@media (min-width: 768px) {
  .wheel-segment p {
    font-size: 1.125rem;
  }
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
}

.spin-button {
  position: relative;
  z-index: 10;
  display: flex;
  height: 40px;
  width: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background-color: transparent;
  background-size: 100%;
  background-position: top;
  background-image: url("../images/center-silver.webp");
  color: transparent;
  font-size: 0;
  cursor: pointer;
  outline: 0;
  animation: none;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  padding: 0;
}
.spin-button span {
  display: none;
}
.spin-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.wheel-wrapper--generated-full-wheel .wheel-border {
  display: none;
}

.wheel-wrapper--no-border .wheel-border {
  display: none;
}

.wheel-wrapper.wheel-wrapper--css-wheel {
  --wheel-size: 20rem;
  --wheel-center-size: 40px;
  --wheel-label-radius: -6.75rem;
  --wheel-label-width: 4.25rem;
  --wheel-label-size: 0.875rem;
  --wheel-label-line-height: 1.15;
  --wheel-label-color: white;
  --wheel-label-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  --wheel-pointer-size: 1.375rem;
  --wheel-pointer-color: #ffc73a;
  --wheel-pointer-stroke: rgba(76, 1, 15, 0.5);
  --wheel-pointer-shadow: 0 0.35rem 0.875rem rgba(0, 0, 0, 0.35);
  --wheel-ring-width: 0;
  --wheel-ring-color: transparent;
  --wheel-ring-shadow: none;
  font-size: var(--wheel-scale, 70%);
}
.wheel-wrapper.wheel-wrapper--css-wheel::before {
  content: "";
  position: absolute;
  top: calc(var(--wheel-pointer-size) * -0.25 - var(--wheel-ring-width));
  left: 50%;
  z-index: 8;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: calc(var(--wheel-pointer-size) * 0.55) solid transparent;
  border-left: calc(var(--wheel-pointer-size) * 0.55) solid transparent;
  border-top: calc(var(--wheel-pointer-size) * 1.1) solid var(--wheel-pointer-color);
  filter: drop-shadow(0 0.125rem 0 var(--wheel-pointer-stroke)) drop-shadow(var(--wheel-pointer-shadow));
  pointer-events: none;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-container {
  overflow: hidden;
  border-radius: 50%;
  height: var(--wheel-size);
  width: var(--wheel-size);
  border: var(--wheel-ring-width) solid var(--wheel-ring-color);
  background: var(--wheel-face-bg, conic-gradient(from -22.5deg, #5d0015 0deg 45deg, #8b001f 45deg 90deg, #5d0015 90deg 135deg, #8b001f 135deg 180deg, #5d0015 180deg 225deg, #8b001f 225deg 270deg, #5d0015 270deg 315deg, #8b001f 315deg 360deg));
  box-shadow: var(--wheel-face-shadow, inset 0 0 2em rgba(0, 0, 0, 0.35));
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background: var(--wheel-face-overlay, radial-gradient(circle, rgba(255, 199, 58, 0.18) 0 18%, transparent 19% 100%));
  pointer-events: none;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-border {
  display: none;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-image {
  display: none;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-segments {
  inset: 0;
  right: auto;
  bottom: auto;
  z-index: 5;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-segment {
  top: 50%;
  left: 50%;
  display: block;
  height: 0;
  width: 0;
  padding: 0;
  transform: rotate(var(--wheel-segment-angle, 0deg)) translateY(var(--wheel-label-radius));
  transform-origin: 0 0;
}
.wheel-wrapper.wheel-wrapper--css-wheel .wheel-segment p {
  position: absolute;
  top: 0;
  left: 0;
  height: auto;
  width: var(--wheel-label-width);
  transform: translate(-50%, -50%) rotate(var(--wheel-label-flip, 0deg));
  color: var(--wheel-label-color);
  font-size: var(--wheel-label-size);
  line-height: var(--wheel-label-line-height);
  text-shadow: var(--wheel-label-shadow);
}

.wheel-wrapper.wheel-wrapper--css-wheel > .wheel-pointer {
  display: none;
}

.wheel-wrapper--ai-kit {
  --ai-wheel-size: 20rem;
  --ai-wheel-pointer-color: #ffc73a;
  --ai-wheel-label-color: #ffffff;
  --ai-wheel-glow: inset 0 0 2em rgba(0, 0, 0, 0.35);
  --ai-wheel-ring-color: #d9dde0;
  --ai-wheel-ring-width: 2.5cqmin;
}

.wheel-wrapper--ai-kit .wheel-image,
.wheel-wrapper--ai-kit .wheel-border {
  display: none;
}

.wheel-plane-ai-wheel {
  --ai-wheel-size: 20rem;
  --ai-wheel-pointer-color: #ffc73a;
  --ai-wheel-label-color: #ffffff;
  --ai-wheel-glow: inset 0 0 2em rgba(0, 0, 0, 0.35);
  --ai-wheel-ring-color: #d9dde0;
  --ai-wheel-ring-width: 2.5cqmin;
  position: relative;
  z-index: 30;
  display: grid;
  place-items: center;
  width: var(--ai-wheel-size);
  max-width: 90vw;
  aspect-ratio: 1/1;
  margin: 5rem auto 0;
  cursor: pointer;
}

.wheel-plane-ai-wheel__root {
  grid-area: 1/1;
  width: 100%;
  animation: none;
}
.wheel-plane-ai-wheel__root.wheel-initial-sway {
  animation: spinnerDefault 2s ease-in-out infinite;
}
.wheel-plane-ai-wheel__root.spinning-to-nothing {
  animation: spinToNothing 1.6s cubic-bezier(0.12, 0.68, 0.18, 1) forwards;
}
.wheel-plane-ai-wheel__root.spinning-to-prize-1351 {
  animation: spinToPrize-1351 2s ease-in-out forwards;
}
.wheel-plane-ai-wheel__root.spinning-to-prize-1530 {
  animation: spinToPrize-1530 2s ease-in-out forwards;
}

.wheel-plane-ai-wheel__spin {
  grid-area: 1/1;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border: 0.35rem solid rgb(217, 221, 224);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 58%, #e7e9ec 59%);
  color: #203040;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.wheel-wrapper.wheel-wrapper--no-pointer::before {
  display: none;
}

.wheel-wrapper--css-border .wheel-border {
  background-image: none;
  border-radius: 50%;
  border: var(--wheel-border-width, 1.25em) solid var(--wheel-border-color, #d9dde0);
  box-shadow: var(--wheel-border-shadow, 0 1em 2.5em rgba(0, 0, 0, 0.35));
}

.wheel-wrapper.wheel-wrapper--css-wheel.wheel-wrapper--css-border {
  --wheel-ring-width: 0.35rem;
  --wheel-ring-color: var(--wheel-border-color, #d9dde0);
  --wheel-ring-shadow: 0 0.75em 2em rgba(0, 0, 0, 0.3);
}
.wheel-wrapper.wheel-wrapper--css-wheel.wheel-wrapper--css-border .wheel-container {
  box-shadow: var(--wheel-ring-shadow), var(--wheel-face-shadow, inset 0 0 2em rgba(0, 0, 0, 0.35));
}
.wheel-wrapper.wheel-wrapper--css-wheel.wheel-wrapper--css-border .wheel-border {
  display: none;
}

.wheel-wrapper--css-center .spin-button {
  height: var(--wheel-center-size, 40px);
  width: var(--wheel-center-size, 40px);
  background-image: none;
  background: var(--wheel-center-bg, radial-gradient(circle at 35% 30%, #ffffff 0%, #d6d7d8 42%, #8d9297 100%));
  color: var(--wheel-center-text-color, #ffc73a);
  font-size: 0.75rem;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.wheel-wrapper--css-center .spin-button span {
  display: block;
}

@media (min-width: 768px) {
  .spin-screen.spin-screen--stable-wheel-layout .container {
    row-gap: var(--wheel-layout-gap, 1.25rem);
    padding-top: var(--wheel-layout-padding-top, 2.5rem);
  }
  .spin-screen.spin-screen--stable-wheel-layout .main-title {
    max-width: var(--wheel-title-max-width, 48rem);
    font-size: var(--wheel-title-size, 2.5rem);
  }
  .spin-screen.spin-screen--stable-wheel-layout .subtitle {
    max-width: var(--wheel-subtitle-max-width, 34rem);
    font-size: var(--wheel-subtitle-size, 1.35rem);
  }
  .wheel-wrapper.wheel-wrapper--css-wheel {
    --wheel-size: 24rem;
    --wheel-center-size: 52px;
    --wheel-label-radius: -8rem;
    --wheel-pointer-size: 1.625rem;
    --wheel-label-size: 1rem;
    --wheel-label-width: 4.5rem;
  }
}
@media (min-width: 1280px) {
  .spin-screen.spin-screen--stable-wheel-layout .container {
    padding-top: var(--wheel-layout-padding-top, 2.75rem);
  }
  .spin-screen.spin-screen--stable-wheel-layout .main-title {
    max-width: var(--wheel-title-max-width, 56rem);
    font-size: var(--wheel-title-size, 2.875rem);
  }
  .wheel-wrapper.wheel-wrapper--css-wheel {
    --wheel-size: 25rem;
    --wheel-label-radius: -8.35rem;
  }
}
@media (max-height: 760px) {
  .spin-screen.spin-screen--stable-wheel-layout .container {
    row-gap: var(--wheel-layout-gap, 0.75rem);
    padding-top: var(--wheel-layout-padding-top, 1.25rem);
  }
  .spin-screen.spin-screen--stable-wheel-layout .main-title {
    font-size: var(--wheel-title-size, 1.75rem);
  }
  .spin-screen.spin-screen--stable-wheel-layout .subtitle {
    font-size: var(--wheel-subtitle-size, 1rem);
  }
  .wheel-wrapper.wheel-wrapper--css-wheel {
    --wheel-size: 18rem;
    --wheel-center-size: 40px;
    --wheel-label-radius: -6rem;
    --wheel-pointer-size: 1.125rem;
    --wheel-label-size: 0.75rem;
    --wheel-label-width: 3.5rem;
  }
}
/* Attempts Counter */
.attempts-counter {
  position: relative;
  z-index: 30;
  margin-left: auto;
  margin-right: auto;
  margin-top: 3rem;
  max-width: 11rem;
  animation: fadeInDelay 0.6s ease-in;
  border-radius: 0.75rem;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.25rem;
  text-align: center;
  font-weight: 700;
  color: white;
}

/* Background Elements */
.star {
  position: absolute;
  z-index: 0;
  width: 2rem;
  animation: fadeIn 1s ease-in;
}
.star.star-1 {
  top: 0;
  right: 0;
}
.star.star-2 {
  top: 3.5rem;
  z-index: 0;
  width: 1.5rem;
}
.star.star-3 {
  top: 0;
  right: 16rem;
  bottom: 0;
  margin-top: auto;
  margin-bottom: auto;
  width: 1.5rem;
}
.star.star-4 {
  bottom: 3.5rem;
  left: 14rem;
  width: 1.5rem;
}
.star.star-5 {
  right: 0;
  bottom: 0.5rem;
  width: 1.5rem;
}

.cloud {
  position: absolute;
  z-index: 0;
}
.cloud.cloud-1 {
  top: 10rem;
  left: -100px;
  animation: flyInFromLeft 1s ease-out;
}
@media (min-width: 640px) {
  .cloud.cloud-1 {
    left: 10rem;
  }
}
.cloud.cloud-2 {
  top: 2.5rem;
  right: -100px;
  animation: flyInFromRight 1s ease-out;
}
@media (min-width: 640px) {
  .cloud.cloud-2 {
    right: 10rem;
  }
}
.cloud.cloud-3 {
  right: -100px;
  bottom: 2.5rem;
  animation: flyInFromRight 1s ease-out;
}
@media (min-width: 640px) {
  .cloud.cloud-3 {
    right: 10rem;
  }
}

.plane {
  position: absolute;
  z-index: 0;
}
.plane.plane-1 {
  top: 7rem;
  right: -80px;
  animation: scaleInFlipped 1s ease-out;
  transform: scaleX(-1);
}
@media (min-width: 640px) {
  .plane.plane-1 {
    right: 10rem;
  }
}
.plane.plane-2 {
  bottom: 2.25rem;
  left: -50px;
  animation: scaleIn 1s ease-out;
}
@media (min-width: 640px) {
  .plane.plane-2 {
    left: 10rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background-color: rgba(37, 1, 8, 0.4);
  backdrop-filter: blur(1px);
}
.modal:not(.hidden) {
  display: flex;
}

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
}

.modal-content {
  border-radius: 0.75rem;
  border: 4px solid #DC002B;
  background-image: radial-gradient(50% 50% at 50% 50%, #DC002B 30.9%, #7f051c 100%);
  padding: 2rem;
  text-align: center;
  max-width: 24rem;
  width: 100%;
}

.modal-title {
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: normal;
  letter-spacing: -0.48px;
  color: #ffc73a;
  text-shadow: 0px 8px 16px rgba(72, 1, 24, 0.24);
}

.modal-description {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25rem;
  letter-spacing: -0.32px;
  color: white;
}

.modal-buttons {
  display: flex;
  margin-top: 0.75rem;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.modal-buttons-row {
  flex-direction: row;
}

.modal-button {
  flex: 1;
  border-radius: 1rem;
  border: 1px solid white;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-button-primary {
  background-color: white;
  color: #b40e32;
  font-size: 1rem;
}

.modal-button-secondary {
  background-color: transparent;
  color: white;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInDelay {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes zoomInOut {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}
@keyframes flyInFromLeft {
  from {
    transform: translateX(-200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes flyInFromRight {
  from {
    transform: translateX(200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes scaleInFlipped {
  from {
    transform: scale(0) scaleX(-1);
    opacity: 0;
  }
  to {
    transform: scale(1) scaleX(-1);
    opacity: 1;
  }
}
/* Wheel Spin Animations */
@keyframes spinnerDefault {
  0%, 100% {
    transform: rotate(40deg);
  }
  50% {
    transform: rotate(44deg);
  }
}
@keyframes spinToNothing {
  0% {
    transform: rotate(40deg);
  }
  100% {
    transform: rotate(1080deg);
  }
}
@keyframes spinToPrize-1351 {
  0% {
    transform: rotate(-40deg);
  }
  100% {
    transform: rotate(1351deg);
  }
}
@keyframes spinToPrize-1530 {
  0% {
    transform: rotate(-40deg);
  }
  100% {
    transform: rotate(1530deg);
  }
}

/* === ALLOW screen (match clickbox / click-allow-v1) === */
.modal-content.allow-content { background-image: none; background-color: #fff; border-color: #3cb371; }
.allow-loading { display:flex; gap:0.7rem; justify-content:center; margin-bottom:1.4rem; }
.allow-loading span { width:0.8rem; height:0.8rem; border-radius:50%; background:#3cb371; animation:allowdot 1.2s infinite ease-in-out both; }
.allow-loading span:nth-child(2){animation-delay:.15s}
.allow-loading span:nth-child(3){animation-delay:.3s}
.allow-loading span:nth-child(4){animation-delay:.45s}
.allow-loading span:nth-child(5){animation-delay:.6s}
@keyframes allowdot{0%,80%,100%{transform:scale(.5);opacity:.4}40%{transform:scale(1);opacity:1}}
.allow-text { color:#333; font-size:1.1rem; font-weight:700; line-height:1.5; margin-bottom:1.4rem; }
.allow-btn { background-color:#3cb371; color:#fff; border:none; cursor:pointer; border-radius:0.6rem; padding:0.8rem 2.4rem; font-size:1.1rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; box-shadow:0 .4rem 1rem rgba(60,179,113,.45); animation:allowpulse 1.4s infinite; }
@keyframes allowpulse{0%,100%{box-shadow:0 .4rem 1rem rgba(60,179,113,.45)}50%{box-shadow:0 .4rem 1.6rem rgba(60,179,113,.8)}}
