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

* {
  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;
  padding: 0;
}

button {
  font: inherit;
}

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

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

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

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

.wheel-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 16px 180px;
}

.wheel-wrap {
  position: relative;
  width: min(90vw, 388px);
  aspect-ratio: 1 / 1.18;
}

.wheel-shadow {
  position: absolute;
  inset: auto 8% 4% 8%;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(8px);
}

.wheel {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 100%;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
  filter: drop-shadow(0 16px 24px rgba(0, 36, 95, 0.26));
}

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

.spin-btn {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  z-index: 4;
  width: min(78%, 300px);
  border: 0;
  border-radius: 999px;
  padding: 18px 26px;
  font-size: clamp(18px, 4.8vw, 28px);
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, #1de26e 0%, #03b754 100%);
  box-shadow: 0 10px 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: translateX(-50%) 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.8;
}

.bottom-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: linear-gradient(180deg, var(--sky-3) 0%, #0999f6 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-stage {
    padding: 100px 12px 170px;
  }

  .wheel-wrap {
    width: min(94vw, 380px);
  }

  .spin-btn {
    width: min(82%, 300px);
    padding: 17px 22px;
  }
}
