:root {
  --sky-1: #15a6ff;
  --sky-2: #0587eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 100%);
}

body {
  display: flex;
  justify-content: center;
}

button {
  font: inherit;
}

.app {
  width: 100%;
  display: flex;
  justify-content: center;
}

.phone {
  width: min(100%, 430px);
}

.screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, #13abff 0%, #0492f1 64%, #0586ea 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.screen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.98;
  pointer-events: none;
}

.wheel-stage {
  position: relative;
  z-index: 2;
  min-height: 100svh;
}

.wheel-wrap {
  position: absolute;
  left: 50%;
  top: clamp(220px, 31vh, 305px);
  transform: translateX(-50%);
  width: min(82vw, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wheel-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.wheel-shadow {
  position: absolute;
  left: 11%;
  right: 11%;
  bottom: 8%;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(9px);
}

.wheel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  filter: drop-shadow(0 16px 24px rgba(0, 36, 95, 0.26));
}

.pointer {
  position: absolute;
  left: 50%;
  top: -2.5%;
  width: 24%;
  transform: translateX(-50%);
  z-index: 3;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
  pointer-events: none;
}

.spin-btn {
  margin-top: 18px;
  position: relative;
  z-index: 4;
  width: min(79%, 280px);
  border: 0;
  border-radius: 999px;
  padding: 17px 24px;
  font-size: clamp(18px, 4.3vw, 28px);
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, #1de26e 0%, #03b754 100%);
  box-shadow: 0 11px 0 #24a4f4, 0 20px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.spin-btn:hover {
  filter: brightness(1.03);
}

.spin-btn:active {
  transform: translateY(4px);
  box-shadow: 0 6px 0 #24a4f4, 0 14px 20px rgba(0, 0, 0, 0.2);
}

.spin-btn:disabled {
  cursor: not-allowed;
  opacity: 0.82;
}

.bottom-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 66px;
  background: linear-gradient(180deg, rgba(8, 139, 227, 0.78) 0%, rgba(9, 153, 246, 0.9) 100%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 23, 63, 0.6);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  animation: popIn 0.3s ease;
}

.result-link,
.result-banner {
  display: block;
  width: 100%;
}

.result-banner {
  background: #f5f5f5;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #1c2d50;
  font-size: 26px;
  cursor: pointer;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 430px) {
  .wheel-wrap {
    top: clamp(205px, 29vh, 275px);
    width: min(84vw, 332px);
  }

  .spin-btn {
    width: min(81%, 280px);
    padding: 16px 22px;
  }
}

@media (max-width: 360px) {
  .wheel-wrap {
    top: clamp(190px, 27vh, 245px);
    width: min(86vw, 300px);
  }

  .spin-btn {
    font-size: 18px;
    padding: 15px 18px;
  }
}
