* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: #0a0a0a;
	padding: 0;
	margin: 0;
	min-height: 100vh;
	color: #e0e0e0;
	position: relative;
	overflow-x: hidden;
}

body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: 
		radial-gradient(circle at 20% 50%, rgba(0, 255, 0, 0.03) 0%, transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.03) 0%, transparent 50%),
		radial-gradient(circle at 40% 80%, rgba(0, 255, 0, 0.03) 0%, transparent 50%);
	pointer-events: none;
	z-index: -1;
}

.container {
	max-width: 500px;
	margin: 0 auto;
	background: #1a1a1a;
	border-radius: 0;
	box-shadow: 0 4px 20px rgba(0,0,0,0.5);
	overflow: hidden;
	border: none;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.header {
	background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
	color: #00ff00;
	padding: 20px;
	text-align: center;
	position: relative;
	overflow: hidden;
	border-bottom: 2px solid #00ff00;
}

.header::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.1), transparent);
	animation: matrix-scan 3s infinite;
}

@keyframes matrix-scan {
	0% { left: -100%; }
	100% { left: 100%; }
}

.header h1 {
	font-size: 24px;
	font-weight: 600;
	font-family: 'Courier New', monospace;
	text-shadow: 
		0 0 5px #00ff00,
		0 0 10px #00ff00,
		0 0 15px #00ff00,
		0 0 20px #00ff00;
	animation: glitch 20s infinite;
	position: relative;
	z-index: 1;
}

@keyframes glitch {
	10% { 
		transform: translate(-2px, 2px);
		text-shadow: 
			2px 0 5px #ff0000,
			-2px 0 5px #00ffff;
	}
	20% { 
		transform: translate(2px, -2px);
		text-shadow: 
			-2px 0 5px #ff0000,
			2px 0 5px #00ffff;
	}
	30% { 
		transform: translate(-2px, -2px);
		text-shadow: 
			2px 0 5px #ff0000,
			-2px 0 5px #00ffff;
	}
	40% { 
		transform: translate(2px, 2px);
		text-shadow: 
			-2px 0 5px #ff0000,
			2px 0 5px #00ffff;
	}
	50% { 
		transform: translate(-2px, 2px);
		text-shadow: 
			2px 0 5px #ff0000,
			-2px 0 5px #00ffff;
	}
	60% { 
		transform: translate(2px, -2px);
		text-shadow: 
			-2px 0 5px #ff0000,
			2px 0 5px #00ffff;
	}
	70% { 
		transform: translate(-2px, -2px);
		text-shadow: 
			2px 0 5px #ff0000,
			-2px 0 5px #00ffff;
	}
	80% { 
		transform: translate(2px, 2px);
		text-shadow: 
			-2px 0 5px #ff0000,
			2px 0 5px #00ffff;
	}
	90% { 
		transform: translate(-2px, 2px);
		text-shadow: 
			2px 0 5px #ff0000,
			-2px 0 5px #00ffff;
	}
}

.content {
	padding: 20px;
	background: #1a1a1a;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.search-box {
	position: relative;
	margin-bottom: 20px;
}

.search-input {
	width: 100%;
	padding: 15px;
	border: 2px solid #00ff00;
	border-radius: 8px;
	font-size: 16px;
	outline: none;
	transition: all 0.3s;
	background: #0a0a0a;
	color: #00ff00;
	font-family: 'Courier New', monospace;
	box-shadow: 
		0 0 10px rgba(0, 255, 0, 0.3),
		inset 0 0 10px rgba(0, 255, 0, 0.1);
	position: relative;
}

.search-input:focus {
	border-color: #00ffff;
	box-shadow: 
		0 0 20px rgba(0, 255, 255, 0.5),
		inset 0 0 20px rgba(0, 255, 255, 0.2);
	text-shadow: 0 0 5px #00ffff;
}

.search-input::placeholder {
	color: #00ff00;
	opacity: 0.7;
	text-shadow: 0 0 3px #00ff00;
}

.suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #0a0a0a;
	border: 2px solid #00ff00;
	border-top: none;
	border-radius: 0 0 8px 8px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
	box-shadow: 
		0 0 20px rgba(0, 255, 0, 0.3),
		inset 0 0 20px rgba(0, 255, 0, 0.1);
}

.suggestion {
	padding: 12px 15px;
	cursor: pointer;
	border-bottom: 1px solid #00ff00;
	transition: all 0.2s;
	color: #00ff00;
	font-family: 'Courier New', monospace;
	text-shadow: 0 0 3px #00ff00;
	position: relative;
}

.suggestion:hover {
	background: rgba(0, 255, 0, 0.1);
	text-shadow: 0 0 8px #00ff00;
}

.suggestion:last-child {
	border-bottom: none;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}

.tile {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 15px 10px;
	border-radius: 8px;
	text-align: center;
	cursor: pointer;
	font-weight: 600;
	font-size: 16px;
	transition: all 0.2s;
	border: none;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tile:hover {
	background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tile:active {
	transform: translateY(0);
}

.code-tile {
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
	box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.code-tile:hover {
	background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
	box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.priority-code {
	background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
	box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4) !important;
	border: 2px solid #FF6B35 !important;
	font-weight: 700 !important;
	transform: scale(1.05) !important;
}

.priority-code:hover {
	background: linear-gradient(135deg, #F7931E 0%, #E8850E 100%) !important;
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.6) !important;
	transform: scale(1.08) translateY(-2px) !important;
}

/* Стили для рабочих кодов */
.working-code {
	background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%) !important;
	box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4) !important;
	border: 2px solid #9C27B0 !important;
	font-weight: 700 !important;
	transform: scale(1.05) !important;
	position: relative;
}

.working-code:hover {
	background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%) !important;
	box-shadow: 0 4px 12px rgba(156, 39, 176, 0.6) !important;
	transform: scale(1.08) translateY(-2px) !important;
}

.working-code::after {
	content: '✓';
	position: absolute;
	top: 5px;
	right: 5px;
	font-size: 12px;
	color: #fff;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 50%;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Модальное окно для оценки кода */
.rating-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	backdrop-filter: blur(5px);
}

.rating-modal.hidden {
	display: none;
}

.rating-content {
	background: #1a1a1a;
	border-radius: 15px;
	padding: 30px;
	text-align: center;
	max-width: 400px;
	width: 90%;
	border: 1px solid #333;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	position: relative;
}

.rating-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	color: #999;
	font-size: 24px;
	cursor: pointer;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
	/* Улучшения для мобильных устройств */
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
}

.rating-close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.rating-title {
	font-size: 20px;
	margin-bottom: 20px;
	color: #e0e0e0;
}

.rating-buttons {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-top: 20px;
}

.rating-btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 100px;
	/* Улучшения для мобильных устройств */
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
}

.rating-btn.yes {
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.rating-btn.yes:hover {
	background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
	box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
	transform: translateY(-2px);
}

.rating-btn.no {
	background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.rating-btn.no:hover {
	background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
	box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
	transform: translateY(-2px);
}

.rating-btn:active {
	transform: translateY(0);
}

.codes {
	background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
	color: white;
	padding: 20px;
	border-radius: 8px;
	text-align: center;
	font-size: 24px;
	font-weight: bold;
	letter-spacing: 2px;
	box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
	word-break: break-word;
	overflow-wrap: anywhere;
}

.breadcrumb {
	display: flex;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 5px;
}

.breadcrumb-item {
	background: #333;
	padding: 5px 10px;
	border-radius: 15px;
	font-size: 14px;
	color: #aaa;
}

.breadcrumb-item.active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.back-btn {
	background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	margin-bottom: 15px;
	transition: all 0.2s;
	box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.back-btn:hover {
	background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.loading {
	text-align: center;
	color: #888;
	padding: 20px;
}

.section-title {
	font-size: 18px;
	font-weight: 600;
	color: #e0e0e0;
	margin-bottom: 15px;
	text-align: center;
}

.error {
	background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
	color: white;
	padding: 15px;
	border-radius: 8px;
	text-align: center;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

@media (max-width: 480px) {
	body {
		padding: 0;
	}
	
	.grid {
		grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
		gap: 8px;
	}
	
	.tile {
		padding: 12px 8px;
		font-size: 14px;
		min-height: 50px;
	}
}

/* Стили для формы входа по пинкоду */
.pincode-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.pincode-container {
	background: #1a1a1a;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	border: 1px solid #333;
	max-width: 400px;
	width: 90%;
	text-align: center;
}

.pincode-header h2 {
	color: #00ff00;
	margin-bottom: 10px;
	font-size: 24px;
	font-weight: 600;
}

.pincode-header p {
	color: #ccc;
	margin-bottom: 30px;
	font-size: 14px;
	line-height: 1.4;
}

.pincode-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.pincode-input {
	width: 100%;
	padding: 15px 20px;
	border: 2px solid #333;
	border-radius: 8px;
	background: #0a0a0a;
	color: #e0e0e0;
	font-size: 16px;
	text-align: center;
	letter-spacing: 2px;
	transition: all 0.3s ease;
}

.pincode-input:focus {
	outline: none;
	border-color: #00ff00;
	box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.pincode-submit {
	width: 100%;
	padding: 15px 20px;
	background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
	color: #000;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.pincode-submit:hover {
	background: linear-gradient(135deg, #00cc00 0%, #009900 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.pincode-submit:active {
	transform: translateY(0);
}

.pincode-error {
	color: #ff4444;
	font-size: 14px;
	margin-top: 10px;
	text-align: center;
}

/* Анимация появления */
.pincode-container {
	animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Скрытие модального окна */
.pincode-modal.hidden {
	display: none;
}

/* Мобильные улучшения для модального окна */
@media (max-width: 768px) {
	.rating-modal {
		padding: 20px;
	}
	
	.rating-content {
		padding: 25px 20px;
		max-width: 350px;
		width: 95%;
	}
	
	.rating-title {
		font-size: 18px;
		margin-bottom: 25px;
	}
	
	.rating-buttons {
		flex-direction: column;
		gap: 12px;
		margin-top: 25px;
	}
	
	.rating-btn {
		padding: 15px 24px;
		font-size: 18px;
		min-width: auto;
		width: 100%;
	}
	
	.rating-close {
		width: 40px;
		height: 40px;
		font-size: 28px;
		top: 10px;
		right: 10px;
	}
}

/* Дополнительные улучшения для touch устройств */
@media (hover: none) and (pointer: coarse) {
	.rating-btn:active {
		transform: scale(0.95);
		opacity: 0.8;
	}
	
	.rating-close:active {
		background: rgba(255, 255, 255, 0.2);
		color: #fff;
		transform: scale(0.9);
	}
	
	.rating-modal {
		-webkit-overflow-scrolling: touch;
	}
}

