.nx-gw {
	--nx-gw-primary: #dc2626;
	--nx-gw-primary-dark: #991b1b;
	--nx-gw-accent: #ef4444;
	--nx-gw-text: #0f172a;
	--nx-gw-muted: #64748b;
	--nx-gw-border: rgba(252, 165, 165, 0.88);
	--nx-gw-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
	--nx-gw-soft-shadow: 0 16px 35px rgba(220, 38, 38, 0.2);
	font-family: inherit;
}

body.nx-gw-open {
	overflow: hidden;
}

.nx-gw-trigger {
	position: fixed;
	left: 18px;
	top: 30%;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	padding: 10px;
	border: 0;
	border-radius: 28px;
	background: linear-gradient(135deg, #991b1b 0%, #dc2626 52%, #ef4444 100%);
	box-shadow: var(--nx-gw-soft-shadow);
	color: #ffffff;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, width 0.25s ease;
	animation: nx-gw-float 2.8s ease-in-out infinite;
}

.nx-gw-trigger:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 44px rgba(220, 38, 38, 0.28);
}

.nx-gw-trigger:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.nx-gw-trigger__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	font-size: 34px;
	line-height: 1;
	flex: 0 0 72px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.nx-gw-trigger.has-image .nx-gw-trigger__fallback {
	font-size: 0;
}

.nx-gw-trigger__text {
	display: none;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
}

.nx-gw-trigger__text strong {
	font-size: 15px;
	font-weight: 800;
}

.nx-gw-trigger__text small {
	display: block;
	margin-bottom: 2px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.82;
}

.nx-gw-trigger.is-played {
	width: auto;
	min-width: 220px;
	height: auto;
	padding: 12px 14px;
	border-radius: 20px;
	background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 50%, #ef4444 100%);
	animation: none;
	justify-content: flex-start;
}

.nx-gw-trigger.is-played .nx-gw-trigger__fallback {
	width: 52px;
	height: 52px;
	border-radius: 16px;
	flex-basis: 52px;
}

.nx-gw-trigger.is-played .nx-gw-trigger__text {
	display: flex;
}

.nx-gw-trigger.is-played.is-played-empty {
	width: 92px;
	min-width: 92px;
	height: 92px;
	padding: 10px;
	border-radius: 28px;
	justify-content: center;
}

.nx-gw-trigger.is-played.is-played-empty .nx-gw-trigger__text {
	display: none;
}

.nx-gw-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.nx-gw-modal.is-active {
	display: block;
}

.nx-gw-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(4px);
}

.nx-gw-dialog {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
}

.nx-gw-close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 8;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.22s ease, background 0.22s ease;
}

.nx-gw-close:hover {
	transform: rotate(90deg);
	background: rgba(255, 255, 255, 0.28);
}

.nx-gw-shell {
	position: relative;
	display: grid;
	grid-template-columns: minmax(300px, 42%) minmax(320px, 58%);
	width: min(1080px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	overflow: hidden;
	border-radius: 28px;
	background: #ffffff;
	box-shadow: var(--nx-gw-shadow);
}

.nx-gw-shell__left,
.nx-gw-shell__right {
	position: relative;
	padding: 10px;
}

.nx-gw-shell__left {
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0) 42%),
		linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

.nx-gw-shell__right {
	overflow-y: auto;
	background: linear-gradient(180deg, #fdfefe 0%, #f8fbff 100%);
}

.nx-gw-shell__right::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.nx-gw-shell__right > * {
	position: relative;
	z-index: 1;
}

.nx-gw-wheel-box {
	position: relative;
	width: min(100%, 520px);
	aspect-ratio: 1 / 1;
}

.nx-gw-wheel-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 20px 28px rgba(15, 23, 42, 0.26));
	transition: transform 6.2s cubic-bezier(0.16, 1, 0.3, 1);
	transform-origin: center;
}

.nx-gw-wheel-pointer {
	position: absolute;
	top: -2px;
	left: 50%;
	z-index: 5;
	width: 0;
	height: 0;
	border-left: 18px solid transparent;
	border-right: 18px solid transparent;
	border-top: 36px solid #ffffff;
	border-bottom: 0;
	transform: translateX(-50%);
	filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.2));
}

.nx-gw-wheel-pointer::after {
	content: "";
	position: absolute;
	left: -9px;
	top: -34px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: var(--nx-gw-accent);
}

.nx-gw-wheel-center-image,
.nx-gw-wheel-center {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.nx-gw-wheel-center-image {
	z-index: 3;
	width: 108px;
	height: 108px;
	border-radius: 999px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	border: 6px solid rgba(255, 255, 255, 0.16);
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.nx-gw-wheel-box.has-center-image .nx-gw-wheel-center-image {
	opacity: 1;
}

.nx-gw-wheel-center {
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 126px;
	height: 126px;
	border: 8px solid #ffffff;
	border-radius: 999px;
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	box-shadow: 0 14px 30px rgba(220, 38, 38, 0.3);
	color: #ffffff;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.nx-gw-wheel-center:hover {
	transform: translate(-50%, -50%) scale(1.04);
	box-shadow: 0 18px 34px rgba(220, 38, 38, 0.34);
}

.nx-gw-wheel-center:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.nx-gw-view {
	display: none;
	flex-direction: column;
	height: 100%;
}

.nx-gw-view.is-active {
	display: flex;
}

.nx-gw-copy {
	margin-bottom: 10px;
}

.nx-gw-eyebrow,
.nx-gw-result-card__eyebrow {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(220, 38, 38, 0.09);
	color: #b91c1c;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.nx-gw-title {
	margin: 10px 0 8px;
	color: var(--nx-gw-text);
	font-size: clamp(24px, 2.7vw, 38px);
	line-height: 1.08;
	font-weight: 800;
}

.nx-gw-description {
	margin: 0;
	color: var(--nx-gw-muted);
	font-size: 15px;
	line-height: 1.55;
}

.nx-gw-form-message {
	margin-bottom: 10px;
	padding: 10px;
	border-radius: 14px;
	border: 1px solid rgba(239, 68, 68, 0.18);
	background: rgba(254, 242, 242, 0.96);
	color: #b91c1c;
	font-size: 14px;
	line-height: 1.5;
}

.nx-gw-form-message.is-success {
	border-color: rgba(22, 163, 74, 0.18);
	background: rgba(240, 253, 244, 0.98);
	color: #166534;
}

.nx-gw-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nx-gw-field input {
	width: 100%;
	height: 52px;
	padding: 0 14px;
	border: 1px solid var(--nx-gw-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.96);
	color: var(--nx-gw-text);
	font-size: 15px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nx-gw-field input:focus {
	border-color: #ef4444;
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
	outline: none;
	transform: translateY(-1px);
}

.nx-gw-submit,
.nx-gw-result-actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 22px;
	border-radius: 16px;
	border: 0;
	background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 14px 22px rgba(220, 38, 38, 0.22);
	transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.nx-gw-submit:hover,
.nx-gw-result-actions .button:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 28px rgba(220, 38, 38, 0.28);
}

.nx-gw-submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.nx-gw-rules {
	margin-top: 10px;
	padding: 10px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.76);
	border: 1px solid rgba(254, 202, 202, 0.9);
}

.nx-gw-rules__title {
	margin-bottom: 10px;
	color: var(--nx-gw-text);
	font-size: 16px;
	font-weight: 700;
}

.nx-gw-rules__content {
	color: var(--nx-gw-muted);
	font-size: 14px;
	line-height: 1.7;
	white-space: pre-line;
}

.nx-gw-view--result {
	justify-content: center;
}

.nx-gw-result-card {
	display: flex;
	flex-direction: column;
	padding: 18px;
	border-radius: 24px;
	background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
	border: 1px solid rgba(252, 165, 165, 0.72);
	box-shadow: 0 18px 32px rgba(220, 38, 38, 0.08);
}

.nx-gw-result-title {
	margin: 16px 0 12px;
	color: var(--nx-gw-text);
	font-size: clamp(28px, 3vw, 36px);
	line-height: 1.08;
	font-weight: 800;
}

.nx-gw-result-code {
	display: none;
	margin-bottom: 14px;
	padding: 16px 18px;
	border-radius: 18px;
	background: #0f172a;
	color: #f8fafc;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
}

.nx-gw-result-card.has-code .nx-gw-result-code {
	display: block;
}

.nx-gw-result-message,
.nx-gw-result-expiry {
	margin: 0 0 12px;
	color: var(--nx-gw-muted);
	font-size: 15px;
	line-height: 1.7;
}

.nx-gw-result-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 12px;
}

.nx-gw-result-actions .button.alt {
	background: #ffffff;
	color: var(--nx-gw-primary);
	border: 1px solid rgba(220, 38, 38, 0.22);
	box-shadow: none;
}

.nx-gw-result-card:not(.has-code) .nx-gw-copy-code {
	display: none;
}

.nx-gw-result-card.no-reward .nx-gw-use-now {
	display: none;
}

@keyframes nx-gw-float {
	0%,
	100% {
		transform: translateY(0);
		box-shadow: 0 16px 34px rgba(220, 38, 38, 0.2);
	}

	50% {
		transform: translateY(-6px);
		box-shadow: 0 20px 38px rgba(220, 38, 38, 0.26);
	}
}

@media (max-width: 991px) {
	.nx-gw-dialog {
		padding: 10px;
	}

	.nx-gw-shell {
		grid-template-columns: 1fr;
		width: min(720px, calc(100vw - 28px));
		max-height: calc(100vh - 28px);
		overflow-y: auto;
	}

	.nx-gw-shell__left,
	.nx-gw-shell__right {
		padding: 10px;
	}

	.nx-gw-wheel-box {
		max-width: 420px;
		margin: 0 auto;
	}
}

@media (max-width: 767px) {
	.nx-gw-trigger {
		left: 10px;
		top: 28%;
		width: 74px;
		height: 74px;
		padding: 8px;
		border-radius: 22px;
	}

	.nx-gw-trigger__fallback {
		width: 58px;
		height: 58px;
		border-radius: 18px;
		flex-basis: 58px;
	}

	.nx-gw-trigger.is-played {
		min-width: 180px;
	}

	.nx-gw-trigger.is-played.is-played-empty {
		width: 74px;
		min-width: 74px;
		height: 74px;
	}

	.nx-gw-shell {
		border-radius: 24px;
	}

	.nx-gw-title,
	.nx-gw-result-title {
		font-size: 28px;
	}

	.nx-gw-description {
		font-size: 15px;
	}

	.nx-gw-close {
		top: 12px;
		right: 12px;
	}

	.nx-gw-result-code {
		font-size: 22px;
	}

	.nx-gw-result-actions .button,
	.nx-gw-submit {
		width: 100%;
	}
}
