@font-face {
	font-family: "Motiva Sans";
	src: url("MotivaSans-Light.ttf") format("truetype");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Motiva Sans";
	src: url("MotivaSans-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Motiva Sans";
	src: url("MotivaSans-Medium.ttf") format("truetype");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Motiva Sans";
	src: url("MotivaSans-Bold.ttf") format("truetype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Motiva Sans";
	src: url("MotivaSans-Bold.ttf") format("truetype");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--header-bg: #171d25;
	--page-bg: #1b2838;
	--card-bg: #181a21;
	--input-bg: #32353c;
	--text: #c6d4df;
	--text-muted: #afafaf;
	--text-strong: #ffffff;
	--accent: #1999ff;
	--font: "Motiva Sans", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	font-family: var(--font);
	font-weight: 400;
	color: var(--text);
	background-color: #171a21;
	background-image:
		linear-gradient(to top, rgba(23, 26, 33, 0.88) 0%, rgba(27, 40, 56, 0.55) 45%, rgba(42, 71, 94, 0.35) 100%),
		url("../img/bg.jpg");
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

a {
	color: inherit;
	text-decoration: none;
}

/* ===== Header (like #global_header) ===== */

.site-header {
	background: var(--header-bg);
	font-size: 14px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	width: min(1100px, 100%);
	min-height: 104px;
	margin: 0 auto;
	padding: 0 16px;
}

.site-header__logo img {
	display: block;
	height: 44px;
	width: auto;
}

/* ===== Login page ===== */

.page {
	width: min(760px, 100%);
	margin: 48px auto 80px;
	padding: 0 16px;
}

.login-step {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.login-title {
	margin: 8px 16px;
	color: var(--text-strong);
	font-size: 28px;
	font-weight: 800;
}

.login-card {
	background-color: var(--card-bg);
	border-radius: 4px;
	padding: 24px 32px;
}

.login-form {
	display: grid;
	gap: 12px;
	width: 100%;
	max-width: 636px;
	margin: 0 auto;
}

.field {
	display: grid;
	gap: 2px;
}

.field__label {
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	user-select: none;
}

.field__label--accent {
	color: var(--accent);
	font-weight: 500;
}

.field__input {
	width: 100%;
	border: 0;
	border-radius: 2px;
	padding: 10px;
	background-color: var(--input-bg);
	color: var(--text-strong);
	font-family: inherit;
	font-size: 15px;
	outline: none;
}

.field__input:focus {
	box-shadow: 0 0 0 1px rgba(25, 153, 255, 0.55);
}

.remember {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	user-select: none;
}

.remember input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.remember__box {
	width: 14px;
	height: 14px;
	border-radius: 2px;
	background-color: var(--input-bg);
	flex-shrink: 0;
}

.remember input:checked + .remember__box {
	background-color: var(--accent);
	box-shadow: inset 0 0 0 3px var(--input-bg);
}

.remember__text {
	color: var(--text-muted);
	font-size: 12px;
	padding-left: 2px;
}

.login-form__submit {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 4px;
}

.submit-btn {
	width: 100%;
	max-width: 270px;
	border: 0;
	border-radius: 2px;
	padding: 12px;
	background: linear-gradient(90deg, #06bfff 0%, #2d73ff 100%);
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	cursor: pointer;
	text-align: center;
}

.submit-btn:hover {
	filter: brightness(1.06);
}

.help-link {
	display: block;
	margin-top: 4px;
	color: var(--text-muted);
	font-size: 12px;
	text-align: center;
	text-decoration: underline;
	cursor: pointer;
}

.help-link:hover {
	color: #ffffff;
}

/* ===== Email guard step ===== */

.steam-mark {
	display: flex;
	justify-content: center;
	margin: 8px 0 4px;
}

.steam-mark svg {
	width: 153px;
	height: 46px;
}

.guard-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.guard-meta {
	margin-bottom: 2px;
	text-align: center;
}

.guard-account {
	font-size: 18px;
	font-weight: 500;
	color: var(--text-muted);
}

.guard-account span {
	color: var(--text-strong);
}

.guard-note {
	padding-top: 6px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-muted);
	opacity: 0.5;
}

.code-panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
	padding: 20px 20px 0;
	border-radius: 2px;
	background-color: var(--input-bg);
}

.code-row {
	position: relative;
	display: flex;
	flex-direction: row;
	justify-content: center;
	max-width: 280px;
	margin: 0 auto;
	gap: 20px;
	padding: 10px 28px 20px;
	border-radius: 2px;
	background-color: #2b2e33;
	cursor: text;
}

.code-row input {
	width: 40px;
	padding: 0;
	border: 0;
	border-bottom: 2px solid rgba(175, 175, 175, 0.25);
	background: none;
	outline: none;
	color: #ffffff;
	font-family: inherit;
	font-size: 28px;
	font-weight: 500;
	text-align: center;
	text-transform: uppercase;
}

.code-row input:focus {
	border-bottom-color: var(--accent);
}

.code-row.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.code-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: rgba(43, 46, 51, 0.72);
}

.code-loader[hidden] {
	display: none !important;
}

.code-loader span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	animation: pulse 1s ease-in-out infinite;
}

.code-loader span:nth-child(2) {
	animation-delay: 0.15s;
}

.code-loader span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	50% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

.code-hint {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
	padding: 8px 0 16px;
	color: #ffffff;
	font-size: 16px;
	line-height: 20px;
	text-align: center;
}

.code-hint svg {
	width: 58px;
	height: 56px;
	flex-shrink: 0;
}

@media (max-width: 560px) {
	body {
		background-image:
			linear-gradient(to top, rgba(23, 26, 33, 0.88) 0%, rgba(27, 40, 56, 0.55) 45%, rgba(42, 71, 94, 0.35) 100%),
			url("../img/bg%20mobile.jpg");
		background-attachment: scroll;
	}

	.site-header__inner {
		min-height: 72px;
	}

	.login-card {
		padding: 20px 18px;
	}

	.login-form {
		max-width: none;
	}

	.code-row {
		gap: 12px;
		padding: 10px 14px 18px;
		max-width: none;
	}

	.code-row input {
		width: 34px;
		font-size: 22px;
	}

	.code-hint {
		flex-direction: column;
		gap: 8px;
	}
}
