@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

:root {
	--primary-color: #2d72d9;
	--primary-hover: #004D7F;
	--link-color: #3498DB;
	--background: #fff;
	--input-bg: #f6f6f6;
	--input-border: #f6f6f6;
	--input-focus-border: #004D7F;
	--shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
	--button-shadow: 0 10px 30px rgba(95, 186, 233, 0.4);
	--border-radius: 10px;
	--input-radius: 5px;
	--font-family: Montserrat, sans-serif;
	--error-color: red;
	--success-color: green;
	--placeholder-color: #ccc;
	--footer-bg: #f6f6f6;
	--footer-border: #dce8f1;
}

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

body {
	font-family: var(--font-family);
	margin: 0;
	padding: 0;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-color: rgba(0, 0, 0, 0.2);
	background-blend-mode: darken;
}

a {
	color: var(--link-color);
	text-decoration: none;
	font-weight: 400;
	display: inline-block;
}

h2 {
	text-align: center;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	margin: 40px 8px 10px;
	color: var(--placeholder-color);
	display: inline-block;
}

.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-height: 100vh;
	padding: 20px;
}

#form-content {
	background: var(--background);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	padding: 30px 0 0 0;
	width: 90%;
	max-width: 450px;
	text-align: center;
	position: relative;
}

#form-footer {
	background: var(--footer-bg);
	border-top: 1px solid var(--footer-border);
	border-radius: 0 0 var(--border-radius) var(--border-radius);
	padding: 25px;
	text-align: center;
}

input[type="button"],
input[type="submit"],
input[type="reset"],
.primary-auth-btn {
	background: var(--primary-color);
	border: none;
	color: #fff;
	font-family: var(--font-family);
	padding: 15px 80px;
	width: 85%;
	border-radius: var(--input-radius);
	margin: 15px 20px 40px;
	cursor: pointer;
	transition: background-color 0.3s, box-shadow 0.3s;
	font-size: 16px;
	font-weight: 500;
}

.primary-auth-btn {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
}

.button-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.loading-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 999px;
	flex: 0 0 16px;
	animation: spin 0.7s linear infinite;
}

.is-loading .loading-spinner {
	display: inline-block;
}

.is-loading .google-auth-icon {
	display: none;
}

button.is-loading,
button:disabled,
input[type="submit"].is-loading,
input[type="submit"]:disabled {
	cursor: not-allowed;
	opacity: 0.78;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #7b8794;
	font-size: 13px;
	margin: 0 32px 16px;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	height: 1px;
	background: var(--footer-border);
	flex: 1;
}

.social-auth-actions {
	display: grid;
	gap: 10px;
	margin: 0 32px 20px;
}

.social-auth-btn {
	background: #fff;
	border: 1px solid var(--footer-border);
	border-radius: var(--input-radius);
	color: #1f2933;
	cursor: pointer;
	font-family: var(--font-family);
	font-size: 16px;
	font-weight: 500;
	min-height: 44px;
	padding: 12px 16px;
	transition: border-color 0.2s, box-shadow 0.2s;
	align-items: center;
	display: inline-flex;
	justify-content: center;
	gap: 10px;
}

.social-auth-btn:not(:disabled):hover {
	border-color: var(--primary-color);
	box-shadow: 0 8px 18px rgba(0, 77, 127, 0.12);
}

.google-auth-btn {
	align-items: center;
	background: #fff;
	border-color: #747775;
	color: #1f1f1f;
	display: flex;
	gap: 10px;
	justify-content: center;
	padding: 11px 12px;
}

.google-auth-btn:not(:disabled):hover {
	border-color: #747775;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.google-auth-btn:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

.google-auth-icon {
	background: #fff;
	display: inline-flex;
	flex: 0 0 18px;
	height: 18px;
	width: 18px;
}

.google-auth-icon svg {
	display: block;
	height: 18px;
	width: 18px;
}

.passkey-submit {
	align-items: center;
	background: var(--primary-color);
	border: none;
	border-radius: var(--input-radius);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	gap: 10px;
	justify-content: center;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	margin: 15px 20px 30px;
	padding: 15px 80px;
	width: 85%;
}

.passkey-submit:hover {
	background-color: var(--primary-hover);
	box-shadow: var(--button-shadow);
}

input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.primary-auth-btn:not(:disabled):hover {
	background-color: var(--primary-hover);
	box-shadow: var(--button-shadow);
}

input[type="email"],
input[type="password"],
input[type="text"] {
	background: var(--input-bg);
	border: 2px solid var(--input-border);
	color: #0d0d0d;
	font-family: var(--font-family);
	padding: 15px 32px;
	font-size: 16px;
	margin: 5px 0;
	width: 85%;
	border-radius: var(--input-radius);
	text-align: left;
	transition: background 0.2s, border-bottom 0.2s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
	background: #fff;
	border-bottom: 2px solid var(--input-focus-border);
	outline: none;
}

::placeholder {
	color: var(--placeholder-color);
	font-family: var(--font-family);
	font-weight: 400;
	opacity: 1;
}

.underline-hover {
	position: relative;
	transition: color 0.2s;
}

.underline-hover::after {
	content: "";
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	bottom: -10px;
	height: 2px;
	background: var(--primary-hover);
	width: 0;
	transition: width 0.2s;
}

.underline-hover:hover {
	color: #0d0d0d;
}

.underline-hover:hover::after {
	width: 100%;
}

.logo {
	width: 300px;
	height: auto;
	margin: 20px 20px 10px;
}

.error {
	color: var(--error-color);
	font-size: 14px;
	margin-top: 10px;
}

.success {
	color: var(--success-color);
	font-size: 14px;
	margin-top: 10px;
}

.footer-link {
	margin-left: 18px;
}

.auth-message {
	color: #4b5563;
	font-size: 14px;
	line-height: 1.4;
	margin: 10px 32px;
}

@media (max-width: 767px) {
	.container {
		padding: 10px;
		min-height: 100dvh;
		overflow: hidden;
	}

	#form-content {
		width: 100%;
		max-width: 100%;
	}

	.logo {
		width: 60%;
	}

	html, body {
		height: 100dvh;
		margin: 0;
		padding: 0;
		overflow: hidden;
	}
}
