/* BlackCrow Password & 21+ Age Gate Styles */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.bc-gate-body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100%;
	height: 100%;
	background-color: var(--bc-gate-bg, #03140f);
	color: var(--bc-gate-text, #d5e2dc);
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

.bc-gate-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--bc-btn-start, #80d88c), #b5f5be, var(--bc-btn-end, #60b76e));
	box-shadow: 0 0 12px var(--bc-btn-start, #80d88c);
	z-index: 100;
	opacity: 0;
	transition: width 0.35s ease, opacity 0.25s ease;
	pointer-events: none;
}

.bc-gate-screen.is-unlocking .bc-gate-progress {
	opacity: 1;
}

.bc-gate-screen {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 20px;
	background-color: var(--bc-gate-bg, #03140f);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: var(--bc-gate-bg-size, cover);
	overflow: hidden;
	isolation: isolate;
}

.bc-gate-overlay {
	position: absolute;
	inset: 0;
	background: var(--bc-gate-bg, #03140f);
	opacity: var(--bc-gate-overlay-opacity, 0);
	z-index: -1;
	pointer-events: none;
}

/* Subtle radial ambient glow behind mascot */
.bc-gate-ambient {
	position: absolute;
	width: 480px;
	height: 480px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(128, 216, 140, 0.065) 0%, rgba(3, 20, 15, 0) 70%);
	pointer-events: none;
	z-index: -1;
	transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s ease;
}

.bc-gate-container {
	width: 100%;
	max-width: 380px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	z-index: 2;
	animation: bcGateEntrance 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bcGateEntrance {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mascot / Site Logo */
.bc-gate-logo-wrap {
	margin-bottom: 26px;
	will-change: transform, opacity, filter;
	transform-origin: center center;
	transition: transform 0.35s ease;
}

.bc-gate-logo {
	display: block;
	width: var(--bc-gate-logo-width, 145px);
	max-width: 72vw;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

/* Form Block */
.bc-gate-form {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.bc-gate-field-group {
	width: 100%;
	max-width: 268px;
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.bc-gate-label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bc-gate-text, #d5e2dc);
	margin-bottom: 10px;
}

.bc-gate-input-wrap {
	width: 100%;
	position: relative;
}

.bc-gate-input {
	width: 100%;
	height: 46px;
	padding: 0 18px;
	border-radius: 12px;
	background-color: var(--bc-input-bg, #0f201b);
	border: 1.5px solid var(--bc-input-border, #397c49);
	color: #f2f8f5;
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-align: center;
	outline: none;
	box-shadow: 0 0 0 1px rgba(128, 216, 140, 0.06), 0 4px 16px rgba(0, 0, 0, 0.25) inset;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bc-gate-input::placeholder {
	color: rgba(213, 226, 220, 0.42);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 12px;
}

.bc-gate-input:focus {
	border-color: var(--bc-btn-start, #80d88c);
	box-shadow: 0 0 0 3px rgba(128, 216, 140, 0.18), 0 0 18px rgba(128, 216, 140, 0.14);
}

/* Optional Checkbox style */
.bc-gate-checkbox-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 2px 0 16px;
	font-size: 12.5px;
	color: var(--bc-gate-text, #d5e2dc);
	cursor: pointer;
	user-select: none;
}

.bc-gate-checkbox-wrap input[type="checkbox"] {
	width: 17px;
	height: 17px;
	accent-color: var(--bc-btn-start, #80d88c);
	cursor: pointer;
}

/* Primary Enter Button */
.bc-gate-submit {
	margin-top: 6px;
	min-width: 204px;
	max-width: 268px;
	padding: 13px 24px;
	border: none;
	border-radius: 11px;
	background: linear-gradient(180deg, var(--bc-btn-start, #80d88c) 0%, var(--bc-btn-end, #60b76e) 100%);
	color: var(--bc-btn-text, #041910);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(96, 183, 110, 0.25), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
	transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.bc-gate-submit:hover {
	transform: translateY(-1px);
	filter: brightness(1.05);
	box-shadow: 0 8px 26px rgba(128, 216, 140, 0.34), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.bc-gate-submit:active {
	transform: translateY(1px) scale(0.99);
}

.bc-gate-submit.is-checking {
	opacity: 0.82;
	pointer-events: none;
}

/* Error Feedback */
.bc-gate-error {
	min-height: 20px;
	margin-top: 12px;
	font-size: 12px;
	font-weight: 600;
	color: #ff7b7b;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.bc-gate-error.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Input Shake on Error */
@keyframes bcGateShake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-8px); }
	40% { transform: translateX(7px); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(4px); }
}

.bc-gate-field-group.has-error .bc-gate-input {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
	animation: bcGateShake 0.4s ease;
}

/* Disclaimer Text */
.bc-gate-disclaimer {
	margin-top: 20px;
	font-size: 11px;
	line-height: 1.55;
	color: var(--bc-gate-muted, #758980);
	max-width: 320px;
}

.bc-gate-disclaimer p {
	margin: 0;
}

/* ==========================================================================
   SMOOTH UNLOCK & PAGE LOADING ANIMATIONS
   ========================================================================== */

/* Hide form smoothly while mascot/logo animates in center */
.bc-gate-screen.is-unlocking .bc-gate-form {
	opacity: 0;
	transform: translateY(10px) scale(0.96);
	pointer-events: none;
}

.bc-gate-screen.is-unlocking .bc-gate-ambient {
	transform: scale(1.6);
	opacity: 1;
}

/* Style 1: DuckDistro Clip Style — Center Glide + Scale Up + Smooth Spin + Dissolve */
@keyframes bcLogoSpinZoom {
	0% {
		transform: translateY(0) scale(1) rotate(0deg);
		opacity: 1;
	}
	28% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(2.05) rotate(-58deg);
		opacity: 1;
	}
	68% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(2.22) rotate(302deg);
		opacity: 1;
	}
	100% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(2.45) rotate(360deg);
		opacity: 0;
	}
}

.bc-gate-screen.is-unlocking[data-anim="spin_zoom"] .bc-gate-logo-wrap {
	animation: bcLogoSpinZoom var(--bc-anim-duration, 1800ms) cubic-bezier(0.25, 0.9, 0.32, 1) forwards;
}

/* Style 2: Glow Pulse & Curtain Lift */
@keyframes bcLogoPulse {
	0% {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
	45% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(1.75);
		filter: drop-shadow(0 0 32px rgba(128, 216, 140, 0.55));
		opacity: 1;
	}
	100% {
		transform: translateY(calc(var(--bc-center-offset, 75px) - 60px)) scale(1.4);
		opacity: 0;
	}
}

.bc-gate-screen.is-unlocking[data-anim="pulse_curtain"] .bc-gate-logo-wrap {
	animation: bcLogoPulse var(--bc-anim-duration, 1800ms) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bc-gate-screen.is-unlocking[data-anim="pulse_curtain"] {
	transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1) calc(var(--bc-anim-duration, 1800ms) - 500ms);
	transform: translateY(-100%);
}

/* Style 3: Minimal Smooth Scale & Crossfade */
@keyframes bcLogoCrossfade {
	0% {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
	55% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(1.45);
		opacity: 1;
	}
	100% {
		transform: translateY(var(--bc-center-offset, 75px)) scale(1.65);
		opacity: 0;
	}
}

.bc-gate-screen.is-unlocking[data-anim="crossfade"] .bc-gate-logo-wrap {
	animation: bcLogoCrossfade var(--bc-anim-duration, 1800ms) ease-in-out forwards;
}

@media (max-width: 480px) {
	.bc-gate-logo {
		width: min(var(--bc-gate-logo-width, 145px), 130px);
	}
	.bc-gate-field-group {
		max-width: 256px;
	}
}
