@import url("https://fonts.googleapis.com/css2?family=Carter+One&display=swap");
:root {
  --slot-bg: rgba(12, 12, 16, 0.72);
  --slot-border: rgba(255, 255, 255, 0.08);
  --soft-white: rgba(255, 255, 255, 0.86);
  --muted-white: rgba(255, 255, 255, 0.58);
  --backdrop: blur(14px);
}

body {
  color: #fff;
}

.spin-page {
  max-width: 1100px;
  margin: auto;
  padding: clamp(32px, 6vw, 58px) 15px;
  text-align: center;
}

.title {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  font-style: italic;
  text-shadow:
    0 0 65px color-mix(in srgb, var(--main) 55%, transparent),
    0 8px 30px rgba(0, 0, 0, 0.45);
}

.slot-box {
  position: relative;
  max-width: 1050px;
  height: 165px;
  margin: 34px auto;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 45%),
    var(--slot-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--backdrop);
  -webkit-backdrop-filter: var(--backdrop);
}

.slot-box::before,
.slot-box::after {
  content: "";
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.slot-box::before {
  left: 0;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.95), transparent);
}
.slot-box::after {
  right: 0;
  background: linear-gradient(270deg, rgba(5, 5, 6, 0.95), transparent);
}

.slot-track {
  display: flex;
  gap: 12px;
  height: 100%;
  align-items: center;
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.slot-item {
  width: 150px;
  height: 130px;
  flex: 0 0 150px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(var(--item-rgb, 255, 138, 0), 0.22),
    rgba(255, 255, 255, 0.035) 45%,
    rgba(0, 0, 0, 0.24) 100%
  );
  border: 1px solid rgba(var(--item-rgb, 255, 138, 0), 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
}
.slot-item img {
  max-width: 66px;
  max-height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.42));
}
.slot-item span {
  font-size: 13px;
  margin-top: 10px;
  font-weight: 800;
  color: var(--soft-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}
.pointer::before {
  content: "";
  display: block;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid #ffd56a;
  filter: drop-shadow(0 0 10px rgba(255, 190, 40, 0.8));
}
.pointer-line {
  width: 2px;
  height: 140px;
  margin: auto;
  background: linear-gradient(#ffd56a, rgba(255, 213, 106, 0.05));
  box-shadow: 0 0 16px rgba(255, 190, 40, 0.55);
}

.btn-spin,
.btn-outline-spin {
  min-width: 165px;
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.btn-spin {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(
    135deg,
    var(--main),
    color-mix(in srgb, var(--main) 75%, #000)
  );
  /* box-shadow:
        0 10px 24px color-mix(in srgb, var(--main) 30%, transparent),
        inset 0 1px 0 rgba(255,255,255,.25); */
}
.btn-spin:hover {
  color: #fff;
  transform: translateY(-2px);
  /* box-shadow:
        0 14px 32px color-mix(in srgb, var(--main) 42%, transparent),
        inset 0 1px 0 rgba(255,255,255,.28); */
}
.btn-outline-spin {
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--main) 58%, transparent);
  background: color-mix(in srgb, var(--main) 10%, transparent);
}
.btn-outline-spin:hover {
  color: #fff;
  background: color-mix(in srgb, var(--main) 18%, transparent);
  transform: translateY(-2px);
}

/* ── Prize Pool ─────────────────────────────────────────────── */
.prize-pool {
  max-width: 1050px;
  margin: 55px auto 0;
  text-align: left;
}
.prize-pool h5 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  padding-left: 14px;
  border-left: 4px solid var(--main);
  margin-bottom: 16px;
}
.prize-card {
  position: relative;
  height: 96px;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(var(--item-rgb, 255, 138, 0), 0.22) 0%,
    rgba(var(--item-rgb, 255, 138, 0), 0.1) 38%,
    rgba(18, 18, 22, 0.92) 100%
  );
  border: 1px solid rgba(var(--item-rgb, 255, 138, 0), 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 25px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  will-change: transform;
}
.prize-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    transparent 42%
  );
  opacity: 0.9;
}
.prize-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--item-rgb, 255, 138, 0), 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(var(--item-rgb, 255, 138, 0), 0.12);
}
.prize-card img {
  height: 43px;
  max-width: 92px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 9px rgba(var(--item-rgb, 255, 138, 0), 0.3))
    drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}
.prize-card .prize-name {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  color: color-mix(in srgb, var(--item-color, #fff) 82%, #fff 18%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Reward Screen ──────────────────────────────────────────── */
.reward-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  background-color: #00000045;
  /* background:
    radial-gradient(circle at center, rgba(255, 123, 0, 0.13), transparent 28%),
    radial-gradient(circle at center, #082026 0%, #030506 52%, #000 100%); */
  backdrop-filter: var(--backdrop);
  -webkit-backdrop-filter: var(--backdrop);
  border-radius: 25px;
}
.reward-screen.is-show {
  display: flex !important;
  animation: rewardScreenIn 0.22s ease both;
}
.reward-screen.is-hide {
  display: flex !important;
  animation: rewardScreenOut 0.22s ease both;
}

.reward-skip {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 900;
  transition: 0.18s ease;
}
.reward-skip:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.reward-item-show {
  text-align: center;
  animation: rewardZoomIn 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
  will-change: transform, opacity;
}
.reward-item-show.is-out {
  animation: rewardZoomOut 0.28s ease both;
}
.reward-item-show img {
  width: 155px;
  height: 155px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.14))
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.44));
}

.reward-amount {
  font-size: clamp(44px, 7vw, 64px);
  font-weight: 950;
  line-height: 1;
  font-style: italic;
  letter-spacing: -1px;
}
.reward-name {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 900;
  color: var(--soft-white);
}
.reward-rare {
  margin-top: 12px;
  letter-spacing: 5px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted-white);
}

/* ── Reward Summary ─────────────────────────────────────────── */
.reward-summary-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 972px;
  margin: 0 auto;
}

.reward-summary-card {
  width: 180px;
  flex-shrink: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(var(--item-rgb, 255, 138, 0), 0.22),
    rgba(18, 18, 22, 0.96) 72%
  );
  border: 1px solid rgba(var(--item-rgb, 255, 138, 0), 0.2);
  border-radius: 16px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}
.reward-summary-card img {
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(var(--item-rgb, 255, 138, 0), 0.35));
}

.reward-summary-popup {
  width: fit-content !important;
  min-width: 900px;
  max-width: calc(100vw - 28px) !important;
  border-radius: 25px;
  background: rgba(8, 8, 10, 0.5) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  /* border: 1px solid color-mix(in srgb, var(--main) 30%, transparent) !important;
  box-shadow:
    0 0 60px color-mix(in srgb, var(--main) 15%, transparent),
    0 24px 60px rgba(0, 0, 0, 0.55) !important; */
}

.reward-summary-popup .swal2-html-container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
  border-radius: 25px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.reward-summary-in {
  animation: summaryZoomIn 0.25s cubic-bezier(0.2, 0.9, 0.25, 1.1) both !important;
}
.reward-summary-out {
  animation: summaryZoomOut 0.18s ease both !important;
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes rewardScreenIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes rewardScreenOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes rewardZoomIn {
  from {
    opacity: 0;
    transform: scale(0.55) translateY(26px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}
@keyframes rewardZoomOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(1.22) translateY(-18px);
    filter: blur(8px);
  }
}
@keyframes summaryZoomIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}
@keyframes summaryZoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .slot-box {
    height: 145px;
    border-radius: 16px;
  }
  .slot-item {
    width: 108px;
    height: 110px;
    flex-basis: 108px;
    border-radius: 14px;
  }
  .slot-item img {
    max-width: 52px;
    max-height: 52px;
  }
  .slot-item span {
    font-size: 12px;
  }
  .pointer-line {
    height: 122px;
  }
  .reward-summary-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}
@media (max-width: 420px) {
  .spin-page {
    padding-inline: 10px;
  }
  .slot-box::before,
  .slot-box::after {
    width: 70px;
  }
  .btn-spin,
  .btn-outline-spin {
    width: 100%;
    min-width: 0;
  }
  .reward-summary-grid {
    grid-template-columns: 1fr;
  }
}
