/* S1 Simple Gate — Frontend */

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

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: linear-gradient(145deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	color: #0f172a;
	-webkit-font-smoothing: antialiased;
}

.s1-gate-wrap {
	width: 100%;
	max-width: 440px;
}

.s1-gate-card {
	background: #ffffff;
	border-radius: 24px;
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.35),
		0 0 0 1px rgba(255, 255, 255, 0.05);
	padding: 36px 28px 28px;
	text-align: center;
	animation: s1-fade-in 0.45s ease-out;
}

@keyframes s1-fade-in {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */

.s1-gate-header {
	margin-bottom: 28px;
}

.s1-gate-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	color: #3b82f6;
	display: flex;
	align-items: center;
	justify-content: center;
}

.s1-gate-icon svg {
	width: 48px;
	height: 48px;
}

.s1-gate-header h1 {
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #0f172a;
	margin-bottom: 8px;
	line-height: 1.3;
}

.s1-gate-desc {
	font-size: 0.95rem;
	color: #64748b;
	line-height: 1.5;
}

/* Error */

.s1-gate-error {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fef2f2;
	color: #b91c1c;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 24px;
	border: 1px solid #fecaca;
	animation: s1-shake 0.4s ease;
}

@keyframes s1-shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

/* Target image */

.s1-gate-target {
	margin-bottom: 28px;
}

.s1-gate-target img {
	width: 128px;
	height: 128px;
	object-fit: contain;
	border-radius: 20px;
	background: linear-gradient(145deg, #f8fafc, #f1f5f9);
	padding: 16px;
	border: 2px solid #e2e8f0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
	user-select: none;
	-webkit-user-drag: none;
}

/* Options */

.s1-gate-options {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.s1-gate-option {
	appearance: none;
	border: 2px solid #e2e8f0;
	border-radius: 16px;
	padding: 12px;
	background: #f8fafc;
	cursor: pointer;
	transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.s1-gate-option img {
	width: 100%;
	height: auto;
	max-height: 64px;
	object-fit: contain;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.s1-gate-option:hover {
	border-color: #93c5fd;
	background: #eff6ff;
	transform: translateY(-3px);
	box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.25);
}

.s1-gate-option:active,
.s1-gate-option.selected {
	border-color: #3b82f6;
	background: #dbeafe;
	transform: scale(0.96);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Footer */

.s1-gate-footer {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #f1f5f9;
	font-size: 0.8rem;
	color: #94a3b8;
	letter-spacing: 0.01em;
}

/* Responsive */

@media (max-width: 420px) {
	.s1-gate-card {
		padding: 28px 20px 24px;
		border-radius: 20px;
	}

	.s1-gate-header h1 {
		font-size: 1.2rem;
	}

	.s1-gate-target img {
		width: 110px;
		height: 110px;
	}

	.s1-gate-options {
		gap: 8px;
	}

	.s1-gate-option {
		padding: 8px;
		border-radius: 12px;
	}

	.s1-gate-option img {
		max-height: 52px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.s1-gate-card,
	.s1-gate-error,
	.s1-gate-option {
		animation: none;
		transition: none;
	}
}
