/* ========== 全局重置 & 基础设置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(ellipse at top, #3a0a2e 0%, #1a0520 45%, #0d0212 100%);
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* ========== 背景装饰 - 漂浮光点 ========== */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c4 0%, rgba(255, 215, 0, 0.6) 40%, transparent 70%);
  box-shadow: 0 0 12px 3px rgba(255, 215, 0, 0.5);
  animation: floatUp linear infinite;
}

.sparkle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, transparent 60%);
  animation: twinkle ease-in-out infinite alternate;
}

@keyframes floatUp {
  0%   { transform: translateY(110vh) scale(0.6); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

@keyframes twinkle {
  0%   { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 1;   transform: scale(1.3); }
}

/* 8个光点随机参数 */
.sparkle-1 { left: 8%;  animation-duration: 9s;  animation-delay: 0s;   width: 5px; height: 5px; }
.sparkle-2 { left: 22%; animation-duration: 12s; animation-delay: 1.5s; width: 8px; height: 8px; }
.sparkle-3 { left: 38%; animation-duration: 7s;  animation-delay: 3s;   width: 4px; height: 4px; }
.sparkle-4 { left: 52%; animation-duration: 10s; animation-delay: 0.8s; width: 7px; height: 7px; }
.sparkle-5 { left: 65%; animation-duration: 13s; animation-delay: 2.2s; width: 5px; height: 5px; }
.sparkle-6 { left: 78%; animation-duration: 8s;  animation-delay: 4s;   width: 6px; height: 6px; }
.sparkle-7 { left: 88%; animation-duration: 11s; animation-delay: 1s;   width: 9px; height: 9px; }
.sparkle-8 { left: 95%; animation-duration: 9.5s;animation-delay: 3.5s;  width: 5px; height: 5px; }

.sparkle-1::after, .sparkle-3::after, .sparkle-6::after { animation-duration: 1.2s; }
.sparkle-2::after, .sparkle-5::after, .sparkle-8::after { animation-duration: 1.8s; }
.sparkle-4::after, .sparkle-7::after { animation-duration: 2.1s; }

/* ========== 主容器布局 ========== */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 5vh, 48px) clamp(16px, 4vw, 32px);
}

/* ========== 标题 ========== */
.header {
  text-align: center;
  margin-bottom: clamp(20px, 4vh, 40px);
}

.title {
  font-size: clamp(28px, 7vw, 52px);
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #fff4c2 0%, #ffd700 45%, #ff9d00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 30px rgba(255, 215, 0, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.6);
  filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6));
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0%   { filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(255,215,0,0.3)); }
  100% { filter: drop-shadow(0 2px 0 rgba(139, 0, 0, 0.6)) drop-shadow(0 0 24px rgba(255,215,0,0.65)); }
}

.subtitle {
  margin-top: 8px;
  font-size: clamp(12px, 3vw, 16px);
  color: rgba(255, 215, 0, 0.75);
  letter-spacing: 3px;
  font-weight: 300;
}

/* ========== 转盘外层包装 ========== */
.wheel-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.wheel-wrapper {
  position: relative;
  width: clamp(300px, 85vw, 480px);
  height: clamp(300px, 85vw, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 外发光金边 */
.wheel-wrapper::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      #ffd700 0deg, #fff4a3 30deg, #ffb800 60deg, #ffe066 90deg,
      #ffd700 120deg, #fff4a3 150deg, #ffb800 180deg, #ffe066 210deg,
      #ffd700 240deg, #fff4a3 270deg, #ffb800 300deg, #ffe066 330deg,
      #ffd700 360deg);
  filter: blur(1px);
  box-shadow:
    0 0 40px 10px rgba(255, 180, 0, 0.45),
    0 0 80px 20px rgba(255, 100, 50, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.3);
  animation: ringSpin 20s linear infinite;
}

.wheel-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8b0000, #5a0015);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.15),
    inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ========== 转盘本体 ========== */
.wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* 8等分扇形 - 起始偏移-90deg使第一个扇形从12点方向开始 */
  background:
    conic-gradient(
      from -90deg,
      #FF4757 0deg 45deg,
      #FFA502 45deg 90deg,
      #FFD700 90deg 135deg,
      #2ED573 135deg 180deg,
      #1E90FF 180deg 225deg,
      #A55EEA 225deg 270deg,
      #FF7F50 270deg 315deg,
      #FF6B81 315deg 360deg
    );
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.85),
    inset 0 0 40px rgba(0, 0, 0, 0.25);
  transition: transform 5.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  will-change: transform;
  z-index: 2;
}

/* 8条径向分割线（叠加层） */
.wheel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from -90deg,
      transparent 0deg calc(45deg - 1.5deg),
      rgba(255, 255, 255, 0.9) calc(45deg - 1.5deg) 45deg
    );
  -webkit-mask: radial-gradient(circle, transparent 0%, transparent 12%, #000 13%, #000 100%);
  mask: radial-gradient(circle, transparent 0%, transparent 12%, #000 13%, #000 100%);
  pointer-events: none;
}

/* ========== 奖品标签（转盘转动时跟随转动） ========== */
.wheel-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wheel-label {
  position: absolute;
  left: 50%;
  top: 50%;
  /* 关键：锚点固定为元素中心，与 translate(-50%,-50%) 配合 → 元素中心先对齐圆心
     再 rotate + translateY(-rpx) 沿径向移到扇形中心，无歧义 */
  transform-origin: 50% 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 6px rgba(0, 0, 0, 0.4);
  line-height: 1.2;
  letter-spacing: 0.3px;
  padding: 2px 2px;
  border-radius: 4px;
  /* 英文仅在单词空格处换行；禁止字母中间强行断词（避免"Wirele-ss"这种断字） */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
  /* 尺寸由内容 + max-width 决定，不干扰圆心定位 */
  width: auto;
  max-width: none;
}

/* 文字沿径向放射状自然分布（不再反向旋转，保持底部朝向圆心） */
.wheel-label span {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  font-size: clamp(10px, 2.3vw, 14px);
  line-height: 1.2;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
  overflow: visible;
}

/* ========== 指针组件（固定不随转盘转） ========== */
.pointer {
  position: absolute;
  top: -2%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.pointer-body {
  width: 0;
  height: 0;
  border-left: clamp(14px, 4vw, 22px) solid transparent;
  border-right: clamp(14px, 4vw, 22px) solid transparent;
  border-top: clamp(38px, 10vw, 60px) solid #ff2d3a;
  position: relative;
  margin-bottom: -6px;
}

/* 指针金边高光 */
.pointer-body::before {
  content: '';
  position: absolute;
  top: calc(clamp(38px, 10vw, 60px) * -1);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: calc(clamp(14px, 4vw, 22px) - 3px) solid transparent;
  border-right: calc(clamp(14px, 4vw, 22px) - 3px) solid transparent;
  border-top: calc(clamp(38px, 10vw, 60px) - 5px) solid #ff5a66;
}

/* 指针中心亮线 */
.pointer-body::after {
  content: '';
  position: absolute;
  top: calc(clamp(38px, 10vw, 60px) * -1 + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: calc(clamp(38px, 10vw, 60px) - 14px);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0));
  border-radius: 2px;
}

.pointer-base {
  width: clamp(22px, 6vw, 34px);
  height: clamp(22px, 6vw, 34px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff4a3 0%, #ffd700 45%, #b8860b 100%);
  border: 3px solid #8b6914;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ========== 中心抽奖按钮 ========== */
.spin-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(80px, 22vw, 120px);
  height: clamp(80px, 22vw, 120px);
  border-radius: 50%;
  border: 4px solid #8b6914;
  background:
    radial-gradient(circle at 32% 28%,
      #fff6c2 0%,
      #ffd700 32%,
      #ff9d00 62%,
      #c97200 100%);
  color: #8b0000;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(16px, 4vw, 24px) rgba(0, 0, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.spin-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px dashed rgba(139, 0, 0, 0.35);
  animation: btnRing 6s linear infinite;
}

@keyframes btnRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin-btn-text {
  font-size: clamp(18px, 5vw, 28px);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 -1px 0 rgba(139, 69, 0, 0.3);
}

.spin-btn-sub {
  margin-top: 2px;
  font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: 2px;
  opacity: 0.85;
  font-weight: 800;
}

.spin-btn:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(1.06);
  filter: brightness(1.08);
  box-shadow:
    0 clamp(8px, 2vw, 12px) clamp(22px, 5vw, 30px) rgba(255, 170, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
}

.spin-btn:active:not(:disabled) {
  transform: translate(-50%, calc(-50% + 3px)) scale(0.97);
  box-shadow:
    0 clamp(3px, 0.8vw, 5px) clamp(8px, 2vw, 12px) rgba(0, 0, 0, 0.45),
    inset 0 3px 10px rgba(139, 69, 0, 0.45);
}

.spin-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25) brightness(0.85);
}

/* 转盘旋转时按钮的轻微呼吸提示 */
.wheel.spinning ~ .spin-btn {
  animation: btnPulse 1.1s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(16px, 4vw, 24px) rgba(0, 0, 0, 0.55),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  }
  50% { box-shadow:
    0 clamp(6px, 1.6vw, 10px) clamp(24px, 6vw, 34px) rgba(255, 180, 0, 0.65),
    inset 0 3px 6px rgba(255, 255, 255, 0.65),
    inset 0 -4px 8px rgba(139, 69, 0, 0.45);
  }
}

/* ========== 页脚提示 ========== */
.footer-tip {
  margin-top: clamp(20px, 4vh, 36px);
  text-align: center;
  color: rgba(255, 215, 0, 0.7);
  font-size: clamp(12px, 3vw, 15px);
  letter-spacing: 2px;
  animation: tipFloat 2.5s ease-in-out infinite alternate;
}

@keyframes tipFloat {
  from { transform: translateY(0); opacity: 0.6; }
  to   { transform: translateY(-4px); opacity: 1; }
}

/* ========== 中奖弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 2, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(16px, 4vw, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: clamp(300px, 80vw, 400px);
  background:
    linear-gradient(160deg, #fff9e6 0%, #ffeabf 50%, #ffd27a 100%);
  border-radius: 24px;
  padding: clamp(28px, 7vw, 40px) clamp(24px, 6vw, 36px) clamp(28px, 7vw, 36px);
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 2px 0 rgba(255, 255, 255, 0.85);
  border: 3px solid #d4a017;
  transform: translateY(30px) scale(0.85);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  overflow: hidden;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 弹窗装饰彩带 */
.modal-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  top: -20px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

.modal-overlay.open .confetti {
  animation-duration: 1.8s;
}

.confetti-1 { left: 10%; background: #FF4757; animation-delay: 0.1s; transform: rotate(-20deg); }
.confetti-2 { left: 28%; background: #FFD700; animation-delay: 0.25s; width: 12px; height: 10px; transform: rotate(30deg); }
.confetti-3 { left: 50%; background: #2ED573; animation-delay: 0.05s; transform: rotate(15deg); }
.confetti-4 { left: 72%; background: #1E90FF; animation-delay: 0.3s;  width: 8px;  height: 18px; transform: rotate(-30deg); }
.confetti-5 { left: 88%; background: #A55EEA; animation-delay: 0.18s; transform: rotate(20deg); }

@keyframes confettiFall {
  0%   { top: -20px; opacity: 0; }
  15%  { opacity: 1; }
  100% { top: 110%; opacity: 0.8; }
}

.modal-icon {
  font-size: clamp(56px, 14vw, 80px);
  line-height: 1;
  margin-bottom: 8px;
  display: inline-block;
  animation: prizeBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes prizeBounce {
  0%   { transform: scale(0) rotate(-30deg); }
  60%  { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.modal-title {
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 900;
  color: #8b0000;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

.modal-prize {
  display: inline-block;
  font-size: clamp(26px, 6.5vw, 40px);
  font-weight: 900;
  padding: clamp(10px, 2.5vw, 16px) clamp(20px, 5vw, 32px);
  margin: 8px 0 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff2d3a, #c91623);
  color: #fff;
  letter-spacing: 3px;
  box-shadow:
    0 4px 0 #8b0000,
    0 8px 20px rgba(201, 22, 35, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: prizePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s forwards;
}

@keyframes prizePop {
  0%   { transform: scale(0) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.modal-desc {
  color: #8b6914;
  font-size: clamp(13px, 3.3vw, 15px);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.modal-btn {
  width: 100%;
  padding: clamp(14px, 3.6vw, 18px);
  border: none;
  border-radius: 14px;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 4px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #ffb300 0%, #ff8f00 50%, #e65100 100%);
  box-shadow:
    0 5px 0 #bf360c,
    0 10px 24px rgba(255, 111, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.modal-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.modal-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #bf360c,
    0 4px 10px rgba(255, 111, 0, 0.35),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

/* ========== 响应式断点 ========== */
/* 平板 */
@media (min-width: 768px) and (max-width: 1023px) {
  html { font-size: 15px; }
}

/* 手机 */
@media (max-width: 767px) {
  html { font-size: clamp(12px, 3.5vw, 15px); }
  .wheel-wrapper {
    width: clamp(280px, 88vw, 420px);
    height: clamp(280px, 88vw, 420px);
  }
}

/* 超大屏 */
@media (min-width: 1440px) {
  .wheel-wrapper {
    width: 520px;
    height: 520px;
  }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .header { margin-bottom: 12px; }
  .title { font-size: 28px; letter-spacing: 3px; }
  .subtitle { display: none; }
  .wheel-wrapper {
    width: min(70vh, 400px);
    height: min(70vh, 400px);
  }
  .footer-tip { display: none; }
}

/* ========== 抽奖码校验表单 ========== */
.raffle-form-wrap {
  width: min(560px, 100%);
  margin: 0 auto 22px;
  padding: 18px 18px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.raffle-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-size: 0.82rem;
  color: rgba(255, 236, 170, 0.9);
  letter-spacing: 1px;
}

.field-group input {
  width: 100%;
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 10px;
  background: rgba(15, 8, 20, 0.6);
  color: #fff;
  font-size: 1rem;
  padding: 11px 12px;
  outline: none;
}

.field-group input:focus {
  border-color: rgba(255, 215, 0, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

.primary-btn {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd94d, #ff9d00);
  color: #6b1c00;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 1px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 18px rgba(255, 170, 0, 0.28);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 170, 0, 0.36);
}

.raffle-status,
.form-status {
  margin-top: 10px;
  min-height: 20px;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

.raffle-status.info,
.form-status.info {
  color: rgba(255, 240, 170, 0.9);
}

.raffle-status.success,
.form-status.success {
  color: #9ef0b7;
}

.raffle-status.error,
.form-status.error {
  color: #ff9ca3;
}

/* ========== 后台页面样式 ========== */
.admin-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #3a0a2e 0%, #1a0520 45%, #0d0212 100%);
  padding: 32px 16px;
}

.admin-shell {
  width: min(900px, 100%);
}

.admin-card {
  background: rgba(20, 10, 26, 0.84);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.admin-card h1 {
  text-align: center;
  margin-bottom: 22px;
  color: #ffd94d;
  font-size: clamp(28px, 6vw, 42px);
}

.admin-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 18px;
  margin-top: 20px;
}

.admin-section h2 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  color: #ffe7a3;
}

.admin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px) auto;
  gap: 14px;
  align-items: end;
}

.field-group.wide {
  grid-column: 1 / span 2;
}

.code-output {
  width: 100%;
  min-height: 120px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(6, 4, 10, 0.5);
  color: #fff;
  padding: 12px;
  resize: vertical;
  font-family: Consolas, monospace;
}

.result-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 1.8;
  color: #f4f7ff;
}

.color-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.empty-state {
  color: rgba(255, 240, 170, 0.8);
  padding: 12px 0;
}

@media (max-width: 700px) {
  .raffle-form {
    grid-template-columns: 1fr;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .field-group.wide {
    grid-column: auto;
  }
}

/* ========== 中奖弹窗信息 ========== */
.modal-meta {
  margin-top: 10px;
  margin-bottom: 8px;
  color: rgba(61, 22, 0, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.admin-header-row h1 {
  margin: 0;
}

.secondary-btn {
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: #ffe7a3;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.single-column {
  display: grid;
  gap: 14px;
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
}

.admin-import-form {
  grid-template-columns: 1fr;
}

.search-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(150px, 180px) minmax(150px, 180px) auto;
  align-items: end;
}

#importInput {
  min-height: 120px;
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.export-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 14px;
}

.stat-label {
  color: rgba(255, 236, 170, 0.75);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  margin-top: 8px;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  color: #fff;
}

.prize-breakdown {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px 16px;
}

.prize-breakdown h3 {
  margin-bottom: 12px;
  color: #ffe7a3;
  font-size: 1rem;
}

.breakdown-list {
  display: grid;
  gap: 12px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2.3fr) 52px;
  align-items: center;
  gap: 10px;
}

.breakdown-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #f2f7ff;
  font-size: 0.9rem;
}

.breakdown-bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd94d, #ff9d00);
}

.breakdown-percent {
  font-size: 0.8rem;
  color: rgba(255, 236, 170, 0.9);
  text-align: right;
}

.trend-chart {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-height: 180px;
  padding-top: 20px;
}

.trend-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 34px;
}

.trend-bar-wrap {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(255, 217, 77, 0.18), rgba(255, 157, 0, 0.04));
}

.trend-bar {
  width: 100%;
  min-height: 12px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #ffd94d, #ff9d00 70%, #c97200);
}

.trend-item span {
  font-size: 0.72rem;
  color: rgba(255, 236, 170, 0.8);
}

@media (max-width: 900px) {
  .chart-panel {
    grid-template-columns: 1fr;
  }
}
