:root {
	--fw-primary: #2661c5;
	--fw-primary-dark: #1a4da3;
	--fw-secondary: #0F9181;
	--fw-white: #ffffff;
	--fw-text: #2d3436;
	--fw-muted: #636e72;
	--fw-radius: 24px;
	--fw-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
	--fw-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
	--fw-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.fortune-overlay {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(12px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s var(--fw-ease-out), visibility 0.4s;
}

.fortune-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.fortune-overlay.is-visible .fortune-modal {
	transform: scale(1) translateY(0);
	opacity: 1;
}

.fortune-modal {
	position: relative;
	width: 100%;
	max-width: 480px;
	background: var(--fw-white);
	border-radius: var(--fw-radius);
	box-shadow: var(--fw-shadow);
	transform: scale(0.85) translateY(30px);
	opacity: 0;
	transition: transform 0.5s var(--fw-ease), opacity 0.4s;
	overflow: hidden;
}

.fortune-modal-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	border-radius: var(--fw-radius);
}

.fortune-modal-bg-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.35;
	animation: fw-glow 8s ease-in-out infinite;
}

.fortune-modal-bg-glow-1 {
	width: 280px;
	height: 280px;
	background: var(--fw-primary);
	top: -100px;
	right: -80px;
	animation-delay: 0s;
}

.fortune-modal-bg-glow-2 {
	width: 200px;
	height: 200px;
	background: var(--fw-secondary);
	bottom: -60px;
	left: -60px;
	animation-delay: 2s;
}

.fortune-modal-bg-glow-3 {
	width: 120px;
	height: 120px;
	background: var(--fw-primary);
	top: 50%;
	left: -40px;
	animation-delay: 4s;
}

.fortune-modal-bg-noise {
	position: absolute;
	inset: 0;
	opacity: 0.03;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes fw-glow {
	0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
	50% { transform: translate(20px, -20px) scale(1.1); opacity: 0.45; }
}

.fortune-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 10;
	width: 44px;
	height: 44px;
	display: flex !important;
    padding: 0 !important;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	border-radius: 50%;
	color: var(--fw-muted);
	cursor: pointer;
	transition: color 0.2s, transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.fortune-close:hover {
	color: var(--fw-primary);
	transform: scale(1.05);
	box-shadow: 0 4px 16px rgba(38, 97, 197, 0.2);
}

.fortune-content {
	position: relative;
	z-index: 1;
	padding: 32px 28px 36px;
}

.fortune-content-prize {
	text-align: center;
	padding-bottom: 40px;
}

/* Header */
.fortune-header {
	text-align: center;
	margin-bottom: 28px;
}

.fortune-badge {
	display: inline-block;
	padding: 6px 14px;
	background: linear-gradient(135deg, rgba(38, 97, 197, 0.12) 0%, rgba(15, 145, 129, 0.12) 100%);
	color: var(--fw-primary);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 100px;
	margin-bottom: 14px;
}

.fortune-title {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 800;
	color: var(--fw-text);
	line-height: 1.2;
}

.fortune-subtitle {
	margin: 0;
	font-size: 15px;
	color: var(--fw-muted);
	line-height: 1.5;
}

/* Wheel */
.fortune-wheel-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 0;
}

.fortune-wheel-pointer {
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 5;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
	animation: fw-pointer 2s ease-in-out infinite;
}

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

.fortune-wheel-outer {
	position: relative;
	width: 280px;
	height: 280px;
}

.fortune-wheel {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 
		0 0 0 6px var(--fw-white),
		0 0 0 8px rgba(38, 97, 197, 0.3),
		0 12px 40px rgba(0, 0, 0, 0.2);
	transition: transform 0.1s linear;
}

.fortune-wheel.is-spinning {
	transition: transform 5s var(--fw-ease-out);
}

.fortune-wheel-segments {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	pointer-events: none;
}

.fortune-wheel-segment-label {
	pointer-events: none;
}

.fortune-wheel-segment {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 50%;
	height: 50%;
	transform-origin: 0% 0%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.fortune-wheel-segment-inner {
	position: absolute;
	width: 200%;
	height: 200%;
	top: 0;
	left: 0;
	transform-origin: 50% 50%;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding-left: 18%;
	box-sizing: border-box;
}

.fortune-wheel-segment-text {
	font-size: 11px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
	max-width: 70px;
	text-align: center;
}

.fortune-wheel-center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--fw-primary) 0%, var(--fw-primary-dark) 100%);
	border-radius: 50%;
	box-shadow: 0 4px 20px rgba(38, 97, 197, 0.5);
	z-index: 4;
}

.fortune-spin-btn {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--fw-white);
	border: none;
	cursor: pointer;
	display: flex !important;
    padding: 0 !important;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s, box-shadow 0.2s;
}

.fortune-spin-btn:hover:not(:disabled) {
	transform: scale(1.08);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fortune-spin-btn:disabled {
	cursor: not-allowed;
	opacity: 0.8;
}

.fortune-spin-btn-text {
	font-size: 11px;
	font-weight: 800;
	color: var(--fw-primary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.fortune-prize-icon {
	margin-bottom: 20px;
	animation: fw-prize-icon 0.8s var(--fw-ease) forwards;
}

@keyframes fw-prize-icon {
	0% {
		opacity: 0;
		transform: scale(0.5);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

.fortune-prize-label {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--fw-secondary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	animation: fw-fade-up 0.5s 0.15s var(--fw-ease) both;
}

.fortune-prize-name {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 800;
	color: var(--fw-text);
	line-height: 1.3;
	animation: fw-fade-up 0.5s 0.25s var(--fw-ease) both;
}

.fortune-prize-desc {
	margin: 0 0 24px;
	font-size: 15px;
	color: var(--fw-muted);
	line-height: 1.5;
	animation: fw-fade-up 0.5s 0.35s var(--fw-ease) both;
}

.fortune-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 16px 28px;
	background: linear-gradient(135deg, var(--fw-primary) 0%, var(--fw-primary-dark) 100%);
	color: var(--fw-white);
	font-size: 15px;
	font-weight: 700;
	border: none;
	border-radius: 14px;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(38, 97, 197, 0.4);
	transition: transform 0.2s, box-shadow 0.2s;
	animation: fw-fade-up 0.5s 0.45s var(--fw-ease) both;
}

.fortune-cta-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(38, 97, 197, 0.45);
}

@keyframes fw-fade-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fortune-overlay.is-prize .fortune-modal {
	animation: fw-modal-bounce 0.6s var(--fw-ease) forwards;
}

@keyframes fw-modal-bounce {
	0% { transform: scale(1); }
	40% { transform: scale(1.03); }
	100% { transform: scale(1); }
}

@media (max-width: 480px) {
	.fortune-modal {
		max-width: 100%;
	}
	.fortune-wheel-outer {
		width: 260px;
		height: 260px;
	}
	.fortune-wheel-segment-text {
		font-size: 10px;
		max-width: 60px;
	}
	.fortune-title {
		font-size: 22px;
	}
}
