/* =============================================
   КОСТЯК: стили для popup + FAQ
   Подключать отдельно от основного CSS сайта
   ============================================= */

:root {
	--popup-text-primary: #ffffff;
	--popup-color-primary: #fc634f;
	--popup-color-primary-hover: #ef8c26;
	--popup-color-primary-active: #ef8c26;
	--popup-color-primary-alt: #ef8c26;
	--popup-color-accent: #000000;
	--popup-color-gradient-end: #fc634f;
	--popup-bg: #080c15;
}

/* =============================================
   1. POPUP (showPopup)
   ============================================= */

.casino-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 5px;
	visibility: hidden;
	opacity: 0;
	background: var(--popup-bg);
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 1100;
}

.casino-popup * {
	box-sizing: border-box;
}

.casino-popup.show {
	visibility: visible;
	opacity: 1;
}

.redirect-notice {
	text-align: center;
	color: #fff;
	padding: 15px;
	animation: fadeIn 0.5s ease-in-out;
}

.notice-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 10px;
	color: white;
}

.roulette-wheel {
	position: relative;
	width: 120px;
	height: 120px;
	animation: spin 3s linear infinite;
}

.wheel-inner {
	position: relative;
	width: 100%;
	height: 100%;
	border: 3px solid var(--popup-text-primary);
	border-radius: 50%;
	background: conic-gradient(
		from 0deg,
		var(--popup-color-primary) 0deg 45deg,
		var(--popup-color-accent) 45deg 90deg,
		var(--popup-color-primary) 90deg 135deg,
		var(--popup-color-accent) 135deg 180deg,
		var(--popup-color-primary) 180deg 225deg,
		var(--popup-color-accent) 225deg 270deg,
		var(--popup-color-primary) 270deg 315deg,
		var(--popup-color-accent) 315deg 360deg
	);
	box-shadow: 0 0 30px rgba(32, 153, 255, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.wheel-center {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 1;
	display: flex;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	background: var(--popup-text-primary);
	transform: translate(-50%, -50%);
	box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.ball {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--popup-color-accent);
	box-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
	animation: ballBounce 0.6s ease-in-out infinite alternate;
}

.progress-container {
	width: 280px;
	text-align: center;
}

.progress-bar {
	position: relative;
	width: 100%;
	height: 8px;
	border-radius: 4px;
	background: #9a68d1;
	box-shadow: 0 0 10px rgba(32, 153, 255, 0.6);
}

.progress-fill {
	width: 0%;
	height: 100%;
	overflow: hidden;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--popup-color-primary), var(--popup-color-gradient-end), var(--popup-color-primary));
	background-size: 200% 100%;
	transition: width 0.3s linear;
	animation: progressShine 2s ease-in-out infinite;
}

.progress-text {
	margin-top: 12px;
	font-size: 14px;
	font-weight: bold;
	color: var(--popup-color-primary);
}

/* =============================================
   3. FAQ ACCORDION (DOMContentLoaded — faqItems)
   ============================================= */

.faq-item {
	background: #1a181c;
	border-radius: 8px;
	margin-bottom: 15px;
	overflow: hidden;
	transition: all 0.3s ease;
}

.faq-container {
	margin-top: 24px;
}

.faq-item.active .faq-arrow {
	transform: rotate(45deg);
}

.faq-item.active .faq-answer {
	opacity: 1;
	height: auto;
	transform: scaleY(1);
	padding: 16px 24px 24px 24px;
}

.faq-question {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 12px 12px 24px;
	cursor: pointer;
	background: #1a181c;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.faq-question:focus-visible {
	outline: 3px solid rgba(252, 99, 79, 0.3);
	outline-offset: -3px;
}

.faq-question h3 {
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	margin: 0;
	line-height: 1.3;
	flex: 1;
	padding-right: 16px;
}

.faq-arrow {
	width: 23px;
	height: 23px;
	background: #fc634f;
	-webkit-mask-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNyIgaGVpZ2h0PSIyNyI+PGcgZGF0YS1uYW1lPSJEZXBvc2l0IEljb24iIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiI+PHBhdGggZGF0YS1uYW1lPSJQYXRoIDM3NjQiIGQ9Ik0uNSAxMy41YTEzIDEzIDAgMSAxIDEzIDEzIDEzIDEzIDAgMCAxLTEzLTEzWiIvPjxwYXRoIGRhdGEtbmFtZT0iTGluZSAxIiBkPSJNMTMuNSA2Ljk3OVYyMC4wMiIgc3Ryb2tlLXdpZHRoPSIxLjYiLz48cGF0aCBkYXRhLW5hbWU9IkxpbmUgMiIgZD0iTTYuNzQ2IDEzLjVoMTMuNTA3IiBzdHJva2Utd2lkdGg9IjEuNiIvPjwvZz48L3N2Zz4=);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: 23px;
	transition: .3s ease;
}

.faq-answer {
	opacity: 0;
	height: 0;
	overflow: hidden;
	transform: scaleY(0);
	transform-origin: top;
	transition: all 0.3s ease;
	background: #1a181c;
	padding: 0 24px;
	border-top: 2px solid #000;
}

.faq-answer p {
	color: #efe6d1;
}

/* =============================================
   АНИМАЦИИ
   ============================================= */

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@keyframes ballBounce {
	0%   { transform: scale(1); }
	100% { transform: scale(1.3); }
}

@keyframes progressShine {
	0%   { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

@media (max-width: 640px) {
	.roulette-wheel {
		width: 96px;
		height: 96px;
	}

	.notice-title {
		font-size: 20px;
	}

	.progress-container {
		width: min(280px, 100%);
	}

	.faq-question {
		padding: 12px 12px 12px 18px;
	}

	.faq-question h3 {
		font-size: 16px;
	}

	.faq-item.active .faq-answer,
	.faq-answer {
		padding-left: 18px;
		padding-right: 18px;
	}
}
