/* Gate Styles */

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

body {
	background: #0a0a12;
	overflow: hidden;
	font-family: 'Rajdhani', sans-serif;
	height: 100vh;
	width: 100vw;
}

/* ---------- Pipes Canvas ---------- */
#pipes-canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

/* ---------- Gate Overlay ---------- */
#gate-overlay {
	position: fixed;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
}

#gate-form {
	text-align: center;
	background: rgba(10, 10, 18, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	padding: 3rem 3.5rem;
	width: min(420px, calc(100% - 2rem));
	transition: opacity 0.6s ease, transform 0.6s ease;
}

#gate-form.is-hidden {
	opacity: 0;
	transform: scale(0.95);
	pointer-events: none;
}

/* Logo */
.gate-logo {
	margin-bottom: 2rem;
}

.gate-logo img {
	width: 180px;
	height: auto;
	display: block;
	margin: 0 auto;
	filter: drop-shadow(0 0 20px rgba(64, 224, 208, 0.3));
}

/* Input row */
.gate-input-wrap {
	display: flex;
	gap: 0;
	border-radius: 100px;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.05);
	transition: border-color 0.3s ease;
}

.gate-input-wrap:focus-within {
	border-color: rgba(64, 224, 208, 0.5);
}

#gate-password {
	flex: 1;
	border: none;
	background: transparent;
	color: #fff;
	font-family: 'Rajdhani', sans-serif;
	font-size: 1.1rem;
	font-weight: 600;
	padding: 0.9rem 1.5rem;
	outline: none;
	letter-spacing: 0.15em;
}

#gate-password::placeholder {
	color: rgba(255, 255, 255, 0.3);
	font-weight: 400;
	letter-spacing: 0.05em;
}

#gate-submit {
	border: none;
	background: linear-gradient(135deg, #40e0d0, #1a8a7d);
	color: #fff;
	font-size: 1.3rem;
	padding: 0.9rem 1.5rem;
	cursor: pointer;
	transition: background 0.3s ease;
}

#gate-submit:hover {
	background: linear-gradient(135deg, #5cf0e0, #40e0d0);
}

#gate-submit:focus-visible {
	outline: 2px solid #40e0d0;
	outline-offset: 2px;
}

/* Visually hidden but available to screen readers */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Error message */
#gate-error {
	color: #ff6b6b;
	font-size: 0.9rem;
	font-weight: 600;
	margin-top: 1rem;
	min-height: 1.3em;
	transition: opacity 0.3s ease;
}

/* Shake animation on wrong password */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-12px); }
	40% { transform: translateX(10px); }
	60% { transform: translateX(-8px); }
	80% { transform: translateX(6px); }
}

.gate-input-wrap.shake {
	animation: shake 0.5s ease;
	border-color: #ff6b6b;
}

/* Mobile adjustments */
@media (max-width: 600px) {
	#gate-form {
		padding: 2rem 1.5rem;
	}

	.gate-logo img {
		width: 140px;
	}
}
