.gofun-wheel-rotor{
  transform: translate(0,0) rotate(0deg);
  opacity: 1;
}

.gofun-spin-item{
  opacity: 1;
  height: 24px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -12px;
  margin-left: 62px;
  width: 88px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  transform-origin: -61px center;
}

/* 每個角度：一條一條列 */
.gofun-spin-item--6  { transform: rotate(0deg); }
.gofun-spin-item--7  { transform: rotate(-22.5deg); }
.gofun-spin-item--8  { transform: rotate(-45deg); }
.gofun-spin-item--9  { transform: rotate(-67.5deg); }
.gofun-spin-item--10 { transform: rotate(-90deg); }
.gofun-spin-item--11 { transform: rotate(-112.5deg); }
.gofun-spin-item--12 { transform: rotate(-135deg); }
.gofun-spin-item--13 { transform: rotate(-157.5deg); }
.gofun-spin-item--14 { transform: rotate(-180deg); }
.gofun-spin-item--15 { transform: rotate(-202.5deg); }
.gofun-spin-item--30007 { transform: rotate(-225deg); }
.gofun-spin-item--30008 { transform: rotate(-247.5deg); }
.gofun-spin-item--30009 { transform: rotate(-270deg); }
.gofun-spin-item--30010 { transform: rotate(-292.5deg); }
.gofun-spin-item--30011 { transform: rotate(-315deg); }
.gofun-spin-item--30012 { transform: rotate(-337.5deg); }

.gofun-spin-banner{
  position:absolute;
  left:0;
  right:0;
  bottom:-35px;

  display:flex;
  justify-content:center;
  align-items:flex-start;

  opacity:1;
  transform:none;
}

.gofun-spin-banner-img{
  display:flex;
  width:320px;
  height:auto;
}


.gofun-lucky-spin{
  display:flex;
  justify-content:center;
  align-items:center;
  margin-top:10px;
  padding-bottom:4px;
  width:240px;
  height:53px;

  background-image:url(https://usdtgaming.com.tw/gofun-spin/imgs_v2/coin/btn_purple.webp);
  background-size:100% 100%;
  background-position:50%;
  background-repeat:no-repeat;
  color:#fff;
  font-size:20px;
  font-weight:700;
}

.gofun-spin-overlay {
  align-items: center;
  background-color: #000c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  inset: 0;
  position: fixed;
  transition: background-color .1s;
  z-index: 199;
}

.gofun-confetti-mask {
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 20001;
}

.gofun-spin-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 600px;
  max-width: 424px;
  padding: 0;
  position: relative;
  width: 100%;
}
/* 關閉按鈕 */
.gofun-spin-close{
  position:absolute;
  top:-10px;
  right:25px;
  cursor:pointer;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(0,0,0,.25);
  color:#fff;
  font-size:28px;
  line-height:1;
  z-index:210; /* 確保在最上層 */
}

.gofun-spin-close:hover{
  background:rgba(0,0,0,.4);
}

/* 標題區 */
.gofun-spin-head{
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 160px;

  background-image: url(https://usdtgaming.com.tw/gofun-spin/imgs_v2/coin/img_titalbg.webp);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 300px auto;
}

.gofun-spin-head img{
  width: 220px;
  height: auto;
  display: block;
}

.gofun-wheel-inner .diamond-cont,
.gofun-wheel-inner .spin-img {
  height: 348px;
  left: 0;
  position: absolute;
  top: 0;
  width: 348px;
}
.gofun-wheel-inner .diamond-cont { z-index: 4; }

.gofun-wheel-inner .spin-light {
  height: 348px;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 348px;
  z-index: 1;
}
.gofun-wheel-inner .spin-light.active.light { transform: rotate(22.5deg); }

.gofun-wheel-inner .gofun-spin-item {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 15px;
  height: 24px;
  justify-content: space-between;
  left: 50%;
  line-height: 24px;
  margin-left: 62px;
  margin-top: -12px;
  position: absolute;
  top: 50%;
  transform-origin: -61px center;
  width: 88px;
}

.gofun-wheel-inner .gofun-spin-item .amount { flex: auto; }
.gofun-wheel-inner .gofun-spin-item .icon {
  fill: #fff;
  height: 11px;
  opacity: .7;
  position: absolute;
  right: -5px;
  top: -5px;
  width: 11px;
}

.gofun-wheel-inner .gofun-spin-item .gofun-spin-name-photo { height: 20px; }
.gofun-wheel-inner .gofun-spin-item .gofun-spin-coin-icon { height: 24px; width: 24px; }

/* ✅ 新增：stage 當作定位基準 */
.gofun-wheel-stage{
  position: relative;
  width: 348px;
  height: 348px;
  left: 0;
  top: 0;
}

/* ✅ rotor 這層要能疊在 stage 裡 */
.gofun-wheel-rotor{
  position:absolute;
  inset:0;
  opacity:1;
  will-change: transform;
  transform: translate(0,0) rotate(0deg);
  transition: transform 4.8s cubic-bezier(.12,.85,.14,1);
}

/* ✅ wheel-wrap 本來就需要撐尺寸（保留） */
.gofun-wheel-wrap{
  width:348px;
  height:348px;
}

/* ✅ inner 建議補定位，避免相對參考亂掉 */
.gofun-wheel-inner{
  position:absolute;
  inset:0;
}

/* ✅ 指針：同時支援 stage 與 wrap，避免你改 class 後失效 */
.gofun-wheel-stage .gofun-point-img,
.gofun-wheel-wrap  .gofun-point-img{
  height: 89.5px;
  position: absolute;
  right: -30.5px;
  top: 129px;
  transform-origin: left center;
  width: 160px;
}

.gofun-wheel-stage .gofun-point-img .gofun-point-light-wrap,
.gofun-wheel-wrap  .gofun-point-img .gofun-point-light-wrap{
  height: 60px;
  overflow: hidden;
  position: absolute;
  top: 15px;
  width: 110px;
}

.gofun-wheel-stage .gofun-point-img .gofun-point-light,
.gofun-wheel-wrap  .gofun-point-img .gofun-point-light{
  background: linear-gradient(90deg, hsla(0,0%,100%,0), hsla(0,0%,100%,.2), hsla(0,0%,100%,0));
  height: 20px;
  left: -30px;
  overflow: hidden;
  position: absolute;
  top: 18px;
  transform: skew(-25deg);
  width: 15px;
  z-index: 6;
}

.gofun-wheel-stage .gofun-point-img img,
.gofun-wheel-wrap  .gofun-point-img img{
  height: 100%;
  width: 100%;
}

.gofun-spin-stage {
  height: 348px;
  margin: 0;
  position: relative;
  top: -40px;
  user-select: none;
  width: 348px;
}

@keyframes gofun-pulse-spin {
  0% { transform: rotate(-5deg) scaleZ(1); }
  50% { transform: rotate(0) scale3d(1.1, 1.1, 1.1); }
  100% { transform: rotate(-5deg) scaleZ(1); }
}

.gofun-spin-btn {
  cursor: pointer;
  height: 104px;
  left: 122px;
  position: absolute;
  top: 122px;
  width: 104px;
}

.gofun-spin-btn:hover {
  transform: scale(1.1) !important;
  transition: transform .2s ease;
}

.gofun-spin-btn .gofun-spin-btn-txt {
  height: 56px;
  left: 8px;
  position: absolute;
  top: 25px;
  width: 88px;
}

/* 原本：.s196nhep .btn-img:not(.loading) .btn-txt 會動畫 */
.gofun-spin-btn:not(.loading) .gofun-spin-btn-txt {
  animation: gofun-pulse-spin 2s linear infinite;
}

.gofun-spin-btn img { height: 100%; width: 100%; }

.gofun-spin-head {
  align-items: center;
  background-image: url(https://usdtgaming.com.tw/gofun-spin/imgs_v2/coin/img_titalbg.webp);
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 300px auto;
  height: 160px;
  width: 100%;
}
.gofun-spin-head img { display: flex; height: auto; width: 220px; }

/* point 動畫 class（你原本的 pointImg_animation） */
@keyframes gofun-scale2 {
  0% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.12); }
  100% { transform: translateZ(0) scale(1); }
}
.gofun-point-img-animation { animation: gofun-scale2 .4s linear both; }

/* 轉盤動畫（只動 rotor 這層） */
.gofun-wheel-rotor{
  will-change: transform;
  transform: translate(0,0) rotate(0deg);
  transition: transform 4.8s cubic-bezier(.12,.85,.14,1);
}


/* 轉動中：鎖按鈕更明顯 */
.gofun-spin-btn.is-disabled{
  pointer-events: none !important;
  cursor: not-allowed !important;
  filter: grayscale(.2);
  opacity: .9;
}

/* ===== 中獎彈窗 ===== */
.gofun-win-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50000;
}
.gofun-win-overlay.is-open{ display:flex; }

.gofun-win-box{
  width: min(360px, calc(100vw - 32px));
  border-radius: 18px;
  background: #1b1033;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  padding: 18px 16px 16px;
  position: relative;
  text-align: center;
  color: #fff;
}
.gofun-win-close{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  background: rgba(255,255,255,.12);
  font-size: 18px;
}
.gofun-win-title{
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .02em;
  margin: 8px 0 10px;
}
.gofun-win-prize{
  font-size: 28px;
  font-weight: 900;
  margin: 8px 0 14px;
}
.gofun-win-desc{
  font-size: 14px;
  opacity: .9;
  line-height: 1.5;
  margin: 0 0 14px;
}
.gofun-win-actions{
  display:flex;
  gap:10px;
  justify-content:center;
}
.gofun-win-btn{
  flex: 1;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  border: 0;
}
.gofun-win-btn--ghost{
  background: rgba(255,255,255,.14);
  color:#fff;
}
.gofun-win-btn--primary{
  background: #7c4dff;
  color:#fff;
}

.gofun-win-media{
  display:flex;
  justify-content:center;
  align-items:center;
  margin: 6px 0 10px;
}
#gofunWinImg{
  max-width: 240px;
  width: 100%;
  height: auto;
  display:none;         /* 沒抓到圖就不顯示 */
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}

/* ===== 中獎狀態樣式（修正版，會真的生效） ===== */

/* 大獎 */
.gofun-win-overlay.is-big .gofun-win-box{
  border: 2px solid #ffd700;
  box-shadow: 0 0 28px rgba(255,215,0,.45);
}
.gofun-win-overlay.is-big .gofun-win-prize{
  color:#ffd700;
  font-size:30px;
  font-weight:900;
}

/* 0 元 */
.gofun-win-overlay.is-zero .gofun-win-prize{
  color:#ff7a7a;
}

/* 小獎（< 1） */
.gofun-win-overlay.is-small .gofun-win-prize{
  color:#4ddfff;
}

/* CTA 強化（不用 text-decoration） */
.gofun-win-overlay.is-big .gofun-win-btn--primary{
  background: linear-gradient(135deg,#ffd700,#ffb300);
  color:#2a1b00;
}
.gofun-win-overlay.is-zero .gofun-win-btn--primary{
  background:#ff7a7a;
}
.gofun-win-overlay.is-small .gofun-win-btn--primary{
  background:#4ddfff;
  color:#002b33;
}

/* 保證沒有底線 */
.gofun-win-btn,
.gofun-win-btn *{
  text-decoration: none !important;
}