* {box-sizing: border-box;}
:root {--accent: #2e7dff;--card: #141417;}
body {
  font-family: 'Orbitron', 'Segoe UI', Roboto, 'Microsoft Yahei', Arial, sans-serif;
  background: #0f0f12;
  color: #000;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('bizi/100.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
.container {
  width: 960px;
  padding: 20px;
  position: relative;
  z-index: 2;
}
@media (max-width: 1100px) {.container {width: 92%;}}
@media (max-width: 700px) {.container {width: 100%;padding: 12px;}}

/* 备案信息 + 咖啡按钮 - 页面最顶层右上角 */
.footer-info {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999; /* 远超所有抽奖元素，不被遮挡 */
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc;
  font-size: 12px;
  pointer-events: auto;
}
.icp-info {
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
  white-space: nowrap; /* 备案文字不换行，适配移动端 */
}
.coffee-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  pointer-events: auto;
}
.coffee-btn:hover {transform: scale(1.1);box-shadow: 0 4px 12px rgba(0,0,0,0.6);}
.coffee-btn:active {transform: scale(0.95);}

/* 收款码弹窗样式 - 最高层级 */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.qr-modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.qr-modal-content {
  background: #fff;
  padding: 24px 20px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.close-qr {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f5f5f5;
  color: #333;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.close-qr:hover {background: #eee;}
.qr-img {
  width: 100%;
  max-width: 290px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid #eee;
}
.qr-modal-content h3 {color: #333;margin: 0;font-size: 18px;}
.qr-modal-content p {color: #666;font-size: 14px;margin: 5px 0 0 0;}

/* 概率公示 */
.prob公示 {text-align: center;margin: 12px 0;font-size: 12px;color: #999;}

/* 奖品卡片 */
.gallery {background: #161618;padding: 12px;border-radius: 8px;box-shadow: 0 6px 18px rgba(0,0,0,0.6);}
.imgs {display: grid;grid-template-columns: repeat(7,1fr);gap: 12px;}
@media (max-width: 1100px) {.imgs {grid-template-columns: repeat(5,1fr);}}
@media (max-width: 700px) {.imgs {grid-template-columns: repeat(3,1fr);}}
@media (max-width: 420px) {.imgs {grid-template-columns: repeat(2,1fr);}}
.img-card {
  background: linear-gradient(180deg,#1b1b1d,#101012);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  transition: transform .18s ease,box-shadow .18s ease;
}
.img-card:hover {transform: translateY(-6px);box-shadow: 0 14px 30px rgba(0,0,0,0.7);}
.img-card .icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  color: #fff;
  margin-bottom: 8px;
}
.img-card .img-wrap {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}
.img-card .img-wrap img {max-width: 100%;max-height: 100%;width: auto;height: auto;display: block;}
.img-card .name {margin-top: 6px;font-size: 12px;color: #ddd;}

/* 抽奖按钮 */
.controls {display: flex;gap: 12px;justify-content: center;margin-top: 16px;}
button {
  padding: 10px 18px;
  border-radius: 6px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}
button:active {transform: translateY(1px);}
button:disabled {background: #666;cursor: not-allowed;transform: none;box-shadow: none;}

/* 弹窗基础样式 */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease,visibility .25s;
  z-index: 5;
  pointer-events: none;
}
.modal[aria-hidden="false"] {visibility: visible;opacity: 1;pointer-events: auto;}
.modal-content {
  background: linear-gradient(180deg,#222,#1a1a1a);
  padding: 18px;
  border-radius: 10px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: visible;
}
.particles {position: absolute;left: 0;top: 0;width: 100%;height: 100%;pointer-events: none;}

/* 单抽弹窗 */
.result-box {
  width: 320px;
  height: 220px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .8s ease,background-color .8s ease;
  overflow: hidden;
}
.result-box img {max-width: 90%;max-height: 90%;display: block;transition: transform .8s ease,filter .3s ease;}
.label {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-align: center;
}

/* 统计栏 + 确定按钮 */
.stats {
  margin-top: 6px;
  color: #fff;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.confirm-btn {
  padding: 4px 12px;
  background-color: var(--accent);
  color: #fff;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}
.confirm-btn:hover {background-color: #1a68e0;box-shadow: 0 3px 8px rgba(0,0,0,0.4);}
.confirm-btn:active {transform: translateY(1px);box-shadow: 0 1px 3px rgba(0,0,0,0.3);}

/* 十连弹窗 */
.ten-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 12px;
  width: 100%;
  margin: 8px 0;
}
@media (max-width: 700px) {.ten-grid {grid-template-columns: repeat(3,1fr);}}
@media (max-width: 420px) {.ten-grid {grid-template-columns: repeat(2,1fr);}}
.ten-slot {
  background: linear-gradient(180deg,#0e0e10,#141416);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 110px;
  transition: transform .18s ease,box-shadow .18s ease, border .18s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,0.55);
  transform-origin: center;
}
.ten-slot:hover {transform: translateY(-6px) scale(1.02);box-shadow: 0 18px 32px rgba(0,0,0,0.7);}
.ten-slot.highlight {border: 2px solid #ffd700;transform: scale(1.05);}
.ten-slot .slot-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  margin-bottom: 8px;
}
.ten-slot .slot-img-wrap {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}
.ten-slot .slot-img-wrap img {max-width: 100%;max-height: 100%;width: auto;height: auto;display: block;transition: transform .2s ease;}
.ten-slot .name {margin-top: 8px;font-size: 13px;color: #ddd;}
.ten-slot img {width: 70px;height: 70px;object-fit: contain;}

/* 稀有弹窗 */
.rare-grid {display: flex;gap: 12px;align-items: center;flex-wrap: wrap;justify-content: center;}
.rare-item {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
  color: #fff;
}
.rare-item img {max-width: 80px;max-height: 80px;object-fit: contain;}

/* 动画样式 */
@keyframes spin360 {from {transform: rotate(0deg);}to {transform: rotate(360deg);}}
.spin-img {animation: spin360 .8s cubic-bezier(0.22, 0.61, 0.36, 1) ease-out;}
@keyframes slotBounce {
  0%{transform: translateY(0) scale(1,1);}
  50%{transform: translateY(-8px) scale(1.06,0.96);}
  100%{transform: translateY(0) scale(1,1);}
}
.slot-rolling {animation: slotBounce .6s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);}
.pop {transform-origin: center;transition: transform .7s cubic-bezier(.22,.9,.32,1);transform: scale(1.02);}

/* 画布样式 */
.bg-fall {position: fixed;left: 0;top: 0;width: 100%;height: 100%;pointer-events: none;z-index: 0;}
.fullscreen-burst-canvas {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 1;
}
