* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 0%, #2b1055 0%, #0f0c29 60%, #050414 100%);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #fff;
  padding: 24px;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.25);
}

.subtitle {
  margin: 0 0 12px;
  color: #c9c3e6;
  font-size: 0.95rem;
}

.wheel-wrap {
  position: relative;
  width: min(520px, 88vw);
  height: min(520px, 88vw);
  margin: 12px 0;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

#wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid #fff;
  background: #fff;
  transform: rotate(0deg);
  display: block;
}

.wheel-wrap.spinning #wheel {
  transition: transform 4.5s cubic-bezier(0.18, 0.67, 0.1, 1);
}

.pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 32px solid #ffd400;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 5;
}

.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: linear-gradient(145deg, #ff4d6d, #c9184a);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

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

.hub:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.result {
  margin-top: 8px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

#resultText {
  font-size: clamp(1.2rem, 3.2vw, 1.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result.highlight #resultText {
  animation: pop 0.5s ease;
  color: #ffd400;
  text-shadow: 0 0 18px rgba(255, 212, 0, 0.7);
}

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
