/* ============================================================
   site.css — возрастной фильтр 18+, блок ответственной игры,
   переделанный попап в красно-золотой теме.
   Подключается последним и перекрывает main.css.
   ============================================================ */

/* ------------------------------------------------------------
   Правки базового макета (раньше жили инлайном в <head>)
   ------------------------------------------------------------ */
.wrapper {
	background-color: #dbe8f7;
	/* main.css грузит main-bg.webp, которого больше нет — фон теперь видео */
	background-image: none;
}
.wrapper::before,
.wrapper::after,
.footer::before {
	display: none;
}
.wheel {
	/* --frame — внешний габарит рамки.
	   Отверстие в рамке = 0.6389 её полотна (замерено по картинке),
	   диск делаем чуть больше, чтобы не было щели под внутренним ободом. */
	--frame: min(82rem, 96vw);
	--wheel: calc(var(--frame) * 0.658);
	margin-top: 9rem;
	margin-bottom: 7rem; /* на десктопе плашка 18+ упиралась в колесо вплотную */
}

.wheel::before,
.wheel__lamps,
.wheel__bg,
.wheel__border,
.wheel__arrow {
	display: none;
}

.wheel__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--frame);
	height: var(--frame);
}

/* вращается только диск с секторами */
.wheel__spinner {
	position: relative;
	z-index: 1;
	width: var(--wheel);
	height: var(--wheel);
	overflow: visible;
	border: none;
	border-radius: 50%;
	background: none;
	box-shadow: none;
}

.wheel__disc {
	display: block;
	width: 100%;
	height: 100%;
}

/* рамка стоит на месте: отдельный слой поверх диска.
   Стрелка-указатель входит в саму картинку рамки. */
.wheel__frame {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.wheel__spinner .wheel__text {
	display: none;
}

.wheel__btn {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 7;
	/* вырез ступицы в диске = 0.3607 его диаметра, кнопка перекрывает с запасом */
	width: calc(var(--wheel) * 0.379);
	height: calc(var(--wheel) * 0.379);
	transform: translate(-50%, -50%);
	border: 0.6rem solid #ffc849;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 25%, #ff6a70 0, #e90812 43%, #980008 100%);
	box-shadow: 0 0 0 0.35rem #8c4300, 0 0.9rem 1.8rem rgba(0, 0, 0, 0.45);
	animation: none;
}

.wheel__btn::before {
	display: none;
}

.wheel__btn span {
	position: relative;
	top: 0; /* main.css сдвигал надпись вниз на .3rem */
	display: block;
	color: #fff;
	font-size: max(12px, calc(var(--wheel) * 0.09)); /* верхняя граница, fitSpinLabel() ужимает под длину слова */
	font-style: italic;
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.01em;
	white-space: nowrap;
	text-transform: uppercase;
	text-shadow: 0 0.12rem 0 rgba(60, 0, 0, 0.75);
}

/* .stroke навешивал фиолетовую обводку и свечение старой темы */
.wheel__btn span::before,
.wheel__btn span::after {
	display: none !important;
	content: none !important;
}

/* переключатель языков — теперь это ссылки */
.lang_list_item a {
	display: block;
	color: inherit;
	text-decoration: none;
}
.lang_list_item.curr a {
	font-weight: 700;
}

/* ============================================================
   ВОЗРАСТНОЙ ФИЛЬТР 18+
   ============================================================ */

.agegate {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgba(24, 3, 3, 0.92);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.agegate[hidden] {
	display: none;
}

.agegate__box {
	width: 100%;
	max-width: 52rem;
	padding: 5.5rem 3.5rem 3.5rem;
	text-align: center;
	border: 0.3rem solid #ffc849;
	border-radius: 2.4rem;
	background: linear-gradient(180deg, #7d0f10 0%, #4a0708 62%, #2c0304 100%);
	box-shadow: 0 0 0 0.5rem rgba(140, 28, 16, 0.9), 0 2rem 6rem rgba(0, 0, 0, 0.65);
}

.agegate__badge {
	position: absolute;
	margin: -8.5rem auto 0;
	left: 0;
	right: 0;
	width: 8rem;
	height: 8rem;
	line-height: 7.2rem;
	font-size: 2.8rem;
	font-weight: 900;
	color: #4a0708;
	border: 0.4rem solid #8c4300;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 28%, #fff0b8 0, #ffc849 45%, #e39400 100%);
	box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 0, 0.45);
}

.agegate__title {
	margin: 0 0 1.4rem;
	color: #fff;
	font-size: 3rem;
	font-weight: 800;
	line-height: 1.2;
}

.agegate__text {
	margin: 0 0 2.8rem;
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.8rem;
	line-height: 1.5;
}

.agegate__actions {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.agegate__btn {
	min-height: 48px; /* рекомендованный минимум для пальца */
	padding: 1.4rem 2rem;
	font-size: max(15px, 1.9rem);
	font-weight: 800;
	border: none;
	border-radius: 1.2rem;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.1s ease;
}

.agegate__btn:active {
	transform: translateY(0.2rem);
}

.agegate__btn--yes {
	color: #4a0708;
	background: linear-gradient(180deg, #ffd35a 0%, #f0a30d 52%, #d97b00 100%);
	box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.4);
}

.agegate__btn--yes:hover {
	filter: brightness(1.08);
}

.agegate__btn--no {
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.1);
	border: 0.15rem solid rgba(255, 255, 255, 0.35);
}

.agegate__denied {
	margin: 2.2rem 0 0;
	color: #ffb3b3;
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 1.45;
}

.agegate__denied[hidden] {
	display: none;
}

/* пока возраст не подтверждён — контент не листается */
html.agegate-open,
html.agegate-open body {
	overflow: hidden;
}

/* ============================================================
   БЛОК ОТВЕТСТВЕННОЙ ИГРЫ (постоянный, в подвале)
   ============================================================ */

.rg {
	position: relative;
	z-index: 3;
	display: flex;
	gap: 1.4rem;
	align-items: flex-start;
	max-width: 96rem;
	margin: 0 auto 1.4rem;
	padding: 1.4rem 1.8rem;
	border: 0.1rem solid rgba(255, 200, 73, 0.45);
	border-radius: 1rem;
	background: rgba(20, 2, 2, 0.42);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.rg__badge {
	flex: 0 0 auto;
	width: 4.2rem;
	height: 4.2rem;
	line-height: 3.8rem;
	text-align: center;
	font-size: 1.6rem;
	font-weight: 900;
	color: #4a0708;
	border: 0.2rem solid #8c4300;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 28%, #fff0b8 0, #ffc849 45%, #e39400 100%);
}

.rg__text {
	margin: 0;
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.4rem;
	font-size: clamp(11px, 1.4rem, 1.4rem);
	line-height: 1.5;
	text-align: left;
}

.rg__text a {
	color: #ffce44;
	text-decoration: underline;
}

@media (max-width: 700px) {
	.wheel {
		margin-bottom: 3rem;
	}
	.rg {
		align-items: center;
	}
	.rg__text {
		text-align: left;
	}
}

/* ============================================================
   ПОПАП — красно-золотая тема вместо фиолетовой
   ============================================================ */

.popup {
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 2rem;
	background: rgba(30, 4, 3, 0.78);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

/* убираем весь декор прошлой темы */
.popup__window::before,
.popup__window::after,
.popup__inner::before,
.popup__inner::after {
	display: none !important;
	content: none !important;
}

.popup__window {
	width: 100%;
	max-width: 56rem;
	margin: 0 auto;
	overflow: visible;
}

.popup__inner {
	display: block;
	overflow: hidden;
	border: 0.3rem solid #ffc849;
	border-radius: 2.4rem;
	background: linear-gradient(180deg, #7d0f10 0%, #4a0708 62%, #2c0304 100%);
	box-shadow: 0 0 0 0.5rem rgba(140, 28, 16, 0.9), 0 2rem 6rem rgba(0, 0, 0, 0.6);
}

.popup__close {
	position: absolute;
	top: 1.2rem;
	right: 1.2rem;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	border: 0.15rem solid rgba(255, 255, 255, 0.55);
	border-radius: 50%;
	background: rgba(20, 2, 2, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.popup__close:hover {
	background: rgba(20, 2, 2, 0.8);
}

.popup__hero {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.popup__hero img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Картинка ровно 16:9, как и рамка попапа, поэтому кадрируется
	   она минимально. Сдвиньте, если понадобится, например "60% top". */
	object-position: center top;
}

.popup__hero::after {
	content: '';
	position: absolute;
	inset: auto 0 0 0;
	height: 40%;
	background: linear-gradient(180deg, rgba(125, 15, 16, 0) 0%, #7d0f10 100%);
	pointer-events: none;
}

.popup__content {
	display: block;
	padding: 0.5rem 3rem 3.2rem;
	text-align: center;
}

.popup__title {
	max-width: none;
	margin-bottom: 1.2rem;
	color: #fff;
	font-size: 3rem;
	font-weight: 800;
	line-height: 1.2;
	text-transform: none;
}

.popup__sum {
	max-width: none;
	margin-bottom: 2.6rem;
	color: #ffce44;
	font-size: 3.6rem;
	font-weight: 900;
	line-height: 1.15;
	text-transform: none;
	text-shadow: 0 0.2rem 0 rgba(0, 0, 0, 0.35);
}

.popup__btn {
	position: relative;
	display: block;
	width: 100%;
	min-height: 48px;
	min-width: 0; /* гасим min-width:41.8rem из .btn — на узких экранах вылезало */
	margin: 0;
	padding: 1.8rem 2rem;
	overflow: hidden;
	color: #fff;
	font-size: 2.2rem;
	font-weight: 900;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	text-shadow: 0 0.2rem 0 rgba(90, 0, 0, 0.55);
	border: 0.3rem solid #ffc849;
	border-radius: 4.6rem;
	background: linear-gradient(180deg, #ff5a4a 0%, #e8241a 48%, #a80c06 100%);
	box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.45), inset 0 0.2rem 0 rgba(255, 255, 255, 0.28);
	/* розовый ореол из старой темы заменён на золотой */
	animation: btn-anim 1.2s ease-in-out 1s, lf-btn-glow 2s ease-in-out infinite;
}

/* .btn::before — розовая заливка старой темы, всплывала при hover
   и «залипала» после тапа на мобильных */
.popup__btn::before {
	display: none !important;
	content: none !important;
}

.popup__btn span {
	position: relative;
	color: #fff;
	font-size: 2.2rem;
	font-weight: 900;
	text-transform: uppercase;
	z-index: 1;
}

@keyframes lf-btn-glow {
	0%,
	100% {
		filter: none;
	}
	50% {
		filter: drop-shadow(0 0 1.4rem rgba(255, 200, 73, 0.75));
	}
}

.popup__btn:hover {
	filter: brightness(1.08);
}

.popup__terms-line {
	margin: 1.8rem 0 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: clamp(12px, 1.4rem, 1.5rem);
	line-height: 1.5;
}

@media (max-width: 700px) {
	.popup__title {
		font-size: 2.6rem;
	}
	.popup__sum {
		font-size: 3rem;
	}
	.popup__content {
		padding: 0.5rem 2rem 2.6rem;
	}
}

/* ============================================================
   Ссылки на правовые страницы в подвале
   ============================================================ */

.footer__links {
	position: relative;
	z-index: 3;
	margin: 0.8rem 0 0;
	text-align: center;
	font-size: clamp(12px, 1.4rem, 1.5rem);
	line-height: 1.6;
}

.footer__links a {
	color: rgba(255, 255, 255, 0.88);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.footer__links a:hover {
	color: #ffce44;
}

.footer__sep {
	margin: 0 0.9rem;
	color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   ОДИН ЭКРАН БЕЗ ПРОКРУТКИ
   Макет — колонка во всю высоту: шапка, заголовок, колесо
   (занимает всё свободное место), подвал. Колесо считается
   и от ширины, и от остатка высоты, поэтому влезает всегда.
   ============================================================ */

html,
body {
	height: 100%;
	overflow: hidden;
}

body {
	overscroll-behavior: none;
}

.blur_wrap,
.wrapper {
	/* --appvh пишет js/viewport.js: на мобильных 100vh врёт
	   из-за адресной строки, dvh — запасной вариант */
	height: var(--appvh, 100dvh);
	min-height: 0;
	overflow: hidden;
}

.layout,
.main-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.header {
	flex: 0 0 auto;
	padding: 1.6rem 0 0;
}

.header .logo {
	/* main.css задаёт .logo{width:32rem}; после ограничения по высоте
	   картинка становится уже обёртки и прижимается к её левому краю —
	   поэтому обёртка сама центрирует содержимое и не шире картинки */
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 32rem;
}

.header .logo img {
	display: block;
	width: auto;
	max-width: 100%;
	margin: 0 auto;
	max-height: min(9rem, 11vh);
}

.title {
	flex: 0 0 auto;
	/* main.css задаёт min-height:14rem — из-за него блок не влезал
	   в свою зону и центрирование выталкивало его под логотип */
	min-height: 0;
	margin: 0;
	padding: 0.8rem 0 0;
}

.main .game-outer {
	min-height: 0;
}

.title__line span {
	font-size: clamp(18px, 4.4vh, 4.2rem);
	line-height: 1.15;
}

/* колесо забирает весь остаток по вертикали */
.main {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0;
}

.main .container,
.main .game-outer {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.main .game-outer {
	flex-direction: column;
}

.wheel {
	/* три ограничителя: базовый размер, ширина экрана и остаток высоты */
	/* --chrome пишет js/viewport.js по фактическим высотам шапки,
	   заголовка и подвала; значения ниже — запасной вариант */
	--free-h: calc(var(--appvh, 100dvh) - var(--chrome, 30rem));
	--frame: min(82rem, 92vw, var(--free-h));
	--wheel: calc(var(--frame) * 0.658);
	flex: 0 0 auto;
	/* компенсация разницы высот шапки и подвала — см. viewport.js */
	margin: 0 0 var(--balance, 0px);
}

.footer {
	flex: 0 0 auto;
	padding: 0 0 1.2rem;
}

.rg {
	margin: 0 auto 0.6rem;
	padding: 0.9rem 1.4rem;
}

.rg__text {
	font-size: clamp(11px, 1.35vh, 1.4rem);
}

.footer__text,
.footer__links {
	margin: 0.4rem 0 0;
	font-size: clamp(11px, 1.35vh, 1.4rem);
}

.footer__links {
	margin-top: 0.3rem;
}

@media (max-width: 700px) {
	.header {
		padding-top: 1rem;
	}
	.header .logo img {
		max-height: min(7rem, 9vh);
	}
	.rg {
		gap: 1rem;
		padding: 0.7rem 1.1rem;
	}
	.rg__badge {
		width: 3.4rem;
		height: 3.4rem;
		line-height: 3rem;
		font-size: 1.3rem;
	}
}

/* совсем низкие экраны: прячем длинный текст, оставляем значок и ссылки */
@media (max-height: 620px) {
	.rg__text {
		display: none;
	}
	.rg {
		display: inline-flex;
		padding: 0.4rem 0.9rem;
	}
	.title {
		padding-top: 0.3rem;
	}
}

/* низкие экраны (телефон в ландшафте): ужимаем всё, кроме колеса */
@media (max-height: 520px) {
	.wheel {
		--frame: min(82rem, 62vw, var(--free-h));
	}
	.header {
		padding-top: 0.4rem;
	}
	.header .logo img {
		max-height: 5.5rem;
	}
	.title {
		display: none;
	}
	.rg {
		display: inline-flex;
		margin-bottom: 0.3rem;
		padding: 0.3rem 0.8rem;
	}
	.rg__text {
		display: none;
	}
	.footer {
		padding-bottom: 0.6rem;
	}
	.footer__text {
		display: none;
	}
	.footer__links {
		margin-top: 0.2rem;
	}
}

/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ
   Красный из логотипа (замер по img/logo.webp: градиент
   #F20140 сверху к #BD010E снизу) вместо розового #ff2885,
   оставшегося от прежней темы.
   ============================================================ */

.lang_switcher_outer .lang_switcher,
.lang_list {
	background: linear-gradient(180deg, #f20140 0%, #d70126 52%, #bd010e 100%);
}

.lang_switcher_outer .lang_switcher {
	border: 0.15rem solid rgba(255, 200, 73, 0.75);
	box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.35);
}

.lang_list {
	border: 0.15rem solid rgba(255, 200, 73, 0.75);
	border-top: none;
	overflow: hidden;
}

.lang_switcher_outer.act .lang_switcher {
	border-bottom: none;
}

/* было background:#fff — белый текст на белом фоне, пункт пропадал */
.lang_list li:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* main.css красит текст при наведении в розовый #ff2885 */
.lang_list li:hover span,
.lang_list li:hover a span {
	color: #fff;
}

.lang_list li.curr {
	background: rgba(0, 0, 0, 0.22);
}

.lang_list li span,
.curr_lang span {
	color: #fff;
	text-shadow: 0 0.1rem 0.2rem rgba(90, 0, 0, 0.5);
}

.lang_list li {
	display: flex;
	align-items: center;
	min-height: 44px; /* было 26px — мало для пальца */
	height: auto;
	padding: 0;
}

.lang_list li a {
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 0 0 0 1rem;
}

.lang_list li span {
	padding: 0;
}

.lang_switcher_outer .lang_switcher {
	min-height: 40px;
}
