/* ═══════════════════════════════════════════════════════════════════════
   Spin to Win - Isolated Game CSS
   Prevents interference with page scrolling and other page elements
═══════════════════════════════════════════════════════════════════════ */

/* ── Container Isolation ── */
#spin-to-win-container {
	all: initial;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	contain: layout style paint;
	/* Prevent the game from causing page scrolling issues */
	overflow: hidden;
}

#spin-to-win-container * {
	box-sizing: border-box;
}

/* ── Root Variables ── */
#spin-to-win-container {
	--t: #008080;
	--td: #005f5f;
	--tm: #00a898;
	--tl: #e6f4f4;
	--r: #FF4444;
	--rd: #cc2020;
	--rl: #fff0f0;
	--go: #ff8c00;
	--gold: #f5c518;
	--goldd: #c8a000;
	--text: #1a1a2e;
	--mut: #6b7280;
	--bdr: #e8eaed;
	--bg: #f4f6f8;
	--white: #ffffff;
}

/* ── Main App Container ── */
#spin-to-win-container #app {
	width: 100%;
	max-width: 390px;
	margin: 0 auto;
	height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--white);
	overflow: hidden;
	position: relative;
	box-shadow: 0 0 60px rgba(0, 0, 0, 0.22);
}

/* ── Screen Management ── */
#spin-to-win-container .screen {
	display: none;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;
	background: #fff;
}

#spin-to-win-container .screen.active {
	display: flex;
}

/* ── Screen Transitions ── */
#spin-to-win-container .screen {
	transition: opacity 0.22s ease, transform 0.22s ease;
}

#spin-to-win-container .screen.slide-out-left {
	transform: translateX(-18px);
	opacity: 0;
	pointer-events: none;
}

#spin-to-win-container .screen.slide-in-right {
	animation: slideInR 0.22s ease forwards;
}

@keyframes slideInR {
	from {
		transform: translateX(18px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* ── Top Bar ── */
#spin-to-win-container .topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.35rem 1rem 0.25rem;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
}

#spin-to-win-container .back-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: var(--text);
	cursor: pointer;
	background: none;
	border: none;
	font-weight: 700;
	border-radius: 50%;
	transition: background 0.15s;
}

#spin-to-win-container .back-btn:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* ── Brand ── */
#spin-to-win-container .brand-wrap {
	display: flex;
	align-items: center;
	gap: 3px;
	position: relative;
}

#spin-to-win-container .brand-title {
	font-size: 22px;
	font-weight: 900;
	font-style: italic;
	letter-spacing: -0.3px;
	line-height: 1;
	white-space: nowrap;
}

#spin-to-win-container .bt-s {
	color: var(--t);
}

#spin-to-win-container .bt-w {
	color: var(--r);
}

/* ── Scrolling Body (allows internal scrolling only) ── */
#spin-to-win-container .si-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	-webkit-overflow-scrolling: touch;
	position: relative;
	z-index: 2;
	background: transparent;
}

/* ── Prevent Body Scroll When Game is Active ── */
#spin-to-win-container.game-active {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 100vh;
	z-index: 9999;
	background: #fff;
}

/* ── Bottom Navigation ── */
#spin-to-win-container .bnav {
	display: flex;
	align-items: center;
	background: var(--white);
	border-top: 1.5px solid var(--bdr);
	flex-shrink: 0;
	z-index: 10;
}

#spin-to-win-container .bni {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 0.55rem 0 0.5rem;
	cursor: pointer;
}

#spin-to-win-container .bni-ic {
	font-size: 20px;
	line-height: 1;
}

#spin-to-win-container .bni-ic svg {
	width: 20px;
	height: 20px;
}

#spin-to-win-container .bni-l {
	font-size: 10px;
	font-weight: 700;
	color: var(--mut);
}

#spin-to-win-container .bni.on .bni-l {
	color: var(--t);
}

/* ── Blobs ── */
#spin-to-win-container .blob-wrap {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

#spin-to-win-container .blob {
	position: absolute;
}

#spin-to-win-container .b-bl {
	bottom: -40px;
	left: -60px;
	width: 220px;
	height: 300px;
	background: radial-gradient(
		ellipse at 55% 42%,
		rgba(0, 148, 128, 0.88),
		rgba(0, 100, 88, 0.6) 48%,
		transparent 72%
	);
	border-radius: 52% 48% 28% 72% / 38% 52% 58% 48%;
}

#spin-to-win-container .b-br {
	bottom: -30px;
	right: -60px;
	width: 210px;
	height: 280px;
	background: radial-gradient(
		ellipse at 42% 42%,
		rgba(255, 70, 50, 0.86),
		rgba(210, 50, 30, 0.56) 48%,
		transparent 72%
	);
	border-radius: 42% 58% 68% 32% / 48% 38% 62% 52%;
}

#spin-to-win-container .b-tl {
	top: -15px;
	left: -25px;
	width: 90px;
	height: 140px;
	background: radial-gradient(
		ellipse at 58% 58%,
		rgba(0, 148, 128, 0.38),
		transparent 68%
	);
	border-radius: 38% 62% 58% 42%;
}

/* ── Intro Screen ── */
#spin-to-win-container .si-head {
	text-align: center;
	padding: 0.55rem 1rem 0.25rem;
	flex-shrink: 0;
}

#spin-to-win-container .si-title {
	font-size: 23px;
	font-weight: 900;
	color: var(--text);
	margin-bottom: 0.3rem;
	line-height: 1.2;
}

#spin-to-win-container .si-sub {
	font-size: 13px;
	color: var(--mut);
	line-height: 1.6;
}

#spin-to-win-container .si-hl {
	color: var(--r);
	font-weight: 800;
	font-style: normal;
}

#spin-to-win-container .si-hl2 {
	color: var(--t);
	font-weight: 800;
	font-style: normal;
}

/* ── Wheel ── */
#spin-to-win-container .si-wheel-wrap {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.1rem 0 0.4rem;
	position: relative;
}

#spin-to-win-container .si-wheel-outer {
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: linear-gradient(145deg, #00d4a8, #007070, #00b090, #004a4a);
	box-shadow: 0 0 0 6px rgba(0, 160, 120, 0.22),
		0 12px 40px rgba(0, 100, 100, 0.45),
		inset 0 3px 8px rgba(255, 255, 255, 0.3),
		inset 0 -3px 10px rgba(0, 0, 0, 0.28);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
}

#spin-to-win-container .si-wheel-inner {
	width: 216px;
	height: 216px;
	border-radius: 50%;
	background: linear-gradient(145deg, #f0faf8, #e8f5f2);
	box-shadow: inset 0 4px 14px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
}

#spin-to-win-container canvas#si-wc {
	border-radius: 50%;
	display: block;
	position: relative;
	z-index: 3;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
}

#spin-to-win-container canvas#si-dr {
	position: absolute;
	top: 0;
	left: 0;
	width: 244px;
	height: 244px;
	pointer-events: none;
	z-index: 10;
	border-radius: 50%;
}

/* ── Prizes Card ── */
#spin-to-win-container .si-prizes-card {
	margin: 0.3rem 0.75rem 0.25rem;
	background: rgba(255, 255, 255, 0.92);
	border: 1.5px solid #e8e2d8;
	border-radius: 18px;
	padding: 0.75rem 1rem 0.85rem;
	flex-shrink: 0;
	backdrop-filter: blur(4px);
}

#spin-to-win-container .si-prizes-title {
	font-size: 17px;
	font-weight: 900;
	color: var(--text);
	text-align: center;
	margin-bottom: 0.7rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

#spin-to-win-container .si-prizes-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-around;
	gap: 0.4rem;
}

#spin-to-win-container .si-prize-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	flex: 1;
}

#spin-to-win-container .si-prize-icon {
	width: 74px;
	height: 62px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	position: relative;
}

#spin-to-win-container .si-pi-red {
	background: linear-gradient(145deg, #ff5c5c, #c80e0e);
	box-shadow: 0 6px 18px rgba(200, 14, 14, 0.38);
}

#spin-to-win-container .si-pi-green {
	background: linear-gradient(145deg, #40b86a, #1a7038);
	box-shadow: 0 6px 18px rgba(26, 112, 56, 0.38);
}

#spin-to-win-container .si-pi-dark {
	background: linear-gradient(145deg, #2e2e52, #0c0c22);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}

#spin-to-win-container .si-prize-lbl {
	font-size: 11.5px;
	font-weight: 800;
	color: var(--text);
	letter-spacing: 0.3px;
	text-align: center;
	line-height: 1.25;
}

/* ── How it works ── */
#spin-to-win-container .si-how-card {
	margin: 0.25rem 0.75rem 0.25rem;
	background: rgba(255, 255, 255, 0.88);
	border: 1.5px solid var(--bdr);
	border-radius: 18px;
	padding: 0.7rem 1rem 0.8rem;
	flex-shrink: 0;
}

#spin-to-win-container .si-how-title {
	font-size: 16px;
	font-weight: 900;
	color: var(--t);
	text-align: center;
	margin-bottom: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

#spin-to-win-container .si-how-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.2rem;
}

#spin-to-win-container .si-how-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	text-align: center;
}

#spin-to-win-container .si-step-num {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--t), var(--td));
	color: #fff;
	font-size: 13px;
	font-weight: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 8px rgba(0, 128, 128, 0.35);
	flex-shrink: 0;
}

#spin-to-win-container .si-step-icon {
	font-size: 32px;
	margin: 0.25rem 0 0.1rem;
}

#spin-to-win-container .si-step-t {
	font-size: 12px;
	font-weight: 800;
	color: var(--text);
	line-height: 1.3;
}

#spin-to-win-container .si-step-d {
	font-size: 10.5px;
	color: var(--mut);
	line-height: 1.4;
}

#spin-to-win-container .si-how-arrow {
	flex-shrink: 0;
	padding-top: 38px;
	display: flex;
	align-items: center;
}

#spin-to-win-container .si-how-arrow::before {
	content: '';
	display: block;
	width: 22px;
	border-top: 2px dashed #b8c8d0;
}

/* ── T&C Row ── */
#spin-to-win-container .si-tc-row {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	margin: 0.3rem 0.75rem 0.1rem;
	cursor: pointer;
	background: rgba(255, 255, 255, 0.92);
	border: 1.5px solid var(--bdr);
	border-radius: 14px;
	padding: 0.75rem 0.9rem;
	flex-shrink: 0;
	transition: border-color 0.2s;
}

#spin-to-win-container .si-tc-row:hover {
	border-color: var(--t);
}

#spin-to-win-container .si-tc-box {
	width: 24px;
	height: 24px;
	min-width: 24px;
	border: 2px solid #aab4c0;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	margin-top: 1px;
	flex-shrink: 0;
	background: #fff;
}

#spin-to-win-container .si-tc-box.checked {
	background: var(--t);
	border-color: var(--t);
}

#spin-to-win-container .si-tc-box.checked::after {
	content: "✓";
	font-size: 14px;
	color: #fff;
	font-weight: 900;
	line-height: 1;
}

#spin-to-win-container .si-tc-txt {
	font-size: 13px;
	color: var(--text);
	line-height: 1.55;
}

#spin-to-win-container .si-tc-link {
	color: var(--t);
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

#spin-to-win-container .si-tc-err {
	font-size: 11.5px;
	color: var(--r);
	display: none;
	padding: 0.1rem 0.85rem 0.15rem;
	text-align: center;
	flex-shrink: 0;
}

/* ── START GAME Button ── */
#spin-to-win-container .si-start-btn {
	margin: 0.35rem 0.75rem 0.75rem;
	width: calc(100% - 1.5rem);
	padding: 1rem 1.5rem;
	background: linear-gradient(90deg, #FF3A3A 0%, #e01000 45%, #ff8800 100%);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 19px;
	font-weight: 900;
	letter-spacing: 0.8px;
	cursor: pointer;
	font-family: "Poppins", sans-serif;
	box-shadow: 0 6px 0 rgba(140, 20, 0, 0.28), 0 10px 28px rgba(255, 50, 0, 0.32);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: transform 0.12s, box-shadow 0.12s;
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
}

#spin-to-win-container .si-start-btn::before {
	content: '';
	position: absolute;
	top: 7px;
	left: 18px;
	width: 90px;
	height: 14px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	transform: rotate(-4deg);
}

#spin-to-win-container .si-start-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 9px 0 rgba(140, 20, 0, 0.26), 0 14px 36px rgba(255, 50, 0, 0.38);
}

#spin-to-win-container .si-start-btn:active:not(:disabled) {
	transform: translateY(2px);
	box-shadow: 0 3px 0 rgba(140, 20, 0, 0.28);
}

#spin-to-win-container .si-start-btn:disabled {
	background: linear-gradient(90deg, #c8c8c8, #a8a8a8);
	box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
	cursor: not-allowed;
}

#spin-to-win-container .si-btn-arrow {
	font-size: 22px;
	font-weight: 900;
	margin-left: 4px;
}

/* ── Modal ── */
#spin-to-win-container .modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 2000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s;
}

#spin-to-win-container .modal-overlay.open {
	opacity: 1;
	pointer-events: all;
}

#spin-to-win-container .modal-sheet {
	width: 100%;
	max-width: 390px;
	background: #fff;
	border-radius: 20px 20px 0 0;
	max-height: 78vh;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

#spin-to-win-container .modal-overlay.open .modal-sheet {
	transform: translateY(0);
}

#spin-to-win-container .modal-handle {
	width: 40px;
	height: 4px;
	background: #ddd;
	border-radius: 2px;
	margin: 0.8rem auto 0.4rem;
}

#spin-to-win-container .modal-title {
	font-size: 15px;
	font-weight: 800;
	color: var(--text);
	padding: 0.25rem 1.25rem 0.75rem;
	border-bottom: 1px solid var(--bdr);
	flex-shrink: 0;
}

#spin-to-win-container .modal-body {
	padding: 0.85rem 1.25rem;
	overflow-y: auto;
	flex: 1;
	font-size: 12px;
	color: var(--mut);
	line-height: 1.65;
}

#spin-to-win-container .modal-body h4 {
	font-size: 12px;
	font-weight: 800;
	color: var(--text);
	margin: 0.75rem 0 0.25rem;
}

#spin-to-win-container .modal-body p {
	margin-bottom: 0.45rem;
}

#spin-to-win-container .modal-close-btn {
	margin: 0.6rem 1.25rem 1.1rem;
	padding: 0.8rem;
	background: var(--t);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	font-family: "Poppins", sans-serif;
	flex-shrink: 0;
}

/* ── Scrollbar Styling ── */
#spin-to-win-container ::-webkit-scrollbar {
	width: 3px;
}

#spin-to-win-container ::-webkit-scrollbar-track {
	background: transparent;
}

#spin-to-win-container ::-webkit-scrollbar-thumb {
	background: rgba(0, 128, 128, 0.2);
	border-radius: 2px;
}

/* ── Pointer ── */
#spin-to-win-container .ptr-diamond {
	width: 26px;
	height: 38px;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#spin-to-win-container .ptr-diamond::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	width: 26px;
	height: 26px;
	border-radius: 50% 50% 50% 0;
	background: radial-gradient(
		circle at 32% 28%,
		#fffac0,
		var(--gold) 48%,
		#8a5c00
	);
	transform: translateX(-50%) rotate(-45deg);
	box-shadow: 0 3px 10px rgba(160, 110, 0, 0.6),
		inset 0 2px 4px rgba(255, 255, 180, 0.5);
}

#spin-to-win-container .ptr-diamond::after {
	content: '';
	position: absolute;
	bottom: 1px;
	left: 50%;
	transform: translateX(-50%);
	width: 5px;
	height: 14px;
	background: linear-gradient(180deg, var(--gold), #7a5000);
	border-radius: 0 0 4px 4px;
}

/* ── Si Wptr ── */
#spin-to-win-container .si-wptr {
	position: relative;
	z-index: 5;
	margin-bottom: -12px;
	display: flex;
	justify-content: center;
}

/* ── Spin Icon Animation ── */
@keyframes rotspin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Form Inputs ── */
#spin-to-win-container input[type="text"],
#spin-to-win-container input[type="email"],
#spin-to-win-container input[type="tel"] {
	width: 100%;
	border: none;
	outline: none;
	font-size: 14px;
	color: var(--text);
	font-family: Poppins, sans-serif;
	background: transparent;
	padding: 4px 0;
}

#spin-to-win-container input[type="text"]::placeholder,
#spin-to-win-container input[type="email"]::placeholder,
#spin-to-win-container input[type="tel"]::placeholder {
	color: #c0c0c0;
}

/* ── Option Buttons ── */
#spin-to-win-container .opt {
	background: #fff;
	border: 2px solid var(--bdr);
	border-radius: 14px;
	padding: 0.8rem 1rem;
	font-size: 14px;
	color: var(--text);
	cursor: pointer;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	transition: border-color 0.15s, background 0.15s, transform 0.1s;
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	width: 100%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

#spin-to-win-container .opt:hover:not(:disabled) {
	border-color: var(--t);
	background: var(--tl);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 128, 128, 0.12);
}

#spin-to-win-container .opt.sel {
	border-color: var(--t);
	background: var(--tl);
	box-shadow: 0 4px 12px rgba(0, 128, 128, 0.15);
}

#spin-to-win-container .opt:disabled {
	cursor: default;
	transform: none;
}

#spin-to-win-container .opt.correct {
	background: #e5f8ee;
	border-color: #00b84a;
	color: #004d22;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(0, 184, 74, 0.18);
}

#spin-to-win-container .opt.wrong {
	background: var(--rl);
	border-color: var(--r);
	color: #881818;
}

#spin-to-win-container .olbl {
	width: 30px;
	height: 30px;
	min-width: 30px;
	border-radius: 50%;
	background: var(--t);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s;
}

#spin-to-win-container .opt.correct .olbl {
	background: #00b84a;
}

#spin-to-win-container .opt.wrong .olbl {
	background: var(--r);
}

#spin-to-win-container .opt.sel .olbl {
	background: var(--td);
}

/* ── Animations ── */
@keyframes optCorrect {
	0% {
		transform: scale(1);
	}
	40% {
		transform: scale(1.04);
	}
	100% {
		transform: scale(1);
	}
}

@keyframes optWrong {
	0%,
	100% {
		transform: translateX(0);
	}
	20% {
		transform: translateX(-6px);
	}
	40% {
		transform: translateX(6px);
	}
	60% {
		transform: translateX(-5px);
	}
	80% {
		transform: translateX(4px);
	}
}

#spin-to-win-container .opt.anim-correct {
	animation: optCorrect 0.4s ease;
}

#spin-to-win-container .opt.anim-wrong {
	animation: optWrong 0.4s ease;
}

@keyframes popIn {
	from {
		transform: scale(0);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}
