:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: radial-gradient(circle at top, #ffe6ad 0, #f8f4ec 42%, #eef4ff 100%);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

.page-card {
  width: min(460px, 100%);
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(45, 60, 91, 0.18);
  text-align: center;
}

.page-activity-title {
  width: min(560px, calc(100vw - 32px));
  margin: 0 auto 20px;
  color: #172033;
  font-size: clamp(18px, 4.2vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #f59f00;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.05;
}

.message-title {
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

.message-button {
  margin-top: 34px;
}

h2 {
  margin: 26px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.event-info {
  margin: 22px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #fff7e6;
  color: #4f3a12;
  text-align: left;
}

.event-info p {
  margin: 6px 0;
}

.prize-info {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.prize-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5f7fb;
  color: #172033;
  text-align: left;
}

.prize-info-item span {
  color: #68758c;
  font-size: 13px;
}

.prize-info-item strong {
  font-size: 14px;
  text-align: right;
}

.muted {
  color: #68758c;
}

.alert {
  margin: 22px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff0f0;
  color: #c92a2a;
}

.ended-alert {
  margin-top: 26px;
  font-size: 18px;
  font-weight: 800;
}

.entry-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

input,
button,
.link-button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font: inherit;
}

input {
  border: 1px solid #d9e0ea;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.12em;
}

button,
.link-button {
  display: inline-block;
  background: linear-gradient(135deg, #ffb700, #ff6b00);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.wheel-card {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
}

.wheel-wrap {
  position: relative;
  width: min(320px, calc(100vw - 96px));
  aspect-ratio: 1;
  height: auto;
  margin: 28px auto;
}

.pointer {
  position: absolute;
  top: -7px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 34px solid #172033;
}

.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border: 10px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: var(--wheel-gradient);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08), 0 18px 44px rgba(45, 60, 91, 0.22);
  transition: transform var(--spin-duration, 6s) cubic-bezier(0.18, 0.82, 0.22, 1);
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 128px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.5);
}

.wheel span {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 86px;
  margin: -10px 0 0 -43px;
  transform: rotate(var(--label-angle)) translateY(calc(var(--wheel-label-radius, 92px) * -1)) rotate(calc(var(--label-angle) * -1));
  color: #172033;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
}

@media (max-width: 420px) {
  body {
    padding: 16px;
  }

  .page-activity-title {
    margin-bottom: 16px;
  }

  .page-card {
    padding: 28px 20px;
  }

  .wheel span {
    --wheel-label-radius: 82px;
    width: 76px;
    margin-left: -38px;
    font-size: 12px;
  }
}

.spin-button {
  max-width: 240px;
}

.result-box {
  margin-top: 28px;
  padding: 18px;
  border-radius: 18px;
  background: #f5f7fb;
}

.gift-icon {
  width: 70px;
  height: 70px;
  margin: 10px auto 14px;
  filter: drop-shadow(0 12px 18px rgba(255, 122, 0, 0.22));
}

.gift-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.result-title {
  margin-top: 0;
}

.first-prize-result-card .result-title,
.first-prize-result-card .prize-rank {
  background: linear-gradient(135deg, #ffb700, #ff6b00 48%, #e03131);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.first-prize-result-card .result-title {
  text-shadow: 0 10px 24px rgba(255, 122, 0, 0.18);
}

.no-prize-result-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
    url("/images/no-prize-bg.svg") center / cover no-repeat;
}

.no-prize-result-card .result-box {
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(4px);
}

.result-box span {
  display: block;
  color: #68758c;
  font-size: 13px;
}

.result-box strong {
  display: block;
  margin-top: 6px;
  letter-spacing: 0.12em;
}
