/* ============================================================================
 * 抽奖转盘弹窗 —— 1:1 还原原站 lottery.css
 * 这个模块本来就是原生 JS + 纯 CSS，且用 px（不跟随 vw 缩放），照搬即可。
 * ========================================================================== */

body.btcc-lottery-open { overflow: hidden; }

.btcc-lottery-backdrop,
.btcc-lottery-backdrop * { box-sizing: border-box; }

.btcc-lottery-backdrop[hidden],
.btcc-lottery-dialog[hidden] { display: none !important; }

.btcc-lottery-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(0, 9, 21, 0.82);
  backdrop-filter: blur(5px);
  font-family: Helvetica, Arial, sans-serif;
}

.btcc-lottery-dialog {
  position: relative;
  width: min(100%, 430px);
  margin: auto;
  padding: 25px 20px 22px;
  border: 1px solid #2b6392;
  border-radius: 8px;
  background: #071a30;
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: center;
}

.btcc-lottery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #173350;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.btcc-lottery-close:hover,
.btcc-lottery-close:focus-visible { background: #27567e; }

.btcc-lottery-brand {
  margin: 0 0 5px;
  color: #52e785;
  font-size: 13px;
  font-weight: 700;
}

.btcc-lottery-dialog h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.btcc-lottery-subtitle {
  margin: 8px 0 0;
  color: #c4d4e2;
  font-size: 14px;
  line-height: 1.5;
}

.btcc-lottery-wheel-wrap {
  --wheel-size: min(76vw, 342px);
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  margin: 23px auto 18px;
}

.btcc-lottery-wheel-wrap::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 5px solid #d9a538;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff1bb inset, 0 9px 22px rgba(0, 0, 0, 0.32);
}

.btcc-lottery-pointer {
  position: absolute;
  z-index: 3;
  top: -11px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid #fff0ae;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
}

.btcc-lottery-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid #f8d56e;
  border-radius: 50%;
  background: conic-gradient(from -22.5deg,
    #176698 0deg 45deg,
    #1d875f 45deg 90deg,
    #0c4b7b 90deg 135deg,
    #22966e 135deg 180deg,
    #176698 180deg 225deg,
    #1d875f 225deg 270deg,
    #0c4b7b 270deg 315deg,
    #22966e 315deg 360deg);
  transform: rotate(0deg);
}

.btcc-lottery-wheel.is-spinning {
  transition: transform 10s cubic-bezier(0.12, 0.62, 0.12, 1);
}

.btcc-lottery-prize {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  margin: 0;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--wheel-size) * -0.35)) rotate(calc(-1 * var(--angle)));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.btcc-lottery-prize small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
}

.btcc-lottery-spin {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  border: 6px solid #fff1bb;
  border-radius: 50%;
  background: linear-gradient(#ffdc72, #d39720);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  color: #11253c;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.btcc-lottery-spin:disabled {
  cursor: default;
  opacity: 0.85;
}

.btcc-lottery-result { padding-top: 35px; }

.btcc-lottery-amount {
  margin: 20px 0 12px;
  color: #53e68a;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.1;
}

.btcc-lottery-result-copy {
  margin: 0 0 24px;
  color: #c4d4e2;
  font-size: 14px;
  line-height: 1.6;
}

.btcc-lottery-actions {
  display: flex;
  gap: 10px;
}

.btcc-lottery-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.btcc-lottery-later {
  flex: 1;
  background: #1e3b57;
  color: #fff;
}

.btcc-lottery-claim {
  flex: 2;
  background: #56e783;
  color: #071a30;
}

.btcc-lottery-later:hover,
.btcc-lottery-later:focus-visible { background: #2c5275; }

.btcc-lottery-claim:hover,
.btcc-lottery-claim:focus-visible { background: #83f2a4; }

.btcc-lottery-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: #ffbe83;
  font-size: 12px;
}

@media (max-width: 380px) {
  .btcc-lottery-dialog { padding: 22px 14px 18px; }
  .btcc-lottery-wheel-wrap { --wheel-size: min(74vw, 290px); }
  .btcc-lottery-prize { font-size: 13px; }
  .btcc-lottery-spin { width: 88px; height: 88px; font-size: 16px; }
}
