/* ===== 通用 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ===== 登录页 ===== */
.login-body {
  background: linear-gradient(135deg, #F8BBD0 0%, #BBDEFB 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px 28px;
  box-shadow: 0 20px 60px rgba(180, 160, 200, 0.35);
  text-align: center;
  position: relative;
}
.login-title {
  font-size: 26px;
  font-weight: 800;
  color: #4A6FA5;
  letter-spacing: 2px;
  margin-bottom: 36px;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }
.field { text-align: left; }
.field label {
  display: block;
  font-size: 14px;
  color: #8a8a9a;
  margin-bottom: 6px;
  font-weight: 600;
}
.field input {
  width: 100%;
  height: 48px;
  border: 2px solid #E0E6F0;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  transition: border-color .2s;
}
.field input:focus { border-color: #EC407A; }
.btn-login {
  margin-top: 8px;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #EC407A, #42A5F5);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  transition: transform .1s, opacity .2s;
}
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.6; }
.login-tip { font-size: 13px; min-height: 18px; margin-top: 4px; }
.login-footer {
  margin-top: 28px;
  font-size: 15px;
  color: #9aa6c0;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ===== 抽奖页 ===== */
.raffle-body {
  background: radial-gradient(circle at 50% 20%, #F8BBD0 0%, #BBDEFB 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 16px 28px;
}
.raffle-header {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #4A6FA5;
  margin-bottom: 8px;
}
.raffle-header .user-info { font-size: 13px; opacity: .95; }
.raffle-header .user-info b { color: #D81B60; }
.btn-logout {
  background: rgba(236, 64, 122, .2);
  border: 1px solid rgba(236, 64, 122, .45);
  color: #AD1457;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
}
.raffle-title {
  color: #4A6FA5;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  margin: 6px 0 14px;
  text-shadow: 0 2px 8px rgba(180, 160, 200, .25);
}
.wheel-wrap {
  position: relative;
  width: 340px;
  height: 340px;
  max-width: 90vw;
  max-height: 90vw;
}
@media (max-width: 380px){ .wheel-wrap{ width: 300px; height: 300px; } }
.wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 5s cubic-bezier(0.17, 0.67, 0.21, 0.99);
}
.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: 30px solid #EC407A;
  filter: drop-shadow(0 2px 4px rgba(180, 160, 200, .4));
  z-index: 5;
}
.draw-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: radial-gradient(circle at 35% 30%, #EC407A, #42A5F5);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 6px 18px rgba(180, 160, 200, .4), inset 0 -4px 8px rgba(180, 160, 200, .2);
  z-index: 6;
  transition: transform .1s;
}
.draw-btn:active { transform: translate(-50%, -50%) scale(0.95); }
.draw-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.result-box {
  margin-top: 24px;
  min-height: 70px;
  width: 100%;
  max-width: 560px;
  text-align: center;
}
.result-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(244, 143, 177, .3);
  border-radius: 16px;
  padding: 14px 22px;
  color: #5a6a8a;
}
.result-card img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.result-card .prize-name { font-size: 20px; font-weight: 800; color: #E878A6; }
.result-card .prize-item { font-size: 14px; opacity: .9; margin-top: 2px; }
.notice { color: #8a93b0; font-size: 14px; line-height: 1.8; }

.prize-legend {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 560px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.6);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: #4A6FA5;
  font-weight: 600;
}
.legend-item .dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-item.exhausted { opacity: .45; text-decoration: line-through; }

/* ===== 二维码页 ===== */
.qr-body {
  background: linear-gradient(135deg, #F8BBD0, #BBDEFB);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: #4A6FA5;
}
.qr-body h1 { font-size: 28px; margin-bottom: 8px; letter-spacing: 3px; color: #4A6FA5; }
.qr-body .sub { font-size: 16px; opacity: .9; margin-bottom: 20px; color: #5a6a8a; }
.qr-body .qr-box {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(180, 160, 200, .35);
}
.qr-body .qr-box img { width: 280px; height: 280px; display: block; }
.qr-body .qr-tip {
  margin-top: 18px;
  max-width: 320px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(236, 64, 122, .3);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #5a4a6a;
  text-align: left;
}
.qr-body .qr-tip b { color: #D81B60; }
.qr-body .url { margin-top: 14px; font-size: 13px; opacity: .75; word-break: break-all; text-align: center; color: #5a6a8a; }

/* ===== 结果页 ===== */
.result-body {
  background: linear-gradient(135deg, #F8BBD0 0%, #BBDEFB 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  color: #4A5A7A;
}
.result-card-big {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 24px;
  padding: 36px 24px 24px;
  box-shadow: 0 20px 60px rgba(180, 160, 200, .35);
  text-align: center;
}
.result-card-big .congrats {
  font-size: 15px;
  color: #8a93b0;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.result-card-big .prize-title {
  font-size: 32px;
  font-weight: 800;
  color: #D81B60;
  margin-bottom: 18px;
  letter-spacing: 2px;
}
.prize-photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.prize-figure {
  width: 78px;
  height: 78px;
}
.prize-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(180, 160, 200, .35);
  border: 3px solid #F8BBD0;
}
.result-card-big .prize-items-line {
  font-size: 16px;
  color: #4A6FA5;
  font-weight: 700;
  margin-bottom: 6px;
}
.result-card-big .winner-name {
  font-size: 14px;
  color: #8a93b0;
  margin-bottom: 22px;
}
.result-card-big .redemption {
  margin-top: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(236,64,122,.18), rgba(66,165,245,.18));
  border: 1px dashed rgba(216, 27, 96, .5);
  border-radius: 12px;
  font-size: 14px;
  color: #AD1457;
  line-height: 1.7;
  font-weight: 600;
}
.result-card-big .redemption b { color: #D81B60; }
