:root {
	--bg: #0e0e10;
	--bg-dark: #0a0a0c;
	--card: #18181b;
	--card-hover: #1f1f23;
	--card-border: #27272a;
	--text: #e4e4e7;
	--muted: #71717a;
	--primary: #ef4444;
	--primary-hover: #dc2626;
	--primary-glow: rgba(239, 68, 68, 0.35);
	--danger: #ef4444;
	--border: #27272a;
	--input: #18181b;
	--input-focus: #1f1f23;
	--sidebar-bg: #111113;
	--sidebar-width: 240px;
	--sidebar-active: rgba(239, 68, 68, 0.12);
	--sidebar-hover: rgba(255, 255, 255, 0.04);
	--accent-blue: #3b82f6;
	--accent-green: #22c55e;
	--accent-yellow: #eab308;
}

* { box-sizing: border-box; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(239,68,68,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(239,68,68,0.5); }

html, body { height: 100%; }
body {
	margin: 0;
	font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
	background: var(--bg-dark);
	color: var(--text);
	overflow-x: hidden;
}

/* ··· Layout ··· */
.app-layout {
	display: flex;
	min-height: 100vh;
}

/* ··· Sidebar ··· */
.sidebar {
	width: var(--sidebar-width);
	background: var(--sidebar-bg);
	border-right: 1px solid var(--card-border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	z-index: 50;
}

.sidebar-header {
	padding: 20px 18px 16px;
	border-bottom: 1px solid var(--card-border);
}

.sidebar-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
}

.sidebar-logo-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 800;
	color: #fff;
	box-shadow: 0 0 16px var(--primary-glow);
}

.sidebar-nav {
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nav-section-label {
	padding: 14px 12px 6px;
	font-size: 10px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.12s ease;
	text-align: left;
	width: 100%;
}

.nav-item:hover {
	background: var(--sidebar-hover);
	color: var(--text);
}

.nav-item.active {
	background: var(--sidebar-active);
	color: var(--primary);
	font-weight: 600;
}

.nav-item .nav-icon {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 16px;
}

.nav-icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nav-item.active .nav-icon svg {
	stroke: var(--primary);
}

.nav-item .nav-badge {
	margin-left: auto;
	font-size: 11px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(239,68,68,0.15);
	color: var(--primary);
	font-weight: 600;
}

.nav-item.hidden { display: none; }

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(239,68,68,0.2); border-radius: 4px; }

.sidebar-footer {
	margin-top: auto;
	padding: 12px 10px;
	border-top: 1px solid var(--card-border);
}

.sidebar-footer .lang-switcher-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 12px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: 13px;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-footer .lang-switcher-btn:hover {
	background: var(--sidebar-hover);
	color: var(--text);
}
.sidebar-footer .lang-switcher-btn svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ··· Main Content ··· */
.main-content {
	flex: 1;
	min-width: 0;
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ··· Top Bar ··· */
.top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.top-bar-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
}

/* ··· Main Panel ··· */
.panel {
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 20px;
}

.toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.toolbar h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

/* keep login screen container */

/* ··· Login page ··· */
.login-container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: radial-gradient(1000px 600px at 50% 40%, rgba(239,68,68,0.08), transparent);
}

.login-card {
	width: 100%;
	max-width: 400px;
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.login-card .title {
	margin: 0 0 4px 0;
	font-size: 24px;
	letter-spacing: 0.3px;
}

.login-card .subtitle {
	margin: 0 0 20px 0;
	color: var(--muted);
	font-size: 14px;
}

.title {
	margin: 0 0 8px 0;
	font-size: 28px;
	letter-spacing: 0.3px;
}

.subtitle {
	margin: 0 0 18px 0;
	color: var(--muted);
	font-size: 14px;
}

.form { display: grid; gap: 12px; }
.label { font-size: 13px; color: var(--muted); font-weight: 500; }

.input {
	width: 100%;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--bg-dark);
	border: 1px solid var(--card-border);
	color: var(--text);
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	font-size: 14px;
}
.input:focus {
	border-color: var(--primary);
	background: var(--input-focus);
	box-shadow: 0 0 0 3px var(--primary-glow);
}
.input::placeholder { color: var(--muted); }

select.input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--card-border);
	background: var(--card);
	color: var(--text);
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
	background: var(--card-hover);
	border-color: #3f3f46;
}
.button:active { transform: translateY(1px); }
.button:disabled,
.button.is-busy {
	opacity: 0.45;
	cursor: not-allowed !important;
	pointer-events: none;
}
.button.primary {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}
.button.primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}
.button.danger {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.35);
	color: var(--primary);
}
.button.danger:hover {
	background: rgba(239, 68, 68, 0.25);
}

.toast-container {
	position: fixed;
	left: 50%;
	bottom: 32px;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	pointer-events: none;
	z-index: 1000;
}

.toast {
	min-width: 280px;
	max-width: 420px;
	width: min(420px, calc(100vw - 28px));
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	padding: 14px 18px;
	box-shadow: 0 12px 28px rgba(0,0,0,0.45);
	color: var(--text);
	font-size: 14px;
	display: grid;
	gap: 10px;
	position: relative;
	overflow: hidden;
	pointer-events: auto;
	opacity: 0;
	transform: translateY(14px) scale(0.97);
	animation: toastIn .32s cubic-bezier(.2,.8,.2,1) forwards;
}

.toast::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(130deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01) 50%, rgba(255,255,255,0.04));
	pointer-events: none;
}

.toast .toast-message {
	position: relative;
	z-index: 1;
	padding-left: 24px;
	line-height: 1.35;
}

.toast .toast-message::before {
	content: 'i';
	position: absolute;
	left: 0;
	top: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: rgba(255,255,255,0.95);
	background: rgba(255,255,255,0.18);
	border: 1px solid rgba(255,255,255,0.25);
}

.toast.is-leaving {
	animation: toastOut .24s ease forwards;
}

@keyframes toastIn {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes toastOut {
	from {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
}

.toast.success {
	border-color: rgba(239, 68, 68, 0.4);
	background: rgba(239, 68, 68, 0.08);
}

.toast.error {
	border-color: rgba(239, 68, 68, 0.5);
	background: rgba(239, 68, 68, 0.1);
}

.toast.success .toast-message::before {
	content: '✓';
	background: rgba(239, 68, 68, 0.3);
	border-color: rgba(239, 68, 68, 0.5);
}

.toast.error .toast-message::before {
	content: '!';
	background: rgba(239, 68, 68, 0.3);
	border-color: rgba(239, 68, 68, 0.5);
}

.toast-progress {
	width: 100%;
	height: 4px;
	border-radius: 999px;
	background: rgba(255,255,255,0.15);
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.toast-progress > div {
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, rgba(255,255,255,0.82), rgba(255,255,255,0.5));
	transition: width linear 10s;
}

.actions { display: flex; gap: 10px; margin-top: 12px; }

.error {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(239,68,68,0.1);
	border: 1px solid rgba(239,68,68,0.3);
	color: #fca5a5;
	font-size: 13px;
}

.footer {
	margin-top: 18px;
	color: var(--muted);
	font-size: 12px;
}

.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1000;
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 8px;
	margin-top: 4px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.4);
	max-height: 300px;
	overflow-y: auto;
}

.dropdown-item {
	padding: 10px 16px;
	cursor: pointer;
	transition: background 0.15s;
}

.dropdown-item:hover {
	background: var(--card-hover);
}

/* ··· Admin Layout ··· */
.admin {
	width: 100%;
}

.admin .header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

/* ··· System Info Panel ··· */
.system-info-panel {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	padding: 16px;
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 12px;
}

.system-info-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--bg-dark);
	border: 1px solid var(--card-border);
}

.system-info-icon {
	font-size: 18px;
	line-height: 1;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(239, 68, 68, 0.1);
	border-radius: 6px;
	flex-shrink: 0;
}

.system-info-content {
	flex: 1;
	min-width: 0;
}

.system-info-label {
	font-size: 12px;
	color: var(--muted);
	margin-bottom: 4px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.system-info-value {
	font-size: 14px;
	color: var(--text);
	font-weight: 600;
}

.system-info-progress {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 3px;
	margin-top: 6px;
	overflow: hidden;
	position: relative;
}

.system-info-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--primary), #6b8fff);
	border-radius: 3px;
	transition: width 0.3s ease;
	position: relative;
}

.system-info-progress-bar::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.system-info-network {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
}

.system-info-network span:first-child,
.system-info-network span:nth-child(3) {
	color: var(--muted);
	margin-right: 6px;
}

.panel .toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
#toolbar-right-block {
	position: relative;
	z-index: 5;
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.2s ease;
	transform-origin: top right;
}
#toolbar-right-block * {
	pointer-events: auto;
}
#toolbar-right-block.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}
#toolbar-right-block.is-hidden {
	opacity: 0;
	transform: translateY(-4px) scale(0.985);
	pointer-events: none;
}
.nav-item,
.button,
.icon-btn,
.lang-switcher,
.lang-switcher-btn {
	position: relative;
	z-index: 1;
}
.list { display: grid; gap: 8px; }
.list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--bg-dark);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.list-item:hover {
	border-color: #3f3f46;
	background: #111113;
}
.item-title { font-weight: 600; font-size: 14px; }
.item-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.item-actions { display: flex; gap: 6px; }

.icon-btn {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--card-border);
	background: var(--bg-dark);
	color: var(--text);
	cursor: pointer;
	font-size: 14px;
	transition: background 0.12s ease, border-color 0.12s ease;
}
.icon-btn:hover { background: var(--card-hover); border-color: #3f3f46; }

.icon-btn.edit {
	background: rgba(239, 68, 68, 0.1);
	border-color: rgba(239, 68, 68, 0.3);
	color: var(--primary);
}
.icon-btn.edit:hover {
	background: rgba(239, 68, 68, 0.2);
}

.icon-btn.delete {
	background: rgba(239, 68, 68, 0.1);
	border-color: rgba(239, 68, 68, 0.25);
	color: var(--primary);
}
.icon-btn.delete:hover {
	background: rgba(239, 68, 68, 0.2);
}

.icon-btn.info {
	background: rgba(59, 130, 246, 0.1);
	border-color: rgba(59, 130, 246, 0.3);
	color: var(--accent-blue);
}
.icon-btn.info:hover {
	background: rgba(59, 130, 246, 0.2);
}

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; backdrop-filter: blur(4px); }
.modal { width: 100%; max-width: 560px; background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.modal-title { margin: 0 0 12px 0; }
.modal-backdrop#modal .modal {
	max-width: 1120px;
	width: min(96vw, 1120px);
	max-height: 92vh;
	overflow: auto;
}
.grid { display: grid; gap: 10px; }
.row { display: grid; gap: 8px; }
.inline { display: flex; gap: 10px; align-items: center; }
.input-wrap { display: grid; gap: 8px; }
.right { margin-left: auto; }
.muted { color: var(--muted); }
.checkbox { display: inline-flex; gap: 8px; align-items: center; }
.checkbox input[disabled] + span {
	opacity: 0.55;
	cursor: not-allowed;
	position: relative;
}
.checkbox input[disabled] + span::after {
	content: ' ⛔';
	color: #f44336;
	margin-left: 6px;
	opacity: 0.9;
}

.file-row { display: flex; gap: 10px; align-items: center; }
.file-info { color: var(--muted); font-size: 13px; }
.publish-live-status {
	text-align: center;
	margin-top: 8px;
	color: #FFC107;
	font-weight: 800;
	font-size: 14px;
}
.progress { height: 10px; width: 100%; background: rgba(13, 20, 32, 0.7); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.progress > .bar { height: 100%; width: 0%; background: var(--primary); transition: width .1s linear; }

/* Language switcher */
.lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid var(--card-border);
	background: var(--card);
	color: var(--text);
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	transition: background 0.15s ease, transform 0.06s ease;
}
.lang-switcher:hover {
	background: var(--card-hover);
}
.lang-switcher:active {
	transform: translateY(1px);
}
.lang-switcher .flag {
	font-size: 16px;
	line-height: 1;
}

/* Launcher Users */
.launcher-users-list {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.launcher-user-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--bg-dark);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.launcher-user-card:hover {
	background: #111113;
	border-color: #3f3f46;
}

@keyframes launcherCardShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Beta tester highlight: bright blue -> medium blue */
.launcher-user-card.user-beta {
	background: linear-gradient(
		120deg,
		rgba(24, 149, 255, 0.34),
		rgba(58, 123, 255, 0.28),
		rgba(40, 98, 214, 0.3),
		rgba(24, 149, 255, 0.34)
	);
	background-size: 220% 220%;
	border-color: rgba(92, 170, 255, 0.55);
	animation: launcherCardShift 5s ease-in-out infinite;
}

/* Banned highlight: bright red -> medium dark red */
.launcher-user-card.user-banned {
	background: linear-gradient(
		120deg,
		rgba(255, 70, 70, 0.36),
		rgba(230, 72, 72, 0.32),
		rgba(186, 48, 48, 0.3),
		rgba(255, 70, 70, 0.36)
	);
	background-size: 220% 220%;
	border-color: rgba(255, 120, 120, 0.62);
	animation: launcherCardShift 4.5s ease-in-out infinite;
}

.launcher-user-avatar {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	border: 2px solid var(--border);
	flex-shrink: 0;
}

.launcher-user-avatar.online {
	border-color: rgba(76, 175, 80, 0.85); /* зелёный */
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.18), 0 2px 14px rgba(76, 175, 80, 0.18);
}

.launcher-user-avatar.offline {
	border-color: rgba(244, 67, 54, 0.85); /* красный */
	box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.18), 0 2px 14px rgba(244, 67, 54, 0.18);
}

.launcher-user-info {
	flex: 1;
	min-width: 0;
}

.launcher-user-name {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 4px;
	color: var(--text);
}

.launcher-user-steam-id {
	color: var(--muted);
	font-size: 13px;
}

#launcher-users-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

#launcher-users-pagination .button {
	min-width: 36px;
	padding: 8px 12px;
}

#launcher-users-search-container {
	display: none;
}

.launcher-user-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.game-servers-list {
	scrollbar-width: thin;
}

.game-server-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--bg-dark);
	transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.game-server-card:hover {
	background: #111113;
	border-color: #3f3f46;
}

.game-server-card.hidden-server {
	opacity: 0.55;
	filter: grayscale(0.35);
}

.game-server-logo {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	border: 2px solid var(--border);
	object-fit: cover;
	flex-shrink: 0;
}

.game-server-logo-placeholder {
	background: linear-gradient(135deg, rgba(79,124,255,0.15), rgba(255,107,107,0.12));
}

.game-server-info {
	flex: 1;
	min-width: 0;
}

.game-server-name {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 4px;
	color: var(--text);
}

.game-server-meta {
	color: var(--muted);
	font-size: 13px;
}

.game-server-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.gs-version {
	font-size: 12px;
	font-weight: 700;
}

.gs-version-original {
	color: #4caf50;
}

.gs-version-devblog {
	color: #ffd700;
}

.gs-version-devblog287 {
	color: #00bcd4;
}

.game-server-actions .icon-btn.edit {
	background: rgba(79, 124, 255, 0.1);
	border-color: rgba(79, 124, 255, 0.3);
	color: var(--primary);
}

.game-server-actions .icon-btn.danger {
	background: rgba(244, 67, 54, 0.12);
	border-color: rgba(244, 67, 54, 0.35);
	color: #f44336;
}

.launcher-user-actions .icon-btn.info {
	background: rgba(79, 124, 255, 0.1);
	border-color: rgba(79, 124, 255, 0.3);
	color: var(--primary);
}

.launcher-user-actions .icon-btn.info:hover {
	background: rgba(79, 124, 255, 0.2);
}

.launcher-user-actions .icon-btn.edit {
	background: rgba(255, 193, 7, 0.1);
	border-color: rgba(255, 193, 7, 0.3);
	color: #FFC107;
}

.launcher-user-actions .icon-btn.edit:hover {
	background: rgba(255, 193, 7, 0.2);
}

.launcher-users-filters-panel {
	display: grid;
	grid-template-columns: repeat(5, minmax(120px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0 12px;
	border: 0 solid rgba(255,255,255,0.1);
	border-radius: 12px;
	background: rgba(22, 32, 50, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(-6px);
	pointer-events: none;
	transition: max-height 0.26s ease, opacity 0.22s ease, transform 0.22s ease, margin 0.2s ease, padding 0.2s ease;
}

.launcher-users-filters-panel.open {
	max-height: 220px;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	margin: 6px 0 12px 0;
	padding: 12px;
	border-width: 1px;
}

.launcher-users-filters-panel .checkbox {
	padding: 7px 9px;
	border-radius: 8px;
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.08);
}

.perm-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
	gap: 10px;
}

.perm-card {
	background: var(--bg-dark);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	padding: 10px 12px;
}

.perm-card-title {
	font-weight: 700;
	font-size: 13px;
	margin-bottom: 8px;
	color: var(--text);
}

/* ··· Owner badge ··· */
.owner-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: var(--primary);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.owner-badge svg {
	width: 12px;
	height: 12px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ··· Perm toggle (red switch style) ··· */
.perm-toggle {
	position: relative;
	width: 36px;
	height: 20px;
	border-radius: 10px;
	background: var(--card-border);
	cursor: pointer;
	transition: background 0.2s;
	flex-shrink: 0;
}
.perm-toggle.on {
	background: var(--primary);
}
.perm-toggle::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.perm-toggle.on::after {
	transform: translateX(16px);
}

.perm-card .checkbox {
	margin: 5px 0;
	align-items: flex-start;
}

.perm-card .checkbox span {
	display: block;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

/* ---------- Responsive layout ---------- */
@media (max-width: 1024px) {
	.app-layout {
		flex-direction: column;
	}
	.sidebar {
		width: 100%;
		height: auto;
		position: relative;
		border-right: none;
		border-bottom: 1px solid var(--card-border);
	}
	.sidebar-nav {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 4px;
		padding: 8px 12px;
	}
	.sidebar-nav .nav-section-label { display: none; }
	.sidebar-header { display: none; }
	.sidebar-nav form { display: none; }
	.main-content { padding: 16px; }
	.system-info-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.main-content { padding: 12px; }
	.top-bar { flex-direction: column; align-items: stretch; }
	.top-bar-title { font-size: 20px; }
	#top-bar-actions { width: 100%; }
	.system-info-panel { grid-template-columns: 1fr; }
	.system-info-item { min-width: 100%; }
	.perm-grid { grid-template-columns: 1fr; }
	.panel { padding: 14px; }
}

/* Touch-first improvements */
@media (hover: none) and (pointer: coarse) {
	.button,
	.icon-btn,
	.lang-switcher,
	.input,
	.checkbox {
		min-height: 42px;
	}

	.modal-backdrop {
		align-items: flex-start;
		padding-top: 10px;
	}
}

@media (max-width: 480px) {
	.main-content { padding: 10px; }
	.top-bar-title { font-size: 18px; }
	.sidebar-nav { gap: 2px; padding: 6px 8px; }
	.sidebar-nav .nav-item { font-size: 12px; padding: 7px 10px; }
	.system-info-panel { padding: 10px; }
	.system-info-item { min-width: 100%; }
	.modal { padding: 14px; border-radius: 10px; }
	.modal-title { font-size: 18px; }
	.panel { padding: 12px; }
}

/* Screenshots gallery */
.screenshots-grid-wrap {
	max-height: calc(100vh - 260px);
	overflow-y: auto;
	overflow-x: hidden;
	padding: 4px 2px 12px;
	scroll-behavior: smooth;
}

.screenshots-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.screenshot-card {
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.screenshot-card:hover {
	transform: translateY(-2px);
	border-color: rgba(239, 68, 68, 0.4);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.screenshot-card-image-wrap {
	aspect-ratio: 16 / 10;
	background: rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

.screenshot-card-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.screenshot-card-footer {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
}

.screenshot-card-avatar {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--border);
}

.screenshot-card-avatar.placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 45, 45, 0.12);
	color: var(--muted);
	font-size: 14px;
}

.screenshot-card-text {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.screenshot-card-name {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.screenshot-card-steam {
	font-size: 11px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.screenshot-card-time {
	font-size: 10px;
	color: var(--muted);
}

.screenshots-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.screenshot-lightbox {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.screenshot-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: blur(6px);
}

.screenshot-lightbox-panel {
	position: relative;
	z-index: 1;
	width: min(96vw, 1200px);
	max-height: 92vh;
	background: rgba(14, 14, 20, 0.95);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.screenshot-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.35);
	color: var(--text);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.screenshot-lightbox-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding-right: 44px;
}

.screenshot-lightbox-viewport {
	flex: 1;
	min-height: 200px;
	max-height: calc(92vh - 140px);
	overflow: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 10px;
}

.screenshot-lightbox-viewport img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.15s ease;
	transform-origin: center center;
}

.screenshot-lightbox-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}

.screenshot-lightbox-meta span {
	color: var(--muted);
	font-size: 12px;
}

@media (max-width: 900px) {
	.screenshots-grid {
		grid-template-columns: 1fr;
	}
}

.activity-section-wrap {
	margin-top: 12px;
}

.activity-category-tabs {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
}

.activity-search-group {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	flex-shrink: 0;
}

.activity-search-input {
	width: 210px;
	height: 36px;
	padding: 0 12px;
	font-size: 13px;
}

.activity-search-btn {
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
}

.activity-tab-disabled {
	opacity: 0.45;
	cursor: not-allowed !important;
}

.activity-panel-logs-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 200px;
}

.activity-logs-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: min(62vh, 640px);
	overflow-y: auto;
	padding: 4px 6px 4px 2px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 45, 45, 0.35) transparent;
}

.activity-logs-list::-webkit-scrollbar {
	width: 8px;
}

.activity-logs-list::-webkit-scrollbar-thumb {
	background: rgba(255, 45, 45, 0.35);
	border-radius: 8px;
}

.activity-log-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--bg-dark);
	border: 1px solid var(--card-border);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.activity-log-item:hover {
	border-color: #3f3f46;
	background: #111113;
}

.activity-log-main {
	min-width: 0;
	flex: 1;
}

.activity-log-action {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 4px;
}

.activity-log-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--muted);
}

.activity-log-actor {
	color: #ffb4b4;
	font-weight: 500;
}

.activity-log-dot {
	opacity: 0.5;
}

.activity-log-info-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid rgba(255, 45, 45, 0.35);
	background: rgba(255, 45, 45, 0.08);
	color: #ff8a8a;
	font-size: 14px;
	font-weight: 700;
	font-style: italic;
	font-family: Georgia, serif;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s ease, transform 0.15s ease;
}

.activity-log-info-btn:hover {
	background: rgba(255, 45, 45, 0.18);
	transform: scale(1.05);
}

.activity-log-info-spacer {
	width: 30px;
	flex-shrink: 0;
}

.activity-logs-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.activity-logs-loading,
.activity-logs-empty {
	padding: 28px 16px;
	text-align: center;
	color: var(--muted);
	font-size: 14px;
}

.activity-launcher-logs-placeholder {
	padding: 24px 12px;
}

.activity-coming-soon {
	text-align: center;
	padding: 48px 24px;
	border-radius: 14px;
	border: 1px dashed rgba(255, 255, 255, 0.12);
	background: rgba(12, 12, 18, 0.55);
}

.activity-coming-soon-icon {
	font-size: 36px;
	margin-bottom: 12px;
	opacity: 0.7;
}

.activity-coming-soon-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 8px;
}

.activity-coming-soon-text {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.activity-log-modal {
	max-width: 560px;
	width: 92vw;
}

.activity-log-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.activity-log-modal-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 60vh;
	overflow-y: auto;
}

.activity-log-detail-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-log-detail-row span {
	color: var(--muted);
}

.activity-log-detail-json {
	margin: 8px 0 0;
	padding: 12px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 12px;
	line-height: 1.5;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
	color: #d8d8e4;
}

.launcher-section-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.launcher-news-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.launcher-news-empty {
	text-align: center;
	padding: 48px 20px;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.5;
}

.launcher-news-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--bg-dark);
}

.launcher-news-thumb {
	width: 72px;
	height: 72px;
	border-radius: 8px;
	border: 2px solid var(--border);
	object-fit: cover;
	flex-shrink: 0;
}

.launcher-news-thumb-placeholder {
	background: linear-gradient(135deg, rgba(79,124,255,0.15), rgba(255,107,107,0.12));
}

.launcher-news-info {
	flex: 1;
	min-width: 0;
}

.launcher-news-title {
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 4px;
}

.launcher-news-meta {
	color: var(--muted);
	font-size: 13px;
}

.ln-type {
	font-size: 12px;
	font-weight: 700;
}

.ln-type-project {
	color: #4f7cff;
}

.ln-type-update {
	color: #ff9800;
}

.launcher-news-editor {
	min-height: 220px;
	background: #fff;
	color: #111;
	border-radius: 8px;
}

.launcher-news-editor .ql-toolbar {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.launcher-news-editor .ql-container {
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	min-height: 180px;
}

.launcher-news-preview-img {
	max-width: 220px;
	max-height: 140px;
	border-radius: 8px;
	border: 1px solid var(--border);
	object-fit: cover;
}

.activity-log-item-alert {
	border-color: rgba(244, 67, 54, 0.45);
	background: rgba(244, 67, 54, 0.08);
}

.activity-log-item-alert .activity-log-action {
	color: #ff6b6b;
}

.activity-log-item-warning {
	border-color: rgba(251, 191, 36, 0.45);
	background: rgba(251, 191, 36, 0.07);
}

.activity-log-item-warning .activity-log-action {
	color: #fbbf24;
}

