/* Lucky wheel visual skin. Business state and draw behavior stay in app.js. */
.lucky-wheel-page {
  --lucky-page-bg: #f0f2ff;
  --lucky-surface: #ffffff;
  --lucky-wheel-dark: #343741;
  --lucky-wheel-mid: #40434d;
  --lucky-gold: #b98046;
  --lucky-gold-soft: #ecd1ab;
  --lucky-accent: #f06452;
  --lucky-text: #333743;
  --lucky-muted: #737a89;
  --lucky-stripe: #f8f8fc;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 48px;
  overflow-x: hidden;
  color: var(--lucky-text);
  background: var(--lucky-page-bg);
  box-shadow: 0 0 30px rgba(48, 54, 76, 0.12);
}

.lucky-wheel-head {
  min-height: 64px;
  padding: env(safe-area-inset-top) 14px 0;
  color: #3c414b;
  background: var(--lucky-surface);
}

.lucky-wheel-top {
  height: 64px;
  grid-template-columns: 48px 1fr 48px;
}

.lucky-wheel-back {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3c414b;
  font-size: 38px;
  font-weight: 300;
}

.lucky-wheel-title {
  font-size: 22px;
  font-weight: 500;
}

.lucky-wheel-hero {
  display: none;
}

.lucky-wheel-body {
  display: grid;
  gap: 22px;
  margin-top: 0;
  padding: 0 0 40px;
}

.lucky-wheel-card {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lucky-wheel-stage {
  position: relative;
  padding: 20px 0 0;
  background-color: var(--lucky-page-bg);
  background-image: url("/assets/lucky-wheel-skin/top-bg.png");
  background-repeat: no-repeat;
  background-position: center 28px;
  background-size: 100% auto;
  text-align: center;
}

.lucky-wheel-page .wheel-pointer {
  display: none;
}

.lucky-wheel-page .wheel-disc-wrap {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(calc(100% - 16px), 500px);
  aspect-ratio: 1;
  margin: 0 auto;
  place-items: center;
  background: url("/assets/lucky-wheel-skin/wheel-frame.png") center / contain no-repeat;
}

.lucky-wheel-page .wheel-disc-wrap::before {
  position: absolute;
  z-index: 3;
  top: 1.5%;
  left: 31.4%;
  width: 37.2%;
  aspect-ratio: 516 / 692;
  background: url("/assets/lucky-wheel-skin/wheel-pointer.png") center / contain no-repeat;
  content: "";
  pointer-events: none;
}

.lucky-wheel-page .wheel-disc {
  z-index: 1;
  inset: 8.7%;
  overflow: hidden;
  border: 1px solid rgba(24, 27, 34, 0.34);
  border-radius: 50%;
  background: conic-gradient(
    from 90deg,
    var(--lucky-wheel-dark) 0deg 45deg,
    var(--lucky-wheel-mid) 45deg 90deg,
    var(--lucky-wheel-dark) 90deg 135deg,
    var(--lucky-wheel-mid) 135deg 180deg,
    var(--lucky-wheel-dark) 180deg 225deg,
    var(--lucky-wheel-mid) 225deg 270deg,
    var(--lucky-wheel-dark) 270deg 315deg,
    var(--lucky-wheel-mid) 315deg 360deg
  ) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  transition: transform 0.9s cubic-bezier(0.18, 0.72, 0.22, 1);
}

.lucky-wheel-page .wheel-disc::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, transparent 0 57%, rgba(255, 255, 255, 0.04) 58%, transparent 73%);
  content: "";
  pointer-events: none;
}

.lucky-wheel-page .wheel-prize {
  z-index: 2;
  width: 50%;
  height: 1px;
  padding: 0;
  transform-origin: 0 50%;
  color: #f1d8b6;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.lucky-wheel-page .wheel-prize::before {
  position: absolute;
  top: 9px;
  left: 41%;
  width: 34px;
  aspect-ratio: 124 / 96;
  transform: translateX(-50%);
  background: url("/assets/lucky-wheel-skin/prize-envelope.png") center / contain no-repeat;
  content: "";
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.lucky-wheel-page .wheel-prize span {
  position: absolute;
  right: 8%;
  bottom: 8px;
  display: block;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1;
}

.lucky-wheel-page .wheel-prize span::before {
  content: "\00a5\00a0";
}

.lucky-wheel-page .wheel-prize span::after {
  content: "\5143";
}

.lucky-wheel-page .wheel-draw-btn {
  position: relative;
  z-index: 4;
  width: 26%;
  height: 30.3%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("/assets/lucky-wheel-skin/draw-button.png") center / contain no-repeat;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
}

.lucky-wheel-page .wheel-draw-btn:disabled {
  opacity: 1;
  filter: none;
  cursor: default;
}

.lucky-wheel-chance {
  display: inline-flex;
  width: max-content;
  min-height: 46px;
  max-width: calc(100% - 48px);
  align-items: center;
  justify-content: center;
  margin: -6px auto 0;
  padding: 0 25px;
  border: 1px solid #d7a76f;
  border-radius: 999px;
  background: linear-gradient(0deg, #fee4c4, #ffe7c7);
  color: #7b4b20;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.lucky-wheel-chance b {
  margin: 0 2px;
  color: var(--lucky-accent);
  font-size: inherit;
}

.lucky-wheel-result {
  min-height: 28px;
  margin: 8px 24px 0;
  color: var(--lucky-accent);
  font-size: 17px;
  font-weight: 800;
}

.lucky-wheel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 28px 0;
  border-block: 1px solid rgba(126, 136, 161, 0.16);
  background: rgba(255, 255, 255, 0.42);
}

.lucky-wheel-stat {
  min-width: 0;
  min-height: 68px;
  gap: 4px;
  border-color: rgba(126, 136, 161, 0.16);
  color: #7f8798;
  font-size: 12px;
}

.lucky-wheel-stat b {
  overflow-wrap: anywhere;
  color: #303642;
  font-size: 17px;
}

.lucky-wheel-panel {
  margin: 0 42px;
  border-radius: 7px;
  background: var(--lucky-surface);
  box-shadow: 6px 6px 18px rgba(209, 217, 248, 0.72);
}

.lucky-wheel-panel h3 {
  position: relative;
  min-height: 62px;
  justify-content: center;
  padding: 0 48px;
  border-bottom: 0;
  color: #414755;
  font-size: 20px;
  font-weight: 800;
}

.lucky-wheel-panel h3 span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  white-space: nowrap;
}

.lucky-wheel-panel h3 span::before,
.lucky-wheel-panel h3 span::after {
  width: 28px;
  height: 1px;
  background: #414755;
  content: "";
}

.lucky-wheel-panel h3 button {
  position: absolute;
  right: 14px;
  color: var(--lucky-accent);
  font-size: 13px;
}

.lucky-wheel-rules,
.lucky-wheel-records {
  display: grid;
  gap: 0;
  padding: 0 20px 22px;
}

.lucky-wheel-rules li {
  min-height: 42px;
  justify-content: center;
  padding: 7px 12px;
  border-bottom: 0;
  color: #343a47;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
}

.lucky-wheel-rules li:nth-child(even) {
  background: var(--lucky-stripe);
}

.lucky-wheel-record {
  min-height: 52px;
  border-bottom-color: #f0f1f5;
}

.lucky-wheel-record strong {
  color: #343a47;
}

.lucky-wheel-record b {
  color: var(--lucky-accent);
}

@media (max-width: 420px) {
  .lucky-wheel-head,
  .lucky-wheel-top {
    min-height: 54px;
    height: 54px;
  }

  .lucky-wheel-title {
    font-size: 20px;
  }

  .lucky-wheel-stage {
    padding-top: 14px;
  }

  .lucky-wheel-page .wheel-prize {
    padding: 0;
    font-size: 12px;
  }

  .lucky-wheel-page .wheel-prize span {
    right: 5%;
    bottom: 6px;
  }

  .lucky-wheel-page .wheel-prize::before {
    top: 7px;
    width: 27px;
  }

  .lucky-wheel-page .wheel-draw-btn {
    width: 26%;
    height: 30.3%;
    font-size: 0;
  }

  .lucky-wheel-chance {
    min-height: 42px;
    padding-inline: 20px;
    font-size: 17px;
  }

  .lucky-wheel-stats {
    margin-inline: 20px;
  }

  .lucky-wheel-panel {
    margin-inline: 24px;
  }

  .lucky-wheel-panel h3 {
    font-size: 18px;
  }

  .lucky-wheel-rules li {
    padding-inline: 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lucky-wheel-page .wheel-disc {
    transition-duration: 0.01ms;
  }
}
