/* WJLWS 幸運轉盤 前端樣式 v1.1 — 遊樂場風格 */
.wjlws-stage {
	--wjlws-red: #e23b3b;
	--wjlws-red-dark: #b81d1d;
	--wjlws-gold: #ffcf4d;
	--wjlws-gold-dark: #e0a11a;
	--wjlws-cream: #fff7e8;

	position: relative;
	max-width: 560px;
	margin: 0 auto;
	padding: 26px 16px 34px;
	text-align: center;
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
	-webkit-user-select: none;
	user-select: none;
	border-radius: 26px;
	background:
		radial-gradient(120% 90% at 50% 0%, #fff4d6 0%, #ffe1b0 40%, #ffd08a 100%);
	box-shadow: 0 18px 50px rgba(139, 62, 0, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.5);
	overflow: hidden;
}
.wjlws-stage::before {
	/* 柔和光暈點綴 */
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(8px 8px at 12% 22%, rgba(255, 255, 255, 0.6), transparent 60%),
		radial-gradient(6px 6px at 86% 30%, rgba(255, 255, 255, 0.5), transparent 60%),
		radial-gradient(10px 10px at 78% 82%, rgba(255, 255, 255, 0.45), transparent 60%),
		radial-gradient(7px 7px at 20% 84%, rgba(255, 255, 255, 0.5), transparent 60%);
	pointer-events: none;
}

.wjlws-title {
	position: relative;
	display: inline-block;
	margin: 4px auto 20px;
	padding: 10px 30px;
	font-size: 1.5rem;
	font-weight: 900;
	letter-spacing: 1px;
	color: #fff;
	background: linear-gradient(180deg, var(--wjlws-red), var(--wjlws-red-dark));
	border-radius: 999px;
	box-shadow: 0 6px 0 var(--wjlws-red-dark), 0 12px 18px rgba(184, 29, 29, 0.35);
	text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
}
.wjlws-title span { position: relative; }

/* ---- 轉盤容器 ---- */
.wjlws-wheel-holder {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	aspect-ratio: 1 / 1;
}
/* 外框金色轉盤座 */
.wjlws-wheel-holder::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 35%, #fff2c4 0%, var(--wjlws-gold) 34%, var(--wjlws-gold-dark) 66%, #a86a12 100%);
	box-shadow:
		0 14px 30px rgba(120, 60, 0, 0.35),
		inset 0 4px 8px rgba(255, 255, 255, 0.65),
		inset 0 -8px 14px rgba(120, 60, 0, 0.4);
}

/* 燈泡層 */
.wjlws-bulbs {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}
.wjlws-bulb {
	position: absolute;
	width: 4.6%;
	height: 4.6%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff7cf, #d8a72e 70%, #9c6f10 100%);
	box-shadow: inset 0 0 2px rgba(120, 70, 0, 0.6);
	transition: background 90ms linear, box-shadow 90ms linear;
}
.wjlws-bulb.on {
	background: radial-gradient(circle at 40% 35%, #ffffff, #fff08a 55%, #ffcf4d 100%);
	box-shadow: 0 0 8px 3px rgba(255, 226, 120, 0.95), 0 0 16px 6px rgba(255, 200, 70, 0.55);
}
/* 待機微閃 */
.wjlws-bulbs.idle .wjlws-bulb {
	animation: wjlws-twinkle 1.6s ease-in-out infinite;
}
@keyframes wjlws-twinkle {
	0%, 100% { background: radial-gradient(circle at 35% 30%, #fff7cf, #d8a72e 70%, #9c6f10 100%); box-shadow: inset 0 0 2px rgba(120, 70, 0, 0.6); }
	50% { background: radial-gradient(circle at 40% 35%, #ffffff, #fff08a 55%, #ffcf4d 100%); box-shadow: 0 0 7px 2px rgba(255, 226, 120, 0.85); }
}

/* 轉盤本體 */
.wjlws-wheel-wrap {
	position: absolute;
	inset: 8%;
	z-index: 2;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	box-shadow:
		inset 0 0 0 6px #fff,
		inset 0 0 0 8px rgba(0, 0, 0, 0.06),
		0 6px 14px rgba(0, 0, 0, 0.2);
}
.wjlws-canvas {
	display: block;
	width: 100%;
	height: 100%;
	will-change: transform;
}

/* 指針（頂部朝下） */
.wjlws-pointer {
	position: absolute;
	top: -2%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	width: 0;
	height: 0;
	border-left: 20px solid transparent;
	border-right: 20px solid transparent;
	border-top: 40px solid var(--wjlws-red);
	filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35));
}
.wjlws-pointer-cap {
	position: absolute;
	left: 50%;
	top: -34px;
	transform: translateX(-50%);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: radial-gradient(circle at 38% 32%, #fff, #ff7a7a 55%, var(--wjlws-red-dark));
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}

/* 中心轉軸 / GO 按鈕 */
.wjlws-hub {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 4;
	width: 22%;
	height: 22%;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background: radial-gradient(circle at 40% 32%, #fff2c4, var(--wjlws-gold) 55%, var(--wjlws-gold-dark));
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 5px rgba(120, 60, 0, 0.35), inset 0 3px 5px rgba(255, 255, 255, 0.7);
	transition: transform 0.08s ease;
}
.wjlws-hub:active { transform: translate(-50%, -50%) scale(0.94); }
.wjlws-hub:disabled { cursor: default; }
.wjlws-hub-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: linear-gradient(180deg, var(--wjlws-red), var(--wjlws-red-dark));
	box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.35);
	margin: 0;
}
.wjlws-hub-text {
	color: #fff;
	font-weight: 900;
	font-size: clamp(14px, 4.2vw, 24px);
	letter-spacing: 1px;
	text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
}

/* 開始按鈕 */
.wjlws-spin-btn {
	position: relative;
	margin-top: 28px;
	padding: 15px 46px;
	font-size: 1.3rem;
	font-weight: 900;
	letter-spacing: 1px;
	color: #fff;
	background: linear-gradient(180deg, #ff6b5b, var(--wjlws-red-dark));
	border: none;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 7px 0 #8f1414, 0 14px 20px rgba(184, 29, 29, 0.4);
	transition: transform 0.08s ease, box-shadow 0.12s ease;
	touch-action: manipulation;
}
.wjlws-spin-btn:hover { filter: brightness(1.04); }
.wjlws-spin-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #8f1414, 0 6px 12px rgba(184, 29, 29, 0.4); }
.wjlws-spin-btn:disabled { opacity: 0.7; cursor: default; transform: none; }
.wjlws-stage.is-spinning .wjlws-spin-btn { pointer-events: none; opacity: 0.7; }

/* 中獎視窗 */
.wjlws-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 6, 0, 0.6);
	z-index: 99999;
	/* 未顯示時務必隱藏且不吃點擊，否則透明的全螢幕遮罩會擋住抽獎按鈕。 */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}
.wjlws-modal.show {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.wjlws-modal-box {
	position: relative;
	background: linear-gradient(180deg, #fffdf7, #fff2d6);
	border-radius: 22px;
	padding: 34px 30px 30px;
	width: min(90vw, 360px);
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(255, 255, 255, 0.8);
	transform: scale(0.86);
	transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
	overflow: hidden;
}
.wjlws-modal.show .wjlws-modal-box { transform: scale(1); }
.wjlws-modal-rays {
	position: absolute;
	inset: -30% -30% auto -30%;
	height: 160%;
	background: conic-gradient(from 0deg, rgba(255, 207, 77, 0.35) 0 10deg, transparent 10deg 30deg);
	animation: wjlws-rays 12s linear infinite;
	pointer-events: none;
}
@keyframes wjlws-rays { to { transform: rotate(360deg); } }
.wjlws-modal-emoji { position: relative; font-size: 3.2rem; line-height: 1; }
.wjlws-modal-head { position: relative; margin-top: 6px; font-size: 1.1rem; color: #9a6a2a; font-weight: 700; }
.wjlws-modal-prize {
	position: relative;
	margin: 12px 0 24px;
	font-size: 2rem;
	font-weight: 900;
	color: var(--wjlws-red-dark);
	word-break: break-word;
	text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}
.wjlws-modal-close {
	position: relative;
	padding: 12px 38px;
	font-size: 1.05rem;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(180deg, #ff6b5b, var(--wjlws-red-dark));
	border: none;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 5px 0 #8f1414;
}
.wjlws-modal-close:active { transform: translateY(3px); box-shadow: 0 2px 0 #8f1414; }

@media (max-width: 480px) {
	.wjlws-title { font-size: 1.25rem; padding: 8px 22px; }
	.wjlws-spin-btn { width: 100%; }
}
