/* ============================================
   AI幸运抽奖 - 响应式全端样式（移动端 + 桌面端）
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #FF4444;
  --primary-dark: #E63946;
  --gold: #FFD700;
  --gold-dark: #DAA520;
  --bg: #FFF5F5;
  --card-bg: #FFFFFF;
  --text: #333333;
  --text-light: #888888;
  --border: #F0E0E0;
  --shadow: 0 4rpx 20rpx rgba(255, 68, 68, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

/* 桌面端光标样式 */
button, .btn, .mode-btn, .tab-item, .grid-center, .card-flip,
.scratch-canvas, .board-roll-btn, .card-draw-btn, .scratch-reset-btn,
.card-reset-btn, .dice-btn, .wheel-pointer { cursor: pointer; }

/* ==================== Header ==================== */
.header {
  background: linear-gradient(135deg, #FF4444, #FF6B6B, #FF4444);
  padding: 24px 20px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.3);
}

.header-title {
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
}

.header-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
}

/* ==================== Main ==================== */
.main {
  padding: 16px 16px 100px;
  max-width: 500px;
  margin: 0 auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== Cards ==================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.btn-text {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
}

.btn-text.danger {
  color: var(--primary);
}

.float-right {
  float: right;
  margin-left: auto;
}

/* ==================== Form ==================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.form-row > .input.flex-1 {
  flex: 1 1 auto;
  min-width: 0;
}

.form-row > .btn {
  width: auto;
  flex: 0 0 auto;
  padding: 12px 18px;
}

/* 输入框与按钮上下堆叠（如单个添加） */
.form-row-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row-stack .input,
.form-row-stack .btn {
  width: 100%;
  box-sizing: border-box;
}

.form-row-stack .input {
  min-width: 120px;
  text-align: center;
}

.input, .textarea, select.input {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #FFFAFA;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
  font-family: inherit;
}

.input:focus, .textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.half {
  width: 50%;
}

.flex-1 {
  flex: 1;
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

/* ==================== Badge ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 11px;
}

/* ==================== Empty State ==================== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 14px;
}

/* ==================== Tab Bar ==================== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fff;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  z-index: 200;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

.tab-icon {
  font-size: 24px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}

.tab-item.active .tab-label {
  color: var(--primary);
  font-weight: 600;
}

/* ==================== Draw Mode Switch ==================== */
.draw-mode-switch {
  display: flex;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.mode-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: #999;
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.25);
}

/* ==================== Wheel ==================== */
.draw-area {
  display: flex;
  justify-content: center;
}

.wheel-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 10px 0;
}

.wheel-decorate-ring {
  position: absolute;
  top: -12px;
  left: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  border: 4px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 15px rgba(255, 215, 0, 0.2);
}

.ring-lamp {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  margin-left: -5px;
  transform-origin: 5px calc(160px + 16px);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  animation: lampGlow 1.5s ease-in-out infinite alternate;
}

.ring-lamp:nth-child(even) {
  animation-delay: 0.75s;
}

@keyframes lampGlow {
  from { box-shadow: 0 0 4px rgba(255, 215, 0, 0.5); }
  to { box-shadow: 0 0 12px rgba(255, 215, 0, 1); }
}

#wheelCanvas {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  transition: transform 3.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #FF4444, #FF6B6B);
  border: 4px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.5);
  z-index: 10;
  letter-spacing: 2px;
  transition: transform 0.15s;
}

.wheel-pointer:active {
  transform: translate(-50%, -50%) scale(0.92);
}

/* ==================== Grid 九宫格 ==================== */
.grid-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.grid-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1;
}

.grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  padding: 8px 4px;
  word-break: break-all;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.grid-cell span {
  position: relative;
  z-index: 1;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 等级底色 */
.grid-level-1 { background: linear-gradient(135deg, #FF4444, #FF6B6B); }
.grid-level-2 { background: linear-gradient(135deg, #FF8C00, #FFA500); }
.grid-level-3 { background: linear-gradient(135deg, #4169E1, #6495ED); }
.grid-level-4 { background: linear-gradient(135deg, #32CD32, #3CB371); }
.grid-level-5 { background: linear-gradient(135deg, #9370DB, #BA55D3); }

/* 跑马灯高亮 */
.grid-cell.active {
  transform: scale(1.06);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.5);
  z-index: 2;
  border: 3px solid var(--gold);
}

/* 中奖高亮 */
.grid-cell.win {
  transform: scale(1.1);
  box-shadow: 0 0 24px rgba(255, 215, 0, 1), 0 0 48px rgba(255, 68, 68, 0.6);
  border: 3px solid #fff;
  animation: gridWinPulse 0.5s ease infinite alternate;
}

@keyframes gridWinPulse {
  from { transform: scale(1.06); }
  to { transform: scale(1.12); }
}

.grid-center {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF4444, #FF6B6B);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
  transition: all 0.15s;
  user-select: none;
  letter-spacing: 2px;
}

.grid-center:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.grid-hint {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
}

/* ==================== Scratch 刮刮乐 ==================== */
.scratch-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.scratch-card-wrapper {
  width: 100%;
  max-width: 330px;
}

.scratch-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #FFF8E1, #FFF);
  border: 3px solid var(--gold);
}

.scratch-result-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0.4;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.scratch-result-icon {
  font-size: 48px;
  animation: scratchBounce 1s ease infinite;
}

@keyframes scratchBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.scratch-result-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  padding: 0 16px;
  word-break: break-all;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  touch-action: none;
  cursor: pointer;
}

.scratch-hint {
  font-size: 14px;
  color: var(--text-light);
  text-align: center;
}

.scratch-reset-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #FF8C00, #FFA500);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,140,0,0.3);
  transition: all 0.2s;
  display: none;
}

.scratch-reset-btn:active {
  transform: scale(0.94);
  opacity: 0.8;
}

/* ==================== Board 大富翁棋盘 ==================== */
.board-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 4px 0;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 370px;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 3px solid var(--gold);
}

.board-center-zone {
  grid-row: 2 / 4;
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF4444, #FF6B6B);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1.3;
}

.board-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  word-break: break-all;
  position: relative;
  overflow: hidden;
  padding: 3px 4px;
  transition: all 0.15s ease;
  min-height: 0;
}

.board-cell span {
  position: relative;
  z-index: 1;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 等级底色 */
.board-lv-1 { background: linear-gradient(135deg, #FF4444, #FF6B6B); }
.board-lv-2 { background: linear-gradient(135deg, #FF8C00, #FFA500); }
.board-lv-3 { background: linear-gradient(135deg, #4169E1, #6495ED); }
.board-lv-4 { background: linear-gradient(135deg, #32CD32, #3CB371); }
.board-lv-5 { background: linear-gradient(135deg, #9370DB, #BA55D3); }

/* 棋子 */
.board-token {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 16px;
  z-index: 3;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
  transition: all 0.1s ease;
}

/* 棋子走过的格子 */
.board-cell.board-active {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 20px rgba(255, 215, 0, 0.4);
  border: 2px solid var(--gold);
  transform: scale(1.05);
  z-index: 2;
}

/* 中奖高亮 */
.board-cell.board-win {
  box-shadow: 0 0 18px rgba(255, 215, 0, 1), 0 0 36px rgba(255, 68, 68, 0.7);
  border: 2px solid #fff;
  animation: boardWinPulse 0.4s ease infinite alternate;
}

@keyframes boardWinPulse {
  from { transform: scale(1.06); }
  to { transform: scale(1.13); }
}

/* 骰子区域 */
.board-dice-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.board-dice-display {
  font-size: 40px;
  animation: boardDiceShake 0.6s ease infinite;
}

@keyframes boardDiceShake {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg); }
  30% { transform: rotate(10deg); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(6deg); }
  75% { transform: rotate(-3deg); }
}

.board-roll-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #FF4444, #FF6B6B);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.35);
  transition: all 0.2s;
  letter-spacing: 1px;
}

.board-roll-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.board-roll-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.board-hint {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
}

/* ==================== Card 集卡/碎片合成 ==================== */
.card-collect-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}

.card-progress-bar {
  width: 100%;
  max-width: 320px;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.card-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 340px;
}

/* 卡片3D翻转容器 */
.card-flip {
  aspect-ratio: 3 / 4;
  perspective: 800px;
  cursor: pointer;
}

.card-flip.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

/* 卡面（未翻开） */
.card-front {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: 2px solid rgba(255,255,255,0.3);
}

.card-front::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1.5px dashed rgba(255,255,255,0.25);
}

.card-icon {
  font-size: 36px;
  position: relative;
  z-index: 1;
}

/* 卡背（翻开后） */
.card-back {
  transform: rotateY(180deg);
  color: #fff;
  padding: 8px;
  text-align: center;
}

.card-back-icon {
  font-size: 28px;
}

.card-back-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 等级底色 */
.card-lv-1 { background: linear-gradient(135deg, #FF4444, #FF6B6B); }
.card-lv-2 { background: linear-gradient(135deg, #FF8C00, #FFA500); }
.card-lv-3 { background: linear-gradient(135deg, #4169E1, #6495ED); }
.card-lv-4 { background: linear-gradient(135deg, #32CD32, #3CB371); }
.card-lv-5 { background: linear-gradient(135deg, #9370DB, #BA55D3); }

/* 操作按钮 */
.card-actions {
  display: flex;
  gap: 10px;
}

.card-draw-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(102,126,234,0.35);
  transition: all 0.2s;
  letter-spacing: 1px;
}

.card-draw-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

.card-draw-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.card-reset-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #FF8C00, #FFA500);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,140,0,0.3);
  transition: all 0.2s;
}

.card-reset-btn:active {
  transform: scale(0.92);
  opacity: 0.8;
}

.card-hint {
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
}

/* ==================== Dice 3D Cube ==================== */
.dice-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.dice-hint {
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(135deg, #FFF8E1, #FFF);
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px dashed var(--gold);
  text-align: center;
}

.dice-hint strong {
  color: var(--primary);
  font-size: 16px;
}

.dice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  margin: 4px 0;
  z-index: 1;
}

/* 骰子阴影 */
.dice-shadow {
  width: 30px;
  height: 6px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.25), rgba(0,0,0,0.05));
  border-radius: 50%;
  transition: all 0.08s ease;
}

.dice-shadow.float {
  width: 20px;
  height: 4px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.12), rgba(0,0,0,0.02));
}

/* 3D场景容器 */
.dice-scene {
  width: 50px;
  height: 50px;
  perspective: 300px;
  perspective-origin: 50% 50%;
}

/* 骰子立方体 */
.dice-cube {
  width: 50px;
  height: 50px;
  position: relative;
  transform-style: preserve-3d;
}

.dice-cube.settling {
  transition: transform 1.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 每个面 */
.dice-side {
  position: absolute;
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.04);
  box-sizing: border-box;
  backface-visibility: hidden;
}

.dice-front  { transform: translateZ(25px); }
.dice-back   { transform: rotateY(180deg) translateZ(25px); }
.dice-left   { transform: rotateY(90deg) translateZ(25px); }
.dice-right  { transform: rotateY(-90deg) translateZ(25px); }
.dice-top    { transform: rotateX(90deg) translateZ(25px); }
.dice-bottom { transform: rotateX(-90deg) translateZ(25px); }

/* 骰子圆点 */
.dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 35% 35%, #555, #1a1a1a);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.dot-tl    { top: 7px; left: 7px; }
.dot-tr    { top: 7px; right: 7px; }
.dot-ml    { top: 50%; left: 7px; transform: translateY(-50%); }
.dot-center{ top: 50%; left: 50%; transform: translate(-50%, -50%); }
.dot-mr    { top: 50%; right: 7px; transform: translateY(-50%); }
.dot-bl    { bottom: 7px; left: 7px; }
.dot-br    { bottom: 7px; right: 7px; }

/* 中奖光效 */
.dice-cube.win .dice-side {
  border-color: var(--gold);
  box-shadow: 
    inset 0 0 10px rgba(0,0,0,0.04),
    0 0 10px rgba(255, 215, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.3);
  animation: diceWinGlow 0.8s ease infinite alternate;
}

@keyframes diceWinGlow {
  from { 
    border-color: var(--gold);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.04), 0 0 8px rgba(255, 215, 0, 0.3);
  }
  to { 
    border-color: #FFA500;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.04), 0 0 18px rgba(255, 215, 0, 0.6);
  }
}

/* 没中效果 */
.dice-cube.miss .dice-side {
  border-color: #ddd;
}

.dice-btn {
  margin-top: 8px;
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(255, 68, 68, 0.35);
  letter-spacing: 3px;
  transition: all 0.2s;
  position: relative;
  z-index: 2;
}

.dice-btn:active {
  transform: scale(0.94);
}

.dice-btn.rolling {
  opacity: 0.6;
  pointer-events: none;
}

.dice-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 24px;
}

.dice-history-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: #f0f0f0;
  color: #999;
  animation: dotIn 0.3s ease;
}

.dice-history-dot.win {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

@keyframes dotIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==================== Result Modal ==================== */
.result-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.result-modal.show {
  display: flex;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.result-card {
  position: relative;
  background: linear-gradient(135deg, #FFF8E1, #FFF, #FFF8E1);
  border-radius: 20px;
  padding: 32px 24px 24px;
  width: 85%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--gold);
  overflow: hidden;
}

@keyframes bounceIn {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-icon {
  font-size: 56px;
  margin-bottom: 10px;
  animation: iconPulse 0.6s ease infinite alternate;
}

@keyframes iconPulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.result-winner {
  font-size: 24px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 8px;
}

.result-prize {
  font-size: 17px;
  color: #555;
  margin-bottom: 6px;
}

.result-level {
  font-size: 13px;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 16px;
}

.result-close-btn {
  padding: 10px 40px;
  background: linear-gradient(135deg, var(--primary), #FF6B6B);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

/* Confetti */
.result-confetti {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(400px) rotate(720deg); opacity: 0; }
}

/* ==================== AI Card ==================== */
.ai-card {
  background: linear-gradient(135deg, #FFF8E1, #FFFFFF);
  border: 2px solid var(--gold);
}

.ai-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.scene-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.scene-tag {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  white-space: nowrap;
}

.scene-tag:hover {
  border-color: var(--gold);
}

.scene-tag.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
  font-weight: 600;
}

/* ==================== Prize List ==================== */
.prize-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prize-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #FFFAFA;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
}

.prize-item:active {
  background: #FFF0F0;
}

.prize-item-icon {
  font-size: 28px;
  min-width: 36px;
  text-align: center;
}

.prize-item-info {
  flex: 1;
  min-width: 0;
}

.prize-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prize-item-count {
  font-size: 12px;
  color: var(--text-light);
}

.prize-item-level {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.level-1 { background: linear-gradient(135deg, #FF4444, #FF6B6B); }
.level-2 { background: linear-gradient(135deg, #FF8C00, #FFA500); }
.level-3 { background: linear-gradient(135deg, #4169E1, #6495ED); }
.level-4 { background: linear-gradient(135deg, #32CD32, #3CB371); }
.level-5 { background: linear-gradient(135deg, #9370DB, #BA55D3); }

.prize-item-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  color: #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.prize-item-delete:active {
  color: var(--primary);
  background: #FFF0F0;
}

/* ==================== Participants ==================== */
.participant-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.participant-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
}

.participant-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.participant-circle:active {
  transform: scale(0.9);
}

.participant-name {
  font-size: 11px;
  color: var(--text);
  max-width: 60px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-delete {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(255,68,68,0.3);
}

/* ==================== Records ==================== */
.record-timeline {
  position: relative;
  padding-left: 20px;
}

.record-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--primary));
}

.record-item {
  position: relative;
  padding: 10px 0 10px 20px;
  border-bottom: 1px solid #f5f5f5;
}

.record-item::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 16px;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--gold);
}

.record-item:last-child {
  border-bottom: none;
}

.record-winner {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.record-prize {
  font-size: 13px;
  color: #555;
  margin-top: 2px;
}

.record-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.record-level-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
}

/* ==================== King Info ==================== */
.king-info {
  text-align: center;
  padding: 12px;
}

.king-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-dark);
}

.king-count {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  padding: 12px 24px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  border-radius: 25px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ==================== Loading Spinner ==================== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== Responsive ==================== */

/* ---------- 平板 (≥768px) ---------- */
@media (min-width: 768px) {
  .main {
    max-width: 720px;
    padding: 24px 24px 100px;
  }

  .header {
    padding: 32px 24px 24px;
  }

  .header-title {
    font-size: 26px;
  }

  .header-sub {
    font-size: 15px;
  }

  /* 抽奖模式切换 - 加宽 */
  .draw-mode-switch {
    flex-wrap: wrap;
  }

  .mode-btn {
    font-size: 13px;
    padding: 10px 8px;
  }

  /* 大转盘放大 */
  .wheel-container {
    width: 400px;
    height: 400px;
  }

  #wheelCanvas {
    width: 400px;
    height: 400px;
  }

  .ring-lamp {
    transform-origin: 5px calc(200px + 16px);
  }

  .wheel-pointer {
    width: 76px;
    height: 76px;
    font-size: 18px;
  }

  /* 九宫格放大 */
  .grid-box {
    max-width: 400px;
  }

  .grid-cell {
    font-size: 15px;
  }

  .grid-center {
    font-size: 20px;
  }

  /* 刮刮乐放大 */
  .scratch-card-wrapper {
    max-width: 420px;
  }

  .scratch-result-text {
    font-size: 26px;
  }

  /* 棋盘放大 */
  .board-grid {
    max-width: 420px;
  }

  .board-cell {
    font-size: 12px;
  }

  .board-center-zone {
    font-size: 32px;
  }

  /* 集卡放大 */
  .card-grid {
    max-width: 400px;
    gap: 12px;
  }

  .card-flip {
    aspect-ratio: 2 / 3;
  }

  .card-back-name {
    font-size: 14px;
  }

  /* 骰子放大 */
  .dice-scene {
    width: 50px;
    height: 50px;
  }

  .dice-cube {
    width: 50px;
    height: 50px;
  }

  .dice-side {
    width: 50px;
    height: 50px;
    border-radius: 8px;
  }

  .dice-front  { transform: translateZ(25px); }
  .dice-back   { transform: rotateY(180deg) translateZ(25px); }
  .dice-left   { transform: rotateY(90deg) translateZ(25px); }
  .dice-right  { transform: rotateY(-90deg) translateZ(25px); }
  .dice-top    { transform: rotateX(90deg) translateZ(25px); }
  .dice-bottom { transform: rotateX(-90deg) translateZ(25px); }

  .dot {
    width: 8px;
    height: 8px;
  }

  .dot-tl, .dot-tr { top: 7px; }
  .dot-tl, .dot-ml, .dot-bl { left: 7px; }
  .dot-tr, .dot-mr, .dot-br { right: 7px; }
  .dot-bl, .dot-br { bottom: 7px; }

  .dice-btn {
    margin-top: 12px;
  }

  /* Tab Bar 顶部导航化 */
  .tab-bar {
    max-width: 720px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 24px env(safe-area-inset-bottom, 8px);
    border-radius: 12px 12px 0 0;
  }

  .tab-item {
    padding: 6px 0;
  }

  /* 弹窗放大 */
  .result-card {
    max-width: 380px;
    padding: 40px 32px;
  }

  .result-icon {
    font-size: 64px;
  }

  .result-winner {
    font-size: 22px;
  }

  .result-prize {
    font-size: 28px;
  }

  /* 表单 - 奖品/人员添加表单变大 */
  .card {
    padding: 20px;
  }

  .card-title {
    font-size: 17px;
  }

  .input, .textarea, select.input {
    padding: 14px 16px;
    font-size: 15px;
  }

  .btn {
    font-size: 16px;
    padding: 14px 28px;
  }

  /* 记录列表放大 */
  .record-winner {
    font-size: 18px;
  }

  .record-prize {
    font-size: 14px;
  }

  .record-time {
    font-size: 12px;
  }
}

/* ---------- 桌面大屏 (≥1024px) ---------- */
@media (min-width: 1024px) {
  body {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 50%, #FFF0F5 100%);
  }

  .main {
    max-width: 1200px;
    padding: 32px 40px 120px;
  }

  .header {
    padding: 40px 40px 28px;
  }

  .header-title {
    font-size: 30px;
    letter-spacing: 4px;
  }

  .header-sub {
    font-size: 16px;
  }

  /* 模式切换 - 更大按钮 */
  .draw-mode-switch {
    max-width: 100%;
    flex-wrap: nowrap;
  }

  .mode-btn {
    font-size: 14px;
    padding: 12px 14px;
    transition: all 0.25s ease;
  }

  .mode-btn:hover {
    color: var(--primary);
    background: rgba(255, 68, 68, 0.06);
    transform: translateY(-1px);
  }

  .mode-btn.active:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #FF6B6B);
  }

  /* 奖品Tab - 双栏布局 */
  #tab-prizes .card:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 20px;
  }

  /* 奖品清单 - 三列网格 */
  #prizeList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  #prizeList .prize-item {
    padding: 14px;
    transition: all 0.2s;
  }

  #prizeList .prize-item:hover {
    background: #FFF5F5;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255,68,68,0.1);
  }

  .prize-item-delete:hover {
    color: var(--primary) !important;
    background: #FFF0F0;
    transform: scale(1.1);
  }

  /* 人员Tab - 双栏布局 */
  #tab-participants .card:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  /* 人员网格 - 更多列 */
  .participant-grid {
    gap: 14px;
  }

  .participant-circle {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .participant-name {
    font-size: 13px;
    max-width: 72px;
  }

  .participant-avatar:hover .participant-circle {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }

  /* 删除按钮 hover 显示 */
  .participant-delete {
    opacity: 0;
    transition: opacity 0.2s;
  }

  .participant-avatar:hover .participant-delete {
    opacity: 1;
  }

  /* 抽奖记录Tab - 双栏布局 */
  #tab-records .card:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
  }

  /* 记录悬停效果 */
  .record-item {
    transition: all 0.2s;
  }

  .record-item:hover {
    background: #FFF8F0;
    padding-left: 24px;
  }

  .record-winner {
    font-size: 20px;
  }

  .record-prize {
    font-size: 15px;
  }

  .record-time {
    font-size: 12px;
  }

  .king-name {
    font-size: 28px;
  }

  .king-count {
    font-size: 16px;
  }

  /* AI推荐卡片悬停 */
  .ai-card {
    transition: all 0.2s;
  }

  .ai-card:hover {
    box-shadow: 0 4px 20px rgba(218,165,32,0.15);
    transform: translateY(-1px);
  }

  .scene-tag {
    transition: all 0.2s;
  }

  .scene-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(218,165,32,0.15);
  }

  /* 抽奖区域居中 + 背景 */
  .draw-area {
    min-height: 420px;
    align-items: center;
  }

  /* 大转盘更大 */
  .wheel-container {
    width: 460px;
    height: 460px;
  }

  #wheelCanvas {
    width: 460px;
    height: 460px;
  }

  .ring-lamp {
    transform-origin: 5px calc(230px + 16px);
  }

  .wheel-pointer {
    width: 84px;
    height: 84px;
    font-size: 20px;
  }

  .wheel-pointer:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 24px rgba(255, 68, 68, 0.5);
  }

  /* 九宫格更大 */
  .grid-box {
    max-width: 450px;
    gap: 10px;
  }

  .grid-cell {
    font-size: 16px;
    padding: 14px 6px;
    border-radius: 14px;
  }

  .grid-center {
    font-size: 24px;
    border-radius: 14px;
  }

  .grid-center:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 24px rgba(255, 68, 68, 0.5);
  }

  .grid-cell:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }

  /* 刮刮乐更大 */
  .scratch-card-wrapper {
    max-width: 500px;
  }

  .scratch-result-text {
    font-size: 30px;
  }

  .scratch-result-icon {
    font-size: 60px;
  }

  .scratch-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,140,0,0.4);
  }

  /* 棋盘更大 */
  .board-grid {
    max-width: 480px;
    gap: 6px;
    padding: 8px;
  }

  .board-cell {
    font-size: 13px;
    border-radius: 10px;
  }

  .board-cell:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  }

  .board-center-zone {
    font-size: 36px;
  }

  .board-roll-btn {
    font-size: 18px;
    padding: 14px 40px;
  }

  .board-roll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 68, 68, 0.45);
  }

  /* 集卡更大 */
  .card-grid {
    max-width: 480px;
    gap: 16px;
  }

  .card-back-name {
    font-size: 15px;
  }

  .card-flip:hover .card-inner {
    transform: scale(1.04);
  }

  .card-flip.flipped:hover .card-inner {
    transform: rotateY(180deg) scale(1.04);
  }

  .card-draw-btn {
    font-size: 17px;
    padding: 14px 36px;
  }

  .card-draw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.45);
  }

  .card-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,140,0,0.4);
  }

  /* 骰子桌面端适配：尺寸协调、底部留有足够间距 */
  #dice-mode.draw-area {
    min-height: auto;
    padding: 36px 0 50px;
  }

  .dice-container {
    padding-bottom: 100px;
  }

  .dice-hint {
    font-size: 16px;
  }

  .dice-stage {
    margin: 28px 0;
  }

  .dice-shadow {
    width: 56px;
    height: 10px;
  }

  .dice-shadow.float {
    width: 36px;
    height: 7px;
  }

  .dice-scene {
    width: 90px;
    height: 90px;
    perspective: 540px;
  }

  .dice-cube {
    width: 90px;
    height: 90px;
  }

  .dice-side {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    border-width: 3px;
  }

  .dice-front  { transform: translateZ(45px); }
  .dice-back   { transform: rotateY(180deg) translateZ(45px); }
  .dice-left   { transform: rotateY(90deg) translateZ(45px); }
  .dice-right  { transform: rotateY(-90deg) translateZ(45px); }
  .dice-top    { transform: rotateX(90deg) translateZ(45px); }
  .dice-bottom { transform: rotateX(-90deg) translateZ(45px); }

  .dot {
    width: 15px;
    height: 15px;
  }

  .dot-tl, .dot-tr { top: 13px; }
  .dot-tl, .dot-ml, .dot-bl { left: 13px; }
  .dot-tr, .dot-mr, .dot-br { right: 13px; }
  .dot-bl, .dot-br { bottom: 13px; }

  .dice-btn {
    font-size: 20px;
    padding: 18px 64px;
    margin-top: 48px;
  }

  .dice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102,126,234,0.45);
  }

  .dice-history-dot {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  /* Tab Bar */
  .tab-bar {
    max-width: 1200px;
    padding: 8px 40px env(safe-area-inset-bottom, 8px);
    border-radius: 12px 12px 0 0;
    gap: 0;
  }

  .tab-item {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .tab-item:hover {
    background: rgba(255, 68, 68, 0.06);
  }

  .tab-item.active:hover {
    background: rgba(255, 68, 68, 0.08);
  }

  .tab-icon {
    font-size: 26px;
  }

  .tab-label {
    font-size: 12px;
  }

  /* 弹窗 */
  .result-card {
    max-width: 440px;
    padding: 48px 40px;
    border-radius: 24px;
  }

  .result-icon {
    font-size: 72px;
  }

  .result-winner {
    font-size: 24px;
  }

  .result-prize {
    font-size: 32px;
  }

  .result-close-btn {
    font-size: 17px;
    padding: 14px 48px;
  }

  .result-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
  }

  /* 表单 */
  .card {
    padding: 28px;
    border-radius: 18px;
  }

  .card-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.35);
  }

  .btn-text:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
  }

  .input {
    font-size: 16px;
    padding: 14px 18px;
  }

  .form-row-stack .input {
    min-width: 180px;
  }

  /* 记录时间轴 */
  .record-winner {
    font-size: 20px;
  }

  /* Toast 通知 */
  .toast {
    font-size: 15px;
    padding: 14px 28px;
    border-radius: 12px;
  }
}

/* ---------- 超宽屏 (≥1440px) ---------- */
@media (min-width: 1440px) {
  .main {
    max-width: 1300px;
    padding: 40px 40px 120px;
  }

  .tab-bar {
    max-width: 1300px;
  }

  /* 奖品清单 - 四列网格 */
  #prizeList {
    grid-template-columns: repeat(4, 1fr);
  }
}
