.unselectable {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */
}










.col-xs-8r,
.col-sm-8r,
.col-md-8r,
.col-lg-8r {
	position: relative;
	min-height: 1px;
	padding-right: 15px;
	padding-left: 15px;
}

.col-xs-8r {
	width: 12.5%;
	float: left;
}

@media (min-width: 768px) {
	.col-sm-8r {
		width: 12.5%;
		float: left;
	}
}

@media (min-width: 992px) {
	.col-md-8r {
		width: 12.5%;
		float: left;
	}
}

@media (min-width: 1200px) {
	.col-lg-8r {
		width: 12.5%;
		float: left;
	}
}
.padding-1 {
	padding: .25rem;
}










.class_card {
	background: #000;
	border: 2px solid #000;
	cursor: pointer;
	transform-style: preserve-3d;
	transition: transform 0.5s;
}
.class_card img {
	width: 100%;
}
.rotated .class_card {
	-webkit-transform: rotateY(180deg);

}
.class_card .side {
	-webkit-backface-visibility: hidden;
}
.class_card .front {

}
.class_card .front .bottom {
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 15%;
	background: #000;
	color: #fff;
	font-size: 1.2rem;
	line-height: 1rem;
}
.class_card .back {
	position: absolute;
	top: 0;
	left: 0;
	-webkit-transform: rotateY(180deg);
}
.class__card_active {
	position: relative;
	transition: all 0.5s;
}
.class__card_active.rotated .class__card-opacity {
	opacity: 0.1;
	transition: all 0.5s;
}
.class__card_active:hover {
	box-shadow: 0 0 5px 1px #ff0000;
}
.class__card_active:hover.rotated {
	box-shadow: none;
}
.class__card_main:hover {
	box-shadow: none;
}
.class__card_main .class_card {
	border: none;
}
.class__card_main.rotated {
	opacity: 1;
}
.back_hover {
	position: absolute;
	top: 0;
	left: 0;
	width: 75%;
	opacity: 0;
	transition: all 0.5s;
	cursor: pointer;
}
.back_hover img {
	width: 100%;
}
.class__card_active:not(.isHistoryTrue):not(.isHistoryFalse):hover.rotated .back_hover {
	transition-delay: 0.5s;
	opacity: 1;
}
.back_preview {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	cursor: pointer;
}
.back_preview > div {
	position: absolute;
	top: 0;
	left: 0;
	display: table;
	background: #fff;
	width: 75%;
	transition: all 0.5s;
}
.back_preview img {
	width: 100%;
	transition: all 0.5s;
}
.back_preview-img {
	background: #fff;
	opacity: 0;
	transition: all 0.5s;
	width: 100%;
	height: 100%;
}
.isHistoryTrue.rotated .back_preview-img {
	opacity: 1;
}
.isHistoryTrue.rotated .back_preview-img img {
	opacity: 0.5;
}
.isHistoryTrue.rotated:hover .back_preview > div {
	width: 100%;
}
.isHistoryTrue.rotated:hover .back_preview-img img {
	opacity: 1;
}
.back_preview-back {
	background: #fff;
	opacity: 0;
	transition: all 0.5s;
	width: 100%;
	height: 100%;
}
.isHistoryFalse:not(.rotated) .back_preview-back {
	opacity: 1;
}
.isHistoryFalse:not(.rotated) .back_preview-back img {
	opacity: 0.5;
}
.isHistoryFalse:not(.rotated):hover .back_preview > div {
	/* opacity: 0; */
	width: 0;
}
.isHistoryFalse:not(.rotated):hover .back_preview-back img {
	opacity: 1;
}
.history_status {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}
.history_status-yes, .history_status-no {
	position: absolute;
	top: 5px;
	left: 5px;
	width: 30px;
	height: 30px;
	font-size: 20px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: 0 0 5px 2px #fff;
	opacity: 0;
	transition: all 0.5s;
}
.history_status-yes {
	color: #28a745;
}
.history_status-no {
	color: #dc3545;
}
.isHistoryTrue:not(.rotated) .history_status-yes,
.isHistoryFalse.rotated .history_status-yes {
	opacity: 1;
}
.isHistoryTrue.rotated .history_status-no,
.isHistoryFalse:not(.rotated) .history_status-no {
	opacity: 1;
}

.history_status-action {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}
.history_status-action-1, .history_status-action-2 {
	position: absolute;
	top: 10px;
	right: 5px;
	width: 40px;
	height: 20px;
	line-height: 20px;
	font-size: 15px;
	font-weight: bold;
	background: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: 0 0 5px 2px #fff;
	opacity: 0;
	transition: all 0.5s;
}
.isHistoryTrue.rotated .history_status-action-2,
.isHistoryFalse:not(.rotated) .history_status-action-1 {
	opacity: 1;
}





#id__setting-now {
		position: relative;
}
#id__setting-now img {
	width: 100%;
	border-bottom: 2px solid #000;
}
.setting__now-count {
	position: absolute;
	top: 5px;
	right: 5px;
	background: #fff;
	border-radius: 50%;
	width: 35px;
	height: 35px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 18px;
	line-height: 35px;
	font-weight: bold;
	border: 2px solid #000000;
}
.class__setting-now {
	border: 2px solid #000;
}
.class__setting-refresh {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: #007bff;
	color: #fff;
	font-size: 20px;
	line-height: 20px;
	padding: 10px 0px 15px;
	cursor: pointer;
}
.class__setting-refresh:hover {
	background: #0069d9;
}

.class__setting-open {
	border: 2px solid #000;
}
.class__setting-open_btn {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: #007bff;
	color: #fff;
	font-size: 20px;
	line-height: 20px;
	padding: 10px 0px 15px;
	cursor: pointer;
}
.class__setting-open_btn:hover {
	background: #0069d9;
}
.class__setting-code {

}
.class__setting-code textarea {
	width: 100%;
	resize: none;
	background: #f8f8f8;
}

.class__setting-code_sync textarea {
	width: 100%;
	resize: none;
}
.class__setting-code_sync_btn {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: #007bff;
	color: #fff;
	font-size: 20px;
	line-height: 20px;
	padding: 10px 0px 15px;
	cursor: pointer;
}
.class__setting-code_sync_btn:hover {
	background: #0069d9;
}
.class_setting-info-title {
	font-size: 25px;
	line-height: 25px;
}
#id__setting-info-impossible {
	margin: 0;
}
.class__setting-info-rules {
	border: 2px solid #000;
}
.class__setting-info-rules .isOpenFalse {
	display: inline;
}
.class__setting-info-rules .isOpenTrue {
	display: none;
}
.class__setting-info-rules.isOpen .isOpenFalse {
	display: none;
}
.class__setting-info-rules.isOpen .isOpenTrue {
	display: inline;
}
.class__setting-info-rules_btn {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	background: #28a745;
	color: #fff;
	font-size: 20px;
	line-height: 20px;
	padding: 10px 0px 15px;
	cursor: pointer;
}
.class__setting-info-rules_btn:hover {
	background: #218838;
}
.class_setting-info-refresh {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #28a745;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
	position: relative;
}
.class_setting-info-refresh div {
	position: absolute;
	display: flex;
	justify-content: center;
	align-items: center;
	top: -2px;
	right: -2px;
	background: #fff;
	color: #000;
	border-radius: 50%;
	width: 15px;
	height: 15px;
	font-size: 10px;
	line-height: 15px;
	font-weight: bold;
}
.class_setting-info-refresh:hover {
	background: #218838;
}
.class__setting-global {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.class_setting-info-new {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #343a40;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
}
.class_setting-info-new:hover {
	background: #23272b;
}
.class_setting-info-hide {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #007bff;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
}
.class_setting-info-hide:hover {
	background: #0069d9;
}
.class_setting-info-hide .isModShow {
	display: none;
}
.class_setting-info-hide.isActive .isModHide {
	display: none;
}
.class_setting-info-hide.isActive .isModShow {
	display: inline;
}
.class_setting-info-menu_hide {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #17a2b8;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
}
.class_setting-info-menu_hide:hover {
	background: #138496;
}



.class_setting-info-back {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #6c757d;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
	position: relative;
}
.class_setting-info-back:hover {
	background: #5a6268;
}
.class_setting-info-back div {
	position: absolute;
	display: flex;
	justify-content: center;
	align-items: center;
	top: 0px;
	right: 0px;
	background: #fff;
	color: #000;
	width: 20px;
	height: 11px;
	font-size: 10px;
	line-height: 15px;
	font-weight: bold;
	padding-bottom: 1px;
}



.class_setting-info-back .isModShow {
	display: none;
}
.class_setting-info-back.isActive .isModHide {
	display: none;
}
.class_setting-info-back.isActive .isModShow {
	display: inline;
}



@keyframes animCardFadeOut {
	0% {
		padding: .25rem;
		width: 12.5%;
	}
	100% {
		padding: 0;
		padding-top: .25rem;
		width: 0;
	}
}
.rotatedCol {

}
.rotatedCol.isModHideCol:not(.isHistoryTrueCol):not(#id__setting-now) {
	animation-iteration-count: 1;
	animation: animCardFadeOut 0.5s forwards;
}








.class__setting-history {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 2px solid #000;
}
.class__setting-history-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 50px;
	height: 50px;
	background: #6c757d;
	color: #fff;
	font-size: 25px;
	cursor: pointer;
}
.class__setting-history-btn:hover {
	background: #218838;
}
.class__setting-history-step {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 75px;
	height: 50px;
	border-left: 2px solid #000;
	border-right: 2px solid #000;
	background: #000000;
	color: #fff;
	font-size: 30px;
	cursor: pointer;
	position: relative;
}
.class__setting-history-step:hover {
	background: #23272b;
}
.class__setting-history-step.isGreen {
	background: #28a745;
}
.class__setting-history-step.isGreen:hover {
	background: #218838;
}
.class__setting-history-step.isRed {
	background: #dc3545;
}
.class__setting-history-step.isRed:hover {
	background: #c82333;
}
#id__setting-history-now_max {
	position: absolute;
	top: 0;
	left: 0;
	background: #fff;
	color: #000;
	width: 20px;
	height: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 15px;
	line-height: 20px;
	font-weight: bold;
	border-bottom-right-radius: 50%;
	padding-right: 2px;
	padding-bottom: 2px;
}
#id__setting-history-now_delete {
	position: absolute;
	top: 0;
	right: 0;
	background: #fff;
	color: #000;
	width: 20px;
	height: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 15px;
	line-height: 20px;
	padding-bottom: 2px;
	cursor: pointer;
}
#id__setting-history-now_delete:hover {
	background: #dc3545;
	color: #fff;
}



@media (max-width: 991px) {
	.class_card .front .bottom {
		font-size: 0.6rem;
		line-height: 0.6rem;
	}
}
@media (max-width: 767px) {
	.class_card .front .bottom {
		font-size: 0.6rem;
		line-height: 0.6rem;
	}
}
@media (max-width: 575px) {
	.class_card .front .bottom {
		font-size: 0.3rem;
		line-height: 0.3rem;
	}
}











/* =================== Multiplayer screens =================== */
.gw-screen { display: none; }
.gw-screen.active { display: block; }

/* ---------- PRELOADER ---------- */
.gw-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: radial-gradient(ellipse at center, #1e1b4b 0%, #0f0c29 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: opacity .6s ease, visibility .6s ease;
}
.gw-preloader.gw-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gw-preloader-ring {
	display: inline-block;
	position: relative;
	width: 80px;
	height: 80px;
}
.gw-preloader-ring div {
	box-sizing: border-box;
	display: block;
	position: absolute;
	width: 64px;
	height: 64px;
	margin: 8px;
	border: 6px solid transparent;
	border-radius: 50%;
	animation: gw-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
	border-top-color: #a78bfa;
}
.gw-preloader-ring div:nth-child(1) { animation-delay: -0.45s; border-top-color: #f472b6; }
.gw-preloader-ring div:nth-child(2) { animation-delay: -0.30s; border-top-color: #60a5fa; }
.gw-preloader-ring div:nth-child(3) { animation-delay: -0.15s; border-top-color: #34d399; }
@keyframes gw-ring {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
.gw-preloader-text {
	margin-top: 1.5em;
	color: rgba(255, 255, 255, .8);
	font-size: .95em;
	letter-spacing: .15em;
	text-transform: uppercase;
	animation: gw-pulse 1.6s ease-in-out infinite;
}
@keyframes gw-pulse {
	0%, 100% { opacity: .55; }
	50%      { opacity: 1; }
}

/* ---------- ANIMATED BG (fixed, shared by login + lobby) ---------- */
.gw-bg-layer {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: #0f0c29;
	display: none;
}
body.gw-on-login .gw-bg-layer,
body.gw-on-lobby .gw-bg-layer { display: block; }

.gw-bg-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 1;
}
.gw-bg-gradient {
	position: absolute;
	inset: 0;
	z-index: 2;
	background: radial-gradient(circle at 20% 30%, rgba(124, 58, 237, .35), transparent 50%),
				radial-gradient(circle at 80% 70%, rgba(244, 114, 182, .25), transparent 50%),
				radial-gradient(circle at 50% 100%, rgba(56, 189, 248, .22), transparent 60%);
	animation: gw-bg-drift 18s ease-in-out infinite alternate;
	pointer-events: none;
}
@keyframes gw-bg-drift {
	0%   { transform: translate(0, 0) scale(1); }
	50%  { transform: translate(2%, -2%) scale(1.08); }
	100% { transform: translate(-2%, 2%) scale(1.04); }
}

/* ---------- LOGIN SCREEN ---------- */
#screen-login {
	position: relative;
	z-index: 1;
	min-height: 100vh;
}
#screen-lobby {
	position: relative;
	z-index: 1;
	min-height: 100vh;
}

.gw-auth-wrap {
	position: relative;
	z-index: 3;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2em 1em;
	gap: 1.6em;
}

/* ---- Hero / title ---- */
.gw-auth-hero {
	text-align: center;
	animation: gw-hero-in 1s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes gw-hero-in {
	from { opacity: 0; transform: translateY(-20px); }
	to   { opacity: 1; transform: translateY(0); }
}
.gw-brand {
	margin: 0;
	font-size: clamp(2.4em, 7vw, 4.4em);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
	display: flex;
	gap: .25em;
	justify-content: center;
	flex-wrap: wrap;
	filter: drop-shadow(0 6px 20px rgba(124, 58, 237, .35));
}
.gw-brand-word {
	display: inline-block;
	padding: 0.05em 0.08em 0.18em;
	background: linear-gradient(120deg, #fff 0%, #f0abfc 25%, #a78bfa 50%, #60a5fa 75%, #fff 100%);
	background-size: 300% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: gw-shimmer 6s linear infinite, gw-float 4s ease-in-out infinite;
}
.gw-brand-word--alt { animation-delay: -1.5s, -2s; }
@keyframes gw-shimmer {
	0%   { background-position: 0% center; }
	100% { background-position: 300% center; }
}
@keyframes gw-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-8px); }
}
.gw-tagline {
	color: rgba(255, 255, 255, .7);
	margin: .8em 0 0;
	font-size: .95em;
	letter-spacing: .02em;
	animation: gw-hero-in 1s .2s cubic-bezier(.22, 1, .36, 1) both;
}

/* ---- Card (glassmorphism) ---- */
.gw-auth-card {
	width: 100%;
	max-width: 460px;
	background: rgba(255, 255, 255, .08);
	backdrop-filter: blur(20px) saturate(140%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
	padding: 2em 1.8em;
	animation: gw-card-in 1s .15s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes gw-card-in {
	from { opacity: 0; transform: translateY(30px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Server status bar ---- */
.gw-server-status {
	display: flex;
	align-items: center;
	gap: .55em;
	padding: .5em .8em;
	margin: -0.4em -0.4em 1.2em;
	background: rgba(0, 0, 0, .25);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 10px;
	font-size: .82em;
	color: rgba(255, 255, 255, .75);
	letter-spacing: .02em;
}
.gw-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #6b7280;
	box-shadow: 0 0 0 0 rgba(107, 114, 128, .5);
	flex-shrink: 0;
	transition: background .25s, box-shadow .25s;
}
.gw-server-status[data-state="offline"] .gw-status-dot {
	background: #ef4444;
	box-shadow: 0 0 8px rgba(239, 68, 68, .6);
}
.gw-server-status[data-state="connecting"] .gw-status-dot {
	background: #f59e0b;
	animation: gw-dot-pulse 1.2s ease-in-out infinite;
}
.gw-server-status[data-state="online"] .gw-status-dot {
	background: #22c55e;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
	animation: gw-dot-online 2.4s ease-in-out infinite;
}
@keyframes gw-dot-pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50%      { transform: scale(1.4); opacity: .6; }
}
@keyframes gw-dot-online {
	0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
	50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}
.gw-status-text {
	font-weight: 500;
	color: rgba(255, 255, 255, .85);
}
.gw-server-status[data-state="offline"] .gw-status-text { color: #fca5a5; }
.gw-server-status[data-state="connecting"] .gw-status-text { color: #fcd34d; }
.gw-server-status[data-state="online"] .gw-status-text { color: #86efac; }
.gw-status-ping {
	margin-left: auto;
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-weight: 600;
	color: rgba(255, 255, 255, .9);
	font-variant-numeric: tabular-nums;
}

/* ---- Fields / inputs ---- */
.gw-field { margin-bottom: 1em; position: relative; display: block; }
.gw-field label {
	display: flex;
	align-items: center;
	color: rgba(255, 255, 255, .8);
	margin-bottom: .4em;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.gw-field input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: .85em 1.1em;
	background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
	border: 1.5px solid rgba(255, 255, 255, .22);
	border-radius: 12px;
	font-size: 1em;
	font-family: inherit;
	font-weight: 500;
	color: #fff;
	outline: none;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.18);
	-webkit-appearance: none;
	appearance: none;
	transition: all .25s cubic-bezier(.22, 1, .36, 1);
}
.gw-field input::placeholder { color: rgba(255, 255, 255, .45); }
.gw-field input:hover {
	background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.1));
	border-color: rgba(255, 255, 255, .35);
}
.gw-field input:focus {
	background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.12));
	border-color: rgba(167, 139, 250, .85);
	box-shadow: 0 0 0 4px rgba(167, 139, 250, .2), 0 0 24px rgba(167, 139, 250, .28), inset 0 1px 0 rgba(255,255,255,.1);
	transform: translateY(-1px);
}
.gw-field input:disabled {
	background: rgba(255, 255, 255, .04);
	border-color: rgba(255, 255, 255, .1);
	color: rgba(255, 255, 255, .55);
	cursor: not-allowed;
	box-shadow: none;
}
.gw-field input:disabled:hover { transform: none; }
/* number-input spinners — мягко на тёмной теме */
.gw-field input[type="number"] { -moz-appearance: textfield; }
.gw-field input[type="number"]::-webkit-outer-spin-button,
.gw-field input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.gw-hint { color: rgba(255, 255, 255, .4); font-weight: 400; font-size: .85em; text-transform: none; letter-spacing: 0; }
.gw-muted { color: rgba(255, 255, 255, .55); }
.gw-muted.small { font-size: .82em; }
.gw-err {
	color: #fca5a5;
	min-height: 1.2em;
	margin: .8em 0 0;
	font-size: .88em;
	text-align: center;
}

/* ---- Tabs (segmented) ---- */
.gw-tabs {
	position: relative;
	display: flex;
	gap: .2em;
	margin: 1.4em 0 1em;
	background: rgba(0, 0, 0, .25);
	border-radius: 10px;
	padding: .25em;
}
.gw-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: .6em 1em;
	cursor: pointer;
	color: rgba(255, 255, 255, .6);
	font-size: .92em;
	font-weight: 500;
	border-radius: 8px;
	position: relative;
	z-index: 1;
	transition: color .25s;
}
.gw-tab:hover { color: rgba(255, 255, 255, .9); }
.gw-tab.active { color: #fff; }
.gw-tab-indicator {
	position: absolute;
	top: .25em;
	bottom: .25em;
	left: .25em;
	width: calc(50% - .25em);
	background: linear-gradient(135deg, #7c3aed, #ec4899);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(124, 58, 237, .4);
	transition: transform .35s cubic-bezier(.22, 1, .36, 1);
	z-index: 0;
}
.gw-tabs[data-active="join"] .gw-tab-indicator { transform: translateX(100%); }
.gw-tab-body.hidden { display: none; }
.gw-tab-body { animation: gw-tab-in .35s ease both; }
@keyframes gw-tab-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---- Buttons ---- */
.gw-btn {
	position: relative;
	overflow: hidden;
	border: none;
	background: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .9);
	padding: .65em 1.2em;
	border-radius: 10px;
	cursor: pointer;
	font-size: .92em;
	font-weight: 500;
	transition: all .25s cubic-bezier(.22, 1, .36, 1);
}
.gw-btn:hover {
	background: rgba(255, 255, 255, .18);
	transform: translateY(-1px);
}
.gw-btn:active { transform: translateY(0) scale(.98); }
.gw-btn.primary {
	background: linear-gradient(135deg, #7c3aed, #ec4899);
	color: #fff;
	box-shadow: 0 4px 16px rgba(124, 58, 237, .35);
}
.gw-btn.primary::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
	transition: left .6s;
}
.gw-btn.primary:hover {
	background: linear-gradient(135deg, #8b5cf6, #f472b6);
	box-shadow: 0 8px 24px rgba(124, 58, 237, .5);
	transform: translateY(-2px);
}
.gw-btn.primary:hover::before { left: 100%; }
.gw-btn.primary:disabled {
	background: rgba(255, 255, 255, .1);
	color: rgba(255, 255, 255, .35);
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}
.gw-btn.primary:disabled::before { display: none; }
.gw-btn.ghost {
	background: rgba(255, 255, 255, .08);
	color: rgba(255, 255, 255, .8);
	border: 1px solid rgba(255, 255, 255, .15);
}
.gw-btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.gw-btn.big { width: 100%; padding: .85em 1em; font-size: 1em; letter-spacing: .02em; }
.gw-btn.small { padding: .35em .8em; font-size: .82em; }
.gw-btn > span { position: relative; z-index: 1; }

.gw-lobbies-box {
	margin-top: 1em;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 10px;
	overflow: hidden;
	background: rgba(0, 0, 0, .2);
}
.gw-lobbies-head {
	display: flex;
	justify-content: space-between;
	padding: .55em .8em;
	background: rgba(255, 255, 255, .05);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	font-size: .88em;
	font-weight: 600;
	color: rgba(255, 255, 255, .85);
}
.gw-lobbies-list { max-height: 200px; overflow-y: auto; }
.gw-lobby-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .6em;
	padding: .7em .9em;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
	color: rgba(255, 255, 255, .85);
	cursor: pointer;
	transition: background .2s, padding-left .2s, color .2s;
	outline: none;
}
.gw-lobby-row:hover,
.gw-lobby-row:focus {
	background: linear-gradient(90deg, rgba(124, 58, 237, .18), rgba(236, 72, 153, .08));
	color: #fff;
	padding-left: 1.2em;
}
.gw-lobby-row:hover .gw-lobby-row-arrow,
.gw-lobby-row:focus .gw-lobby-row-arrow {
	transform: translateX(4px);
	color: #f0abfc;
	opacity: 1;
}
.gw-lobby-row:last-child { border-bottom: none; }
.gw-lobby-row-info { flex: 1; min-width: 0; }
.gw-lobby-row-arrow {
	color: rgba(255, 255, 255, .35);
	font-size: 1.2em;
	opacity: .6;
	transition: transform .25s cubic-bezier(.22, 1, .36, 1), color .2s, opacity .2s;
}
.gw-lock { font-size: .9em; }
.gw-count-players, .gw-count-spec {
	display: inline-block;
	padding: .05em .45em;
	border-radius: 5px;
	font-size: .9em;
	font-weight: 600;
	margin-left: .2em;
	letter-spacing: .02em;
}
.gw-count-players {
	background: rgba(124, 58, 237, .25);
	color: #f0abfc;
	border: 1px solid rgba(167, 139, 250, .35);
}
.gw-count-spec {
	background: rgba(255, 255, 255, .08);
	color: rgba(255, 255, 255, .75);
	border: 1px solid rgba(255, 255, 255, .15);
}

/* ---- Lobby screen (dark glass) ---- */
.gw-lobby-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 2.5em 1.2em;
	animation: gw-hero-in .7s cubic-bezier(.22, 1, .36, 1) both;
}
.gw-lobby-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.8em;
	padding-bottom: 1.2em;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
	gap: 1em;
	flex-wrap: wrap;
}
.gw-lobby-headline { display: flex; align-items: baseline; gap: .8em; flex-wrap: wrap; }
.gw-lobby-code {
	margin: 0;
	font-size: clamp(1.8em, 4vw, 2.6em);
	font-weight: 800;
	letter-spacing: -0.01em;
	background: linear-gradient(120deg, #fff 0%, #f0abfc 25%, #a78bfa 50%, #60a5fa 75%, #fff 100%);
	background-size: 300% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: gw-shimmer 6s linear infinite;
}
.gw-lobby-meta { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }

.gw-lobby-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.2em;
}
@media (max-width: 768px) { .gw-lobby-grid { grid-template-columns: 1fr; } }

.gw-card {
	background: rgba(255, 255, 255, .08);
	backdrop-filter: blur(20px) saturate(140%);
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 18px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .1);
	padding: 1.5em 1.4em;
	animation: gw-card-in .8s .1s cubic-bezier(.22, 1, .36, 1) both;
}
.gw-card-title {
	margin: 0 0 1em;
	font-size: .95em;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
}

/* players list */
.gw-players { list-style: none; padding: 0; margin: 0; }
.gw-player {
	padding: .7em .9em;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 10px;
	margin-bottom: .5em;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: rgba(255, 255, 255, .9);
	transition: background .25s, border-color .25s, transform .25s;
}
.gw-player:hover {
	background: rgba(255, 255, 255, .08);
	border-color: rgba(255, 255, 255, .15);
}
.gw-player.muted {
	color: rgba(255, 255, 255, .4);
	font-style: italic;
	border-style: dashed;
	background: transparent;
}
.gw-name { font-weight: 500; }
.gw-host-badge {
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #78350f;
	padding: .15em .6em;
	border-radius: 6px;
	font-size: .72em;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	box-shadow: 0 2px 8px rgba(251, 191, 36, .3);
}

/* deck choice (custom radio cards) */
.gw-deck-choice { display: flex; gap: .7em; }
.gw-deck-option {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	height: 75px;
	padding: 0 1.2em;
	background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
	border: 1.5px solid rgba(255, 255, 255, .18);
	border-radius: 14px;
	cursor: pointer;
	margin: 0;
	color: rgba(255, 255, 255, .85);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: .01em;
	transition: all .25s cubic-bezier(.22, 1, .36, 1);
	position: relative;
	overflow: hidden;
}
.gw-deck-option > span {
	position: relative;
	z-index: 1;
}
.gw-deck-option:hover {
	background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
	border-color: rgba(255, 255, 255, .3);
	transform: translateY(-1px);
}
/* нативный radio скрываем, но оставляем доступным для клавиатуры */
.gw-deck-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}
.gw-deck-option:has(input:checked) {
	background: linear-gradient(135deg, rgba(124, 58, 237, .55), rgba(236, 72, 153, .45));
	border-color: rgba(244, 114, 182, .9);
	box-shadow: 0 0 0 3px rgba(167, 139, 250, .25), 0 8px 28px rgba(124, 58, 237, .45), inset 0 1px 0 rgba(255, 255, 255, .15);
	color: #fff;
	transform: translateY(-2px);
	text-shadow: 0 1px 8px rgba(124, 58, 237, .5);
}
/* лёгкий блик-«отметка» в углу для активной карточки */
.gw-deck-option:has(input:checked)::after {
	content: '';
	position: absolute;
	top: .55em;
	right: .55em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 12px rgba(255, 255, 255, .8), 0 0 0 3px rgba(255, 255, 255, .2);
	animation: gw-pulse 1.8s ease-in-out infinite;
}
.gw-deck-option:focus-within {
	outline: 2px solid rgba(167, 139, 250, .55);
	outline-offset: 2px;
}
.gw-deck-option:has(input:disabled) { opacity: .55; cursor: not-allowed; }

.gw-row { display: flex; gap: .5em; margin-top: .5em; }
.gw-row .gw-btn { flex: 1; }

/* ---- Game extras ---- */
.class_setting-info-exit {
	display: inline-flex;
	width: 50px;
	height: 50px;
	font-size: 25px;
	justify-content: center;
	align-items: center;
	background: #dc3545;
	color: #fff;
	border: 2px solid #000;
	cursor: pointer;
}
.class_setting-info-exit:hover {
	background: #c82333;
}
.gw-chat {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
}
.gw-chat-head {
	background: #f9fafb;
	color: #1f2937;
	padding: .4em .7em;
	font-weight: 600;
	font-size: .9em;
	border-bottom: 1px solid #e5e7eb;
}
.gw-chat-log {
	height: 180px;
	overflow-y: auto;
	padding: .5em .7em;
	font-size: .85em;
	background: #fff;
}
.gw-chat-line { padding: .15em 0; word-wrap: break-word; }
.gw-chat-time { color: #9ca3af; font-size: .8em; margin-right: .3em; }
.gw-chat-row {
	display: flex;
	border-top: 1px solid #e5e7eb;
}
.gw-chat-row input {
	flex: 1;
	border: none;
	padding: .5em .7em;
	outline: none;
	font-size: .9em;
}
.gw-chat-row button {
	border: none;
	background: #2563eb;
	color: #fff;
	padding: 0 1em;
	cursor: pointer;
	font-size: 1em;
}
.gw-chat-row button:hover { background: #1d4ed8; }

/* =================== Role badges (lobby) =================== */
.gw-player-right { display: flex; align-items: center; gap: .4em; }
.gw-role-badge {
	padding: .15em .55em;
	border-radius: 6px;
	font-size: .72em;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.gw-role-badge.gw-role-player {
	background: linear-gradient(135deg, #7c3aed, #ec4899);
	color: #fff;
	box-shadow: 0 2px 8px rgba(124, 58, 237, .35);
}
.gw-role-badge.gw-role-spectator {
	background: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .75);
	border: 1px solid rgba(255, 255, 255, .15);
}
.gw-player[data-role="spectator"] { opacity: .85; }
.gw-role-btn { margin-left: .3em; }

/* =================== Spectator mode (game) =================== */
.gw-fab, .gw-drawer-backdrop { display: none; }
body.gw-spectator-mode .gw-fab {
	display: flex;
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: linear-gradient(135deg, #7c3aed, #ec4899);
	color: #fff;
	font-size: 22px;
	box-shadow: 0 8px 24px rgba(124, 58, 237, .5);
	cursor: pointer;
	z-index: 200;
	align-items: center;
	justify-content: center;
	transition: transform .2s, box-shadow .2s;
}
body.gw-spectator-mode .gw-fab:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 12px 30px rgba(124, 58, 237, .6);
}
body.gw-spectator-mode.gw-drawer-open .gw-drawer-backdrop {
	display: block;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 150;
	animation: gw-tab-in .25s ease;
}

/* Правая панель: всегда скрыта для спектатора, превращается в drawer */
body.gw-spectator-mode .gw-right-panel {
	position: fixed;
	right: 0;
	top: 0;
	bottom: 0;
	width: min(440px, 92vw);
	max-width: 92vw;
	background: #fff;
	border-left: 1px solid rgba(0, 0, 0, .08);
	box-shadow: -10px 0 40px rgba(0, 0, 0, .25);
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.22, 1, .36, 1);
	z-index: 180;
	overflow-y: auto;
	padding: 1em !important;
	color: #1f2937;
}
body.gw-spectator-mode.gw-drawer-open .gw-right-panel {
	transform: translateX(0);
}

/* В drawer оставляем: class__setting-global, .class_setting-info, и только чат из .row */
body.gw-spectator-mode .gw-right-panel .row > .js-setting-menu_hide,
body.gw-spectator-mode .gw-right-panel .row > .col-12.pt-4 {
	display: none !important;
}

/* Контейнер с карточками — на весь экран, без скролла, с центрированием */
body.gw-spectator-mode #screen-game > .container-fluid {
	padding: 0 !important;
	margin: 0 !important;
	height: 100vh;
	width: 100vw;
	overflow: hidden;
}
body.gw-spectator-mode #screen-game > .container-fluid > .row {
	margin: 0 !important;
	padding: 0 !important;
	height: 100vh;
	width: 100vw;
	display: block;
}
body.gw-spectator-mode .gw-cards-col {
	padding: 0 !important;
	margin: 0 !important;
	height: 100vh;
	width: 100vw;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex: 0 0 auto !important;
	max-width: none !important;
}
/* Грид-раскладка карточек (cols/rows вычисляются в JS как CSS-переменные) */
body.gw-spectator-mode #id__cards-list {
	display: grid !important;
	grid-template-columns: repeat(var(--gw-cols, 8), 1fr);
	grid-template-rows: repeat(var(--gw-rows, 8), 1fr);
	gap: 4px;
	width: var(--gw-grid-w, 100vw);
	height: var(--gw-grid-h, 100vh);
	margin: 0 !important;
	padding: 4px;
	box-sizing: border-box;
}
body.gw-spectator-mode #id__cards-list > .col-xs-8r {
	width: 100% !important;
	height: 100% !important;
	min-width: 0;
	min-height: 0;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	display: block;
}
/* Карточка масштабируется до своей ячейки сохраняя пропорции картинки */
body.gw-spectator-mode #id__cards-list .class__card_active {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
body.gw-spectator-mode #id__cards-list .class_card,
body.gw-spectator-mode #id__cards-list .class__card-opacity {
	width: 100%;
	height: 100%;
}
body.gw-spectator-mode #id__cards-list .class_card .front img,
body.gw-spectator-mode #id__cards-list .class_card .back img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
/* В режиме спектатора карта не интерактивна */
body.gw-spectator-mode #id__cards-list .class__card_active {
	pointer-events: none;
	cursor: default;
}

/* ===================== Fullscreen toggle (top-right, always visible) ===================== */
.gw-fullscreen-btn {
	position: fixed;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(0, 0, 0, .35);
	color: rgba(255, 255, 255, .85);
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 9998;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background .2s, transform .2s, color .2s, border-color .2s;
	-webkit-tap-highlight-color: transparent;
}
.gw-fullscreen-btn:hover {
	background: rgba(0, 0, 0, .55);
	color: #fff;
	border-color: rgba(255, 255, 255, .45);
	transform: scale(1.06);
}
.gw-fullscreen-btn:active { transform: scale(.94); }
/* На игровом экране (светлый фон у игрока) — делаем кнопку видимой */
body.gw-on-game .gw-fullscreen-btn {
	background: rgba(255, 255, 255, .9);
	color: #1f2937;
	border-color: rgba(0, 0, 0, .15);
}
body.gw-on-game .gw-fullscreen-btn:hover {
	background: #fff;
	color: #000;
}
