/* Fortune wheel — отдельная страница (баннер + модалка) */

.fw-page {
	--fw-purple-1: #1a0b3c;
	--fw-purple-2: #2d0f5c;
	--fw-purple-3: #30107a;
	--fw-lime: #ccff00;
	--fw-lime-glow: rgba(204, 255, 0, 0.85);
	--fw-blue: #1e6fd9;
	--fw-blue-dark: #0d3a7a;
	--fw-pink-glow: #ff3366;
	--fw-text: #ffffff;
	--fw-muted: rgba(255, 255, 255, 0.65);

	margin: 24px 0 0px;

	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.fw-stars {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
		radial-gradient(1px 1px at 80% 40%, rgba(255, 255, 255, 0.4) 50%, transparent 52%),
		radial-gradient(2px 2px at 30% 70%, rgba(255, 255, 255, 0.35) 50%, transparent 52%),
		radial-gradient(1px 1px at 60% 15%, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
		radial-gradient(1.5px 1.5px at 90% 80%, rgba(255, 255, 255, 0.45) 50%, transparent 52%);
	opacity: 0.9;
}

.fw-aurora {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse 120% 80% at 50% 100%, rgba(80, 40, 160, 0.45), transparent 55%);
}

/* Летающие звёздочки (баннер Турбина удачи)
   Вертикальный ход задаётся --fw-rise (px) с баннера; % в translateY шли бы от размера глифа — из‑за этого «не летали». */
.fw-banner-particles {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
	--fw-rise: 320px;
}

.fw-particle {
	position: absolute;
	bottom: -14%;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	line-height: 1;
	font-weight: 600;
	font-size: 10px;
	color: rgba(255, 255, 255, 0.94);
	text-shadow:
		0 0 8px rgba(200, 240, 255, 0.65),
		0 0 16px rgba(255, 255, 255, 0.45),
		0 0 2px rgba(255, 255, 255, 0.9);
	filter: drop-shadow(0 0 3px rgba(180, 230, 255, 0.55));
	opacity: 0;
	animation: fw-particle-fly linear infinite;
	will-change: transform, opacity;
	user-select: none;
}

@keyframes fw-particle-fly {
	0% {
		transform: translate3d(0, 0, 0) scale(var(--fw-s0, 0.55));
		opacity: 0;
	}
	7% {
		opacity: 0.9;
	}
	25% {
		transform: translate3d(var(--fw-x1, 0px), calc(var(--fw-rise) * -0.25), 0) scale(var(--fw-s1, 1));
	}
	50% {
		transform: translate3d(var(--fw-x2, 0px), calc(var(--fw-rise) * -0.5), 0) scale(var(--fw-s2, 1));
	}
	75% {
		transform: translate3d(var(--fw-x3, 0px), calc(var(--fw-rise) * -0.75), 0) scale(var(--fw-s3, 1));
	}
	88% {
		opacity: 0.5;
	}
	100% {
		transform: translate3d(var(--fw-x4, 0px), calc(var(--fw-rise) * -1), 0) scale(var(--fw-s4, 0.95));
		opacity: 0;
	}
}

/* Баннер */
.fw-banner {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	min-height: 200px;
	cursor: pointer;
	background: linear-gradient(135deg, var(--fw-purple-1) 0%, var(--fw-purple-3) 55%, #1a0f4a 100%);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fw-banner:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.fw-banner__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr minmax(200px, 320px);
	gap: 20px;
	align-items: center;
	padding: 24px 28px;
}

@media (max-width: 768px) {
	.fw-banner__inner {
		grid-template-columns: 1fr;
	}
}

.fw-banner__left {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fw-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	color: var(--fw-text);
	font-size: 12px;
	font-weight: 600;
}

.fw-pill--spin {
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.fw-pill__icon {
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fw-pill__icon svg {
	display: block;
}

.fw-pill--ready {
	background: rgba(30, 120, 60, 0.45);
	border-color: rgba(197, 229, 82, 0.45);
	box-shadow: 0 0 20px rgba(197, 229, 82, 0.2);
	animation: fw-pill-ready-pulse 2.4s ease-in-out infinite;
}

.fw-pill--ready .fw-pill__icon--ready {
	display: inline-flex;
	color: var(--fw-lime);
}

.fw-pill--wait {
	background: rgba(0, 0, 0, 0.45);
	border-color: rgba(255, 255, 255, 0.08);
}

.fw-pill--wait .fw-pill__icon--wait {
	display: inline-flex;
	color: rgba(255, 255, 255, 0.55);
}

@keyframes fw-pill-ready-pulse {
	0%,
	100% {
		box-shadow: 0 0 16px rgba(197, 229, 82, 0.15);
	}
	50% {
		box-shadow: 0 0 24px rgba(197, 229, 82, 0.35);
	}
}

.fw-banner__title {
	margin: 0;
	font-size: clamp(22px, 4vw, 32px);
	font-weight: 800;
	color: var(--fw-text);
	letter-spacing: -0.02em;
}

.fw-banner__sub {
	margin: 0;
	font-size: 14px;
	color: var(--fw-muted);
	line-height: 1.45;
	max-width: 420px;
}

.fw-banner__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	margin-top: 8px;
}

.fw-promo-card {
	display: flex;
	align-items: stretch;
	min-width: 240px;
	flex: 1;
	max-width: 240px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.fw-promo-card__info {
	flex: 1;
	padding: 12px 14px;
}

.fw-promo-card__label {
	font-size: 11px;
	text-transform: lowercase;
	color: #8e8e8e;
	margin-bottom: 4px;
}

.fw-promo-card__code {
	font-size: 18px;
	font-weight: 800;
	color: #fff;
	letter-spacing: 0.04em;
}

.fw-promo-card__expired {
	font-size: 15px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.38);
	letter-spacing: 0.02em;
}

.is-hidden {
	display: none !important;
}

.fw-promo-validity,
.fw-modal-promo-validity {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.72);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: baseline;
}

.fw-promo-validity {
	margin-top: 2px;
}

.fw-modal-promo-validity {
	margin-bottom: 10px;
}

.fw-promo-validity__label {
	opacity: 0.88;
}

.fw-promo-validity__time {
	font-weight: 700;
	color: var(--fw-lime);
}

.fw-banner__prize-note {
	font-size: 11px;
	margin: 6px 0 0;
	color: rgba(255, 255, 255, 0.45);
	max-width: 320px;
	line-height: 1.35;
}

.fw-copy-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.fw-promo-card__copy {
	width: 52px;
	flex-shrink: 0;
	border: none;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.fw-promo-card__copy:hover {
	background: #e8e8e8;
}

.fw-copy-btn {
	position: relative;
	overflow: hidden;
}

.fw-copy-btn__layer {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.fw-copy-btn__layer--copy svg {
	width: 22px;
	height: 22px;
	stroke: #111;
	fill: none;
}

.fw-copy-btn__layer--ok {
	opacity: 0;
	transform: scale(0.35);
	pointer-events: none;
}

.fw-copy-btn__layer--ok svg {
	width: 24px;
	height: 24px;
	stroke: #1a7f37;
}

.fw-copy-btn.is-copied .fw-copy-btn__layer--copy {
	opacity: 0;
	transform: scale(0.6);
}

.fw-copy-btn.is-copied .fw-copy-btn__layer--ok {
	opacity: 1;
	transform: scale(1);
}

.fw-copy-btn.is-copied {
	background: #e8f5e9 !important;
}

.fw-timer-block {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fw-timer-label {
	font-size: 12px;
	color: var(--fw-muted);
}

.fw-timer-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.45);
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: 14px;
	color: #fff;
	letter-spacing: 0.02em;
}

.fw-banner__right {
	position: relative;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.fw-arrow-down {
	width: 0;
	height: 0;
	border-left: 22px solid transparent;
	border-right: 22px solid transparent;
	border-top: 36px solid var(--fw-lime);
	filter: drop-shadow(0 0 12px var(--fw-lime-glow)) drop-shadow(0 0 24px rgba(204, 255, 0, 0.35));
	margin-bottom: 8px;
}

.fw-banner__prize-label {
	font-size: 13px;
	color: var(--fw-muted);
}

.fw-banner__prize-amount {
	font-size: clamp(26px, 5vw, 40px);
	font-weight: 800;
	color: #fff;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.fw-banner__wheel-peek {
	position: absolute;
	bottom: -40px;
	right: 0;
	width: 200px;
	height: 100px;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	background: linear-gradient(180deg, #2a7fff 0%, #0d3a7a 100%);
	box-shadow: 0 0 24px rgba(46, 159, 255, 0.45), inset 0 -4px 12px rgba(0, 0, 0, 0.35);
	opacity: 0.85;
	pointer-events: none;
}

.fw-shard {
	position: absolute;
	width: 12px;
	height: 24px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 2px;
	transform: rotate(15deg);
	pointer-events: none;
}

.fw-banner--empty .fw-pill--spin,
.fw-banner--empty .fw-promo-card,
.fw-banner--empty .fw-timer-pill,
.fw-banner--empty .fw-banner__prize-amount,
.fw-banner--empty .fw-banner__prize-label {
	opacity: 0.5;
}

.fw-banner--empty .fw-banner__wheel-peek {
	opacity: 0.6;
}

/* Модалка */
.fw-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10050;
	background: rgba(5, 0, 20, 0.72);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.fw-modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.fw-modal {
	position: relative;
	width: min(440px, 100%);
    /* min-height: 585px; */
	overflow: hidden;
	border-radius: 22px;
	background: linear-gradient(165deg, #1a0b3c 0%, #2a1268 45%, #18082f 100%);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	display: flex;
	flex-direction: column;
	transform: scale(0.96);
	transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.fw-modal-overlay.is-open .fw-modal {
	transform: scale(1);
}

.fw-modal__head {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 48px 8px;
	position: relative;
}

.fw-logo {
	font-size: 22px;
	font-weight: 800;
	font-style: italic;
	color: #fff;
	letter-spacing: -0.03em;
}

.fw-logo span:first-child {
	color: var(--fw-lime);
	font-size: 26px;
	margin-right: 2px;
	text-shadow: 0 0 18px rgba(204, 255, 0, 0.5);
}

.fw-modal__close {
	position: absolute;
	right: 12px;
	top: 10px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s;
}

.fw-modal__close:hover {
	background: rgba(255, 255, 255, 0.16);
}

.fw-modal__body {
	padding: 0 20px 12px;
	text-align: center;
	flex: 1;
	overflow-y: auto;
}

.fw-modal .fw-arrow-down {
	margin: 0 auto 6px;
}

.fw-modal__got {
	font-size: 13px;
	color: var(--fw-muted);
	margin-bottom: 4px;
}

.fw-modal__amount {
	font-size: 42px;
	font-weight: 800;
	color: #fff;
	line-height: 1.1;
	margin-bottom: 16px;
	min-height: 48px;
}

.fw-modal__amount.is-hidden,
.fw-modal__got.is-hidden {
	opacity: 0;
	visibility: hidden;
	min-height: 0;
	margin: 0;
	height: 0;
	overflow: hidden;
}

.fw-ticket {
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 10px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.fw-ticket__left {
	flex: 1;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 15px;
	color: #111;
	border-right: 2px dotted rgba(0, 0, 0, 0.2);
}

.fw-ticket__right {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 14px 14px 12px;
	font-weight: 800;
	font-size: 16px;
	color: #111;
}

.fw-ticket__copy {
	width: 66px;
	height: 20px;
	border: none;
	border-radius: 10px;
	background: #f0f0f0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fw-ticket__copy:hover {
	background: #e4e4e4;
}

.fw-ticket__copy .fw-copy-btn__layer--copy svg {
	width: 20px;
	height: 20px;
	stroke: #111;
	fill: none;
}

.fw-ticket__copy .fw-copy-btn__layer--ok svg {
	width: 22px;
	height: 22px;
}

.fw-hint-pill {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 12px;
	margin-bottom: 14px;
}

.fw-modal__timer-row {
	margin-bottom: 8px;
}

.fw-modal__timer-row .fw-timer-label {
	color: var(--fw-muted);
	font-size: 13px;
}

/* Блок колеса: видна верхняя половина (как барабан), кнопка поверх снизу */
.fw-wheel-wrap {
	position: relative;
	margin: 55px -20px -26px;

	perspective: 1000px;
	overflow: visible;
}

/* Только сцена колеса + кнопка — чтобы «Играть» была привязана к дуге, а не к тексту ошибки */
.fw-wheel-visual {
	--fw-size: min(420px, calc(100vw - 48px));
	position: relative;
	min-height: calc(var(--fw-size) / 2);
	overflow: visible;
}

/* Мягкая подсветка сцены под колесом */
.fw-wheel-spotlight {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 320px;
	height: 140px;
	border-radius: 50%;
	transform: translateX(-50%);
	background: radial-gradient(
		ellipse 50% 80% at 50% 100%,
		rgba(0, 220, 255, 0.22) 0%,
		rgba(120, 50, 255, 0.08) 45%,
		transparent 70%
	);
	pointer-events: none;
	z-index: 1;
	animation: fw-spot-pulse 4s ease-in-out infinite;
}

@keyframes fw-spot-pulse {
	0%,
	100% {
		opacity: 0.85;
		transform: translateX(-50%) scale(1);
	}
	50% {
		opacity: 1;
		transform: translateX(-50%) scale(1.05);
	}
}

.fw-wheel-stage {
	position: relative;
	/* Видна верхняя половина круга; низ обрезан как на референсе */
	height: 255px;
	overflow: hidden;
	margin-bottom: 0;
	z-index: 2;
}

/* Лёгкие «искры» на фоне сцены */
.fw-wheel-stage::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
		radial-gradient(1px 1px at 75% 25%, rgba(255, 255, 255, 0.4) 50%, transparent 52%),
		radial-gradient(1.5px 1.5px at 50% 60%, rgba(204, 255, 0, 0.35) 50%, transparent 52%);
	opacity: 0.6;
	pointer-events: none;
	animation: fw-sparkle 3s ease-in-out infinite alternate;
}

@keyframes fw-sparkle {
	from {
		opacity: 0.45;
	}
	to {
		opacity: 0.75;
	}
}

.fw-wheel-pointer {
	position: absolute;
	left: 50%;
	top: 4px;
	transform: translateX(-50%);
	z-index: 3;
	width: 44px;
	height: 38px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.fw-wheel-pointer__arrow {
	display: block;
	width: 0;
	height: 0;
	border-left: 20px solid transparent;
	border-right: 20px solid transparent;
	border-top: 34px solid rgb(204, 255, 0);
	/* filter: drop-shadow(0 0 12px rgba(204, 255, 0, 0.95)) drop-shadow(0 0 28px rgba(0, 255, 200, 0.6)); */
	animation: fw-pointer-bob 2.2s ease-in-out infinite;
}

@keyframes fw-pointer-bob {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(3px);
	}
}

.fw-wheel-frame {
	position: absolute;
	left: 50%;
	bottom: calc(-0.5 * var(--fw-size));
	width: var(--fw-size);
	height: var(--fw-size);
	transform: translateX(-50%);
	transform-style: preserve-3d;
}

/* Внешний обод (крутится с колесом; под canvas) */
.fw-wheel-rim {
	position: absolute;
	inset: -10px;
	z-index: 0;
	border-radius: 50%;
	background: conic-gradient(
		from 180deg,
		rgba(0, 220, 255, 0.5) 0deg,
		rgba(80, 40, 200, 0.35) 90deg,
		rgba(0, 220, 255, 0.45) 180deg,
		rgba(0, 180, 255, 0.65) 270deg,
		rgba(0, 220, 255, 0.5) 360deg
	);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 10px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 10px));
	pointer-events: none;
	z-index: 0;
	opacity: 0.92;
	filter: blur(0.5px);
}

.fw-wheel-rotor {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	transform-origin: 50% 50%;
	transition: transform 5.2s cubic-bezier(0.15, 0.85, 0.15, 1);
	will-change: transform;
	z-index: 1;
}

.fw-wheel-rotor.is-spinning {
	transition: transform 5.2s cubic-bezier(0.12, 0.88, 0.18, 1);
}

.fw-wheel-rotor canvas {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	box-shadow:
		0 0 0 4px rgba(0, 220, 255, 0.35),
		0 0 0 8px rgba(0, 0, 0, 0.45),
		0 0 50px rgba(0, 200, 255, 0.45),
		0 0 90px rgba(80, 40, 200, 0.25),
		inset 0 0 50px rgba(0, 0, 0, 0.45),
		inset 0 -20px 40px rgba(0, 0, 0, 0.35);
}

.fw-play-btn {
	position: absolute;
	left: 50%;
	bottom: 10px;
	z-index: 10;
	width: calc(100% - 32px);
	margin: 0;
	display: block;
	padding: 16px 24px;
	border: none;
	border-radius: 14px;
	background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 55%, #e8e8e8 100%);
	color: #111;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow:
		0 4px 0 rgba(0, 0, 0, 0.12),
		0 8px 28px rgba(0, 0, 0, 0.35);
	transform: translateX(-50%);
	transition: transform 0.15s, box-shadow 0.15s;
}

.fw-play-btn:hover:not(:disabled) {
	transform: translateX(-50%) translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.fw-play-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.fw-err {
	color: #ff8a8a;
	font-size: 13px;
	margin-top: 12px;
	min-height: 18px;
}

.fw-modal__hint {
	font-size: 12px;
	color: var(--fw-muted);
	margin-top: 10px;
	padding-bottom: 8px;
}

