/* XCasino same-page backfix wheel. Mobile-first, no external assets except the supplied character cutout. */
:root {
  --xc-red: #ff263f;
  --xc-blue: #0b4bff;
  --xc-navy: #05091c;
  --xc-gold: #ffd76a;
  --xc-wheel-size: min(80vw, 344px);
}

#xc-backfix {
  position: fixed;
  inset: 0;
  z-index: 2147480000;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 37, 63, .34), transparent 31%),
    radial-gradient(circle at 92% 38%, rgba(0, 87, 255, .42), transparent 34%),
    radial-gradient(circle at 50% 106%, rgba(255, 215, 106, .20), transparent 38%),
    linear-gradient(168deg, #08143b 0%, #05091c 47%, #13061f 100%);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: contain;
}

#xc-backfix.is-active { display: block; }
body.xc-backfix-active { overflow: hidden !important; }

#xc-backfix::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #ffdc79 0 1px, transparent 1.5px);
  background-position: 10px 10px, 34px 40px;
  background-size: 52px 52px, 74px 74px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.xc-backfix-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.xc-flag-band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--xc-red) 0 42px, #fff 42px 84px, var(--xc-blue) 84px 126px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .32);
}

.xc-brand {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1;
  letter-spacing: -.055em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #000, 0 0 26px rgba(255, 215, 106, .28);
}

.xc-brand-x {
  color: var(--xc-red);
  font-size: 1.24em;
  font-style: italic;
  transform: skewX(-8deg);
}

.xc-brand-stars {
  display: inline-flex;
  gap: 3px;
  color: var(--xc-gold);
  font-size: 10px;
  letter-spacing: 0;
  transform: translateY(-1px);
}

.xc-kicker {
  position: relative;
  z-index: 8;
  margin: 8px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  text-align: center;
  text-transform: uppercase;
}

.xc-headline {
  position: relative;
  z-index: 8;
  margin: 5px 0 0;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(23px, 7vw, 34px);
  line-height: .96;
  letter-spacing: -.045em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.xc-headline em {
  color: var(--xc-gold);
  font-style: normal;
}

.xc-arena {
  position: relative;
  width: 100%;
  height: clamp(515px, 65svh, 610px);
  margin-top: 2px;
}

.xc-character-frame {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 50%;
  width: min(108vw, 480px);
  height: clamp(265px, 35svh, 330px);
  overflow: hidden;
  transform: translateX(-50%);
  pointer-events: none;
}

.xc-character {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.52));
  transform: translateY(0);
}

.xc-flag {
  position: absolute;
  z-index: 0;
  top: 56px;
  width: 124px;
  height: 75px;
  border: 2px solid rgba(255,255,255,.58);
  border-radius: 7px;
  opacity: .78;
  box-shadow: 0 12px 30px rgba(0,0,0,.34);
  overflow: hidden;
  background: repeating-linear-gradient(to bottom, #b22234 0 5.8px, #fff 5.8px 11.6px);
}

.xc-flag::before {
  content: "★ ★ ★\A ★ ★ ★\A★ ★ ★";
  white-space: pre;
  position: absolute;
  inset: 0 auto auto 0;
  width: 52px;
  height: 42px;
  padding-top: 3px;
  box-sizing: border-box;
  color: #fff;
  background: #17356f;
  font-size: 8px;
  line-height: 11px;
  letter-spacing: 2px;
  text-align: center;
}

.xc-flag-left { left: -25px; transform: rotate(-13deg); }
.xc-flag-right { right: -25px; transform: rotate(13deg); }

.xc-wheel-rig {
  position: absolute;
  z-index: 4;
  top: clamp(190px, 24svh, 224px);
  left: 50%;
  width: var(--xc-wheel-size);
  height: var(--xc-wheel-size);
  transform: translateX(-50%);
}

.xc-wheel-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,106,.42), rgba(255,38,63,.16) 58%, transparent 70%);
  filter: blur(10px);
  animation: xcPulse 1.8s ease-in-out infinite alternate;
}

.xc-wheel-bezel {
  position: absolute;
  inset: 0;
  padding: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff1a8 0%, #b16800 28%, #ffe790 48%, #7c4200 72%, #ffd867 100%);
  box-shadow:
    0 0 0 4px #4b2500,
    0 17px 38px rgba(0,0,0,.62),
    inset 0 2px 5px rgba(255,255,255,.8);
  box-sizing: border-box;
}

.xc-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border: 4px solid #271500;
  border-radius: 50%;
  box-sizing: border-box;
  background: conic-gradient(from -22.5deg,
    #d7193f 0deg 45deg,
    #123ea5 45deg 90deg,
    #f6f4e8 90deg 135deg,
    #d7193f 135deg 180deg,
    #123ea5 180deg 225deg,
    #f6f4e8 225deg 270deg,
    #d7193f 270deg 315deg,
    #123ea5 315deg 360deg);
  transition: transform 4.15s cubic-bezier(.09,.74,.12,1);
  will-change: transform;
}

.xc-wheel::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px dashed rgba(255, 222, 119, .7);
  border-radius: 50%;
  pointer-events: none;
}

.xc-segment {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 76px;
  margin-left: -38px;
  color: #fff;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(13px, 3.8vw, 17px);
  line-height: .9;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 2px rgba(0,0,0,.8);
  transform: rotate(var(--angle)) translateY(calc(var(--xc-wheel-size) * -.355)) rotate(var(--counter));
  transform-origin: 38px 0;
}

.xc-segment.light { color: #06143f; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.xc-segment small { display: block; margin-top: 3px; font-size: .72em; letter-spacing: .02em; }

.xc-pointer {
  position: absolute;
  z-index: 7;
  top: -18px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #fff4b1;
  filter: drop-shadow(0 4px 2px rgba(0,0,0,.58));
}

.xc-spin-button {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: 94px;
  height: 94px;
  transform: translate(-50%, -50%);
  border: 5px solid #ffe98d;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, #ff6679, #df1738 55%, #7f071a 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,.5), inset 0 3px 4px rgba(255,255,255,.38), 0 0 0 5px #7b4200;
  cursor: pointer;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 17px;
  line-height: .92;
  letter-spacing: -.02em;
  text-align: center;
  text-transform: uppercase;
  transition: transform 140ms cubic-bezier(.23,1,.32,1), filter 160ms ease;
}

.xc-spin-button:hover { filter: brightness(1.09); }
.xc-spin-button:active { transform: translate(-50%, -50%) scale(.96); }
.xc-spin-button:disabled { cursor: wait; filter: saturate(.68); }
.xc-spin-button small { display: block; margin-top: 4px; font-family: "Space Grotesk", sans-serif; font-size: 9px; letter-spacing: .08em; }

.xc-wheel-lights {
  position: absolute;
  z-index: 6;
  inset: 5px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, #fff8c9 0 2deg, transparent 2deg 15deg);
  mask: radial-gradient(circle, transparent 0 45%, #000 46% 52%, transparent 53%);
  animation: xcLights 1.1s linear infinite;
}

.xc-prize-panel {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 0;
  width: min(94%, 430px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.xc-prize-card {
  min-height: 54px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(3, 8, 28, .78);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  text-align: center;
}

.xc-prize-card span {
  display: block;
  color: rgba(255,255,255,.58);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.xc-prize-card strong {
  display: block;
  margin-top: 3px;
  color: var(--xc-gold);
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 17px;
  line-height: 1;
  text-transform: uppercase;
}

.xc-prize-card.is-empty strong { color: rgba(255,255,255,.24); }

.xc-fine-print {
  position: relative;
  z-index: 8;
  margin: 2px 0 0;
  color: rgba(255,255,255,.52);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.xc-toast {
  position: fixed;
  z-index: 2147480100;
  left: 50%;
  top: 18%;
  min-width: 250px;
  padding: 13px 18px;
  transform: translate(-50%, -12px);
  border: 1px solid rgba(255,231,145,.65);
  border-radius: 999px;
  opacity: 0;
  color: #1b1100;
  background: linear-gradient(135deg, #fff6b0, #ffbd32);
  box-shadow: 0 18px 55px rgba(0,0,0,.48);
  pointer-events: none;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 15px;
  text-align: center;
  text-transform: uppercase;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.23,1,.32,1);
}

.xc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.xc-modal {
  position: fixed;
  z-index: 2147480200;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(1, 4, 16, .78);
  backdrop-filter: blur(9px);
}

.xc-modal.is-open { display: grid; }

.xc-modal-card {
  position: relative;
  width: min(100%, 420px);
  padding: 25px 20px 20px;
  overflow: hidden;
  border: 2px solid #ffe38a;
  border-radius: 27px;
  background:
    radial-gradient(circle at 15% 0, rgba(255,38,63,.36), transparent 42%),
    radial-gradient(circle at 95% 90%, rgba(11,75,255,.42), transparent 46%),
    linear-gradient(145deg, #111c4d, #08091a 58%, #1c0924);
  box-shadow: 0 30px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.15);
  text-align: center;
  animation: xcModalIn 260ms cubic-bezier(.23,1,.32,1) both;
}

.xc-modal-card::before {
  content: "★  ★  ★  ★  ★";
  display: block;
  margin-bottom: 8px;
  color: var(--xc-gold);
  font-size: 16px;
  letter-spacing: .18em;
}

.xc-modal-eyebrow {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.xc-modal-title {
  margin: 7px 0 5px;
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: clamp(30px, 9vw, 42px);
  line-height: .92;
  letter-spacing: -.05em;
  text-transform: uppercase;
}

.xc-modal-subtitle { margin: 0; color: rgba(255,255,255,.68); font-size: 13px; }

.xc-modal-prizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 18px 0;
}

.xc-modal-prize {
  padding: 13px 8px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
}

.xc-modal-prize span { display: block; color: rgba(255,255,255,.58); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.xc-modal-prize strong { display: block; margin-top: 5px; color: var(--xc-gold); font-family: "Archivo Black", Impact, sans-serif; font-size: clamp(21px, 7vw, 29px); text-transform: uppercase; }

.xc-claim-cta {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff334b, #d6072c 62%, #9d001a);
  box-shadow: 0 12px 28px rgba(255, 20, 53, .3), inset 0 1px 0 rgba(255,255,255,.34);
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 20px;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 150ms cubic-bezier(.23,1,.32,1), filter 150ms ease;
}

.xc-claim-cta:hover { color: #fff; filter: brightness(1.08); }
.xc-claim-cta:active { transform: scale(.97); }

@keyframes xcPulse { from { opacity: .62; transform: scale(.97); } to { opacity: 1; transform: scale(1.035); } }
@keyframes xcLights { to { transform: rotate(360deg); } }
@keyframes xcModalIn { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-height: 760px) {
  :root { --xc-wheel-size: min(72vw, 290px); }
  .xc-brand { font-size: 28px; }
  .xc-kicker { margin-top: 5px; }
  .xc-headline { font-size: 22px; }
  .xc-arena { height: 475px; }
  .xc-character-frame { width: 390px; height: 245px; }
  .xc-wheel-rig { top: 176px; }
  .xc-prize-panel { bottom: 2px; }
}

@media (min-width: 700px) {
  #xc-backfix { padding: 24px 0; }
  .xc-backfix-shell {
    min-height: min(900px, calc(100svh - 48px));
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 30px;
    box-shadow: 0 35px 100px rgba(0,0,0,.48);
  }
}

@media (prefers-reduced-motion: reduce) {
  .xc-wheel { transition-duration: 900ms; }
  .xc-wheel-glow, .xc-wheel-lights { animation: none; }
}
