:root {
	--primary: #ff8c42;
	--primary-dark: #e67e22;
	--text: #111827;
	--muted: #6b7280;
	--bg: #f5f7fb;
	--card: #fff;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
}

.header {
	background: white;
	color: var(--primary);
	border-bottom: 1px solid #e5e7eb;
}

.header-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	font-weight: 800;
	letter-spacing: .2px;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
}

.logo-img {
	height: 40px;
	width: auto;
	max-width: 150px;
	display: block;
	object-fit: contain;
}

.cat-animation {
	width: 40px;
	height: 40px;
	display: block;
	object-fit: contain;
	flex-shrink: 0;
}

.nav {
	display: flex;
	gap: 16px;
}

.nav a {
	color: var(--primary);
	text-decoration: none;
	font-weight: 600;
}

.footer {
	background: #0b1020;
	color: var(--primary);
	margin-top: 32px;
}

.footer-inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 18px 20px;
	font-size: 14px;
}

.container {
	max-width: 880px;
	margin: 20px auto;
	padding: 0 20px 24px;
}

.card {
	background: var(--card);
	border-radius: 14px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
	padding: 22px;
}

.title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 8px;
}

.subtitle {
	color: var(--muted);
	margin: 0 0 24px;
}

.auth-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.button-group {
	display: flex;
	flex-direction: column;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	border-radius: 10px;
	padding: 12px 16px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease;
	text-decoration: none;
	color: #fff;
	width: 100%;
	justify-content: center;
}

.btn:active {
	transform: translateY(1px);
}

.btn-vk {
	background: #4C75A3;
}

.btn-fb {
	background: #1877f2;
}

.btn-wa {
	background: #25d366;
}

.btn-tg {
	background: #0088cc;
}

.instruction {
	margin-top: 0;
	margin-bottom: 12px;
	padding: 8px 12px;
	background: #f8f9fa;
	border-radius: 6px;
	font-size: 13px;
	color: #6b7280;
	border-left: 3px solid var(--primary);
}

/* Контейнер для языкового переключателя */
.language-switcher-container {
	display: flex;
	justify-content: flex-end;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto 0px;
	padding: 0 20px;
}

/* Стили для выпадающего языкового переключателя */
.language-dropdown {
	position: relative;
	display: inline-block;
	margin-left: auto;
	margin-right: -10px;
	margin-bottom: 15px;
	min-width: 180px;
	text-align: right;
}

.language-dropdown-btn {
	background: #f8f9fa;
	color: #333;
	padding: 8px 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	transition: all 0.3s;
	width: 100%;
}

.language-dropdown-btn:hover {
	background: #e9ecef;
}

.language-dropdown-btn:after {
	content: "▼";
	font-size: 9px;
	margin-left: 8px;
}

.language-dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	background-color: #fff;
	min-width: 220px;
	box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
	z-index: 1;
	border-radius: 4px;
	overflow: hidden;
	max-height: 450px;
	overflow-y: auto;
}

.language-dropdown-content a {
	color: black;
	padding: 8px 15px;
	text-decoration: none;
	display: block;
	transition: background 0.2s;
	text-align: left;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}

.language-dropdown-content a:hover {
	background-color: #f5f5f5;
}

.current-language {
	font-weight: bold;
	font-size: 14px;
}

/* Скрываем контент до готовности локализации */
.localizable-content {
	opacity: 0;
	transition: opacity 0.3s ease;
}

.localizable-content.ready {
	opacity: 1;
}

/* Поддержка эмодзи флагов */
.language-dropdown-btn,
.language-dropdown-content a {
	font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	unicode-bidi: normal;
	direction: ltr;
	font-feature-settings: "liga";
	text-rendering: optimizeLegibility;
}

/* Анимация загрузки */
.loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid var(--primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

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

.status {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	display: none;
	font-weight: 600;
}

.status.info {
	background: #fff3cd;
	color: #856404;
}

.status.success {
	background: #d4edda;
	color: #155724;
}

.status.error {
	background: #f8d7da;
	color: #721c24;
}

.pre {
	background: #0b1020;
	color: #e5e7eb;
	padding: 12px;
	border-radius: 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 13px;
}

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

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

@media (max-width: 480px) {
	.language-switcher-container {
		justify-content: flex-end;
		padding: 0 15px;
	}

	.language-dropdown {
		min-width: 160px;
		margin-right: -5px;
	}

	.container {
		margin: 10px auto;
		padding: 0 15px 20px;
	}

	.card {
		padding: 16px;
		border-radius: 12px;
	}

	.title {
		font-size: 20px;
		margin: 0 0 6px;
	}

	.subtitle {
		font-size: 14px;
		margin: 0 0 20px;
	}

	.btn {
		padding: 14px 16px;
		font-size: 15px;
	}

	.header-inner {
		padding: 12px 15px;
	}

	.brand {
		font-size: 18px;
	}

	.nav {
		gap: 12px;
	}

	.nav a {
		font-size: 14px;
	}

	.footer-inner {
		padding: 15px;
		font-size: 13px;
	}

	.instruction {
		font-size: 12px;
		padding: 6px 10px;
	}
}

@media (max-width: 768px) {
	.grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.container {
		padding: 0 16px 20px;
	}

	.language-switcher-container {
		padding: 0 16px;
	}
}

