* {
  box-sizing: border-box;
}

:root {
  --bg-1: #0d061d;
  --bg-2: #24104d;
  --glass: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #ffd166;
  --pink: #ff4da6;
  --purple: #8b5cf6;
  --cyan: #28d7f5;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(139, 92, 246, 0.42), transparent 38%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 55%, #100728);
}

button {
  font: inherit;
}

.background-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.34;
}

.orb-one {
  width: 340px;
  height: 340px;
  top: 8%;
  left: -130px;
  background: #ff2f92;
}

.orb-two {
  width: 420px;
  height: 420px;
  right: -180px;
  top: 35%;
  background: #2bd9fe;
}

.orb-three {
  width: 300px;
  height: 300px;
  left: 38%;
  bottom: -170px;
  background: #8b5cf6;
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 22px;
  text-align: center;
}

.hero {
  margin-bottom: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.logo-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #321653;
  background: linear-gradient(135deg, #fff4a8, #ffb52e);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.55);
}

.eyebrow {
  margin: 20px 0 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.26em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 8px 35px rgba(0, 0, 0, 0.3);
}

h1 span {
  color: var(--gold);
}

.subtitle {
  margin: 12px auto 0;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
}

.game-card {
  padding: 18px 18px 24px;
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.status-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin: 0 auto 8px;
}

.status-pill {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.15);
}

.status-icon {
  font-size: 25px;
}

.status-pill span:last-child {
  min-width: 0;
  text-align: left;
}

.status-pill small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.status-pill strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-area {
  position: relative;
  display: grid;
  width: min(72vh, 690px, 92vw);
  aspect-ratio: 1;
  margin: 6px auto 0;
  place-items: center;
}

.wheel-glow {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.35);
  filter: blur(48px);
  animation: glowPulse 2.4s ease-in-out infinite alternate;
}

.wheel-frame {
  position: relative;
  width: 88%;
  aspect-ratio: 1;
  padding: clamp(7px, 1.2vw, 12px);
  border: clamp(5px, 0.8vw, 9px) solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff7c7, #d8a52e 45%, #fff3a1);
  box-shadow:
    0 0 0 6px rgba(255, 209, 102, 0.24),
    0 0 45px rgba(255, 209, 102, 0.35),
    0 24px 55px rgba(0, 0, 0, 0.5);
}

#wheelCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.pointer {
  position: absolute;
  z-index: 8;
  top: 0.4%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 9px rgba(0, 0, 0, 0.42));
}

.pointer-head {
  width: clamp(38px, 6vw, 62px);
  height: clamp(54px, 8vw, 82px);
  transform: translateX(-50%);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background: linear-gradient(145deg, #fff7c2, #ffb82e 55%, #ff7a18);
  border-radius: 8px;
}

.spin-button {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(88px, 15vw, 132px);
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  border: clamp(5px, 0.8vw, 8px) solid #fff4b7;
  border-radius: 50%;
  color: #35125e;
  background: linear-gradient(145deg, #fff7a7, #ffc83d 52%, #ff9d23);
  box-shadow:
    0 0 0 5px rgba(78, 24, 124, 0.5),
    0 10px 25px rgba(0, 0, 0, 0.38),
    inset 0 4px 8px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: clamp(18px, 3vw, 27px);
  font-weight: 1000;
  letter-spacing: 0.05em;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.spin-button:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  filter: brightness(1.08);
}

.spin-button:active:not(:disabled) {
  transform: translate(-50%, -50%) scale(0.97);
}

.spin-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.78);
}

.spin-loader {
  display: none;
  width: 35%;
  height: 35%;
  border: 4px solid rgba(53, 18, 94, 0.22);
  border-top-color: #35125e;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

.spin-button.loading .spin-label {
  display: none;
}

.spin-button.loading .spin-loader {
  display: block;
}

.message {
  min-height: 24px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.message.error {
  color: #ffb8ca;
}

.message.success {
  color: #baf7db;
}

footer {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 3, 18, 0.76);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  padding: 36px 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 209, 102, 0.25), transparent 42%),
    linear-gradient(145deg, rgba(71, 32, 120, 0.98), rgba(25, 10, 55, 0.98));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.62);
  transform: translateY(24px) scale(0.92);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.trophy {
  font-size: 70px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
  animation: trophyBounce 1.1s ease-in-out infinite alternate;
}

.modal-kicker {
  margin: 8px 0 3px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
}

.modal h2 {
  margin: 0;
  font-size: 24px;
}

.winner-gift {
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff4a8;
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 1000;
  line-height: 1.05;
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.32);
}

.close-button {
  min-width: 150px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  color: #321653;
  background: linear-gradient(135deg, #fff4a8, #ffb52e);
  box-shadow: 0 9px 25px rgba(255, 181, 46, 0.28);
  cursor: pointer;
  font-weight: 900;
}

#effectsCanvas {
  position: fixed;
  z-index: 60;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes glowPulse {
  from { opacity: 0.55; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.06); }
}

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

@keyframes trophyBounce {
  from { transform: translateY(0) rotate(-3deg); }
  to { transform: translateY(-8px) rotate(3deg); }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 16px, 1100px);
    padding-top: 16px;
  }

  .hero {
    margin-bottom: 14px;
  }

  .eyebrow {
    margin-top: 13px;
  }

  .game-card {
    padding: 12px 8px 18px;
    border-radius: 24px;
  }

  .status-row {
    gap: 7px;
  }

  .status-pill {
    gap: 6px;
    padding: 9px 7px;
    border-radius: 14px;
  }

  .status-icon {
    display: none;
  }

  .status-pill small {
    font-size: 9px;
  }

  .status-pill strong {
    font-size: 13px;
  }

  .wheel-area {
    width: min(92vw, 580px);
  }

  .wheel-frame {
    width: 94%;
  }

  .pointer {
    top: -0.8%;
  }
}

@media (max-height: 760px) and (min-width: 700px) {
  .app-shell {
    padding-top: 14px;
  }

  .hero {
    margin-bottom: 10px;
  }

  .logo {
    padding: 6px 12px;
  }

  .eyebrow {
    margin-top: 10px;
  }

  h1 {
    font-size: 48px;
  }

  .subtitle {
    margin-top: 6px;
  }

  .wheel-area {
    width: min(62vh, 570px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
.logo{
    display:flex;
    align-items:center;
    justify-content:center;
}

.logo img{
    height:80px;
    width:auto;
    display:block;
}
#remainingGifts,
.stat-card:first-child{
    display:none;
}

.status-row{display:flex;justify-content:center;}
.status-pill{max-width:340px;width:100%;}
