/* assets/css/auth.css */

/* ==================== ROOT VARIABLES ==================== */
:root {
	--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--primary-gradient-hover: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);

	--success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
	--error-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	--info-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	--warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

	/* Light theme colors */
	--bg-primary: #ffffff;
	--bg-secondary: #f8fafc;
	--bg-tertiary: #f1f5f9;
	--text-primary: #1e293b;
	--text-secondary: #64748b;
	--border-color: #e2e8f0;
	--shadow-color: rgba(0, 0, 0, 0.1);

	/* Input colors */
	--input-bg: #ffffff;
	--input-border: #cbd5e1;
	--input-text: #334155;
	--input-focus-border: #667eea;
	--input-focus-ring: rgba(102, 126, 234, 0.2);
}

.dark {
	/* Dark theme colors */
	--bg-primary: #0f172a;
	--bg-secondary: #1e293b;
	--bg-tertiary: #334155;
	--text-primary: #f1f5f9;
	--text-secondary: #cbd5e1;
	--border-color: #475569;
	--shadow-color: rgba(0, 0, 0, 0.3);

	/* Input colors */
	--input-bg: #1e293b;
	--input-border: #475569;
	--input-text: #e2e8f0;
	--input-focus-border: #818cf8;
	--input-focus-ring: rgba(129, 140, 248, 0.2);

	/* Modal background with transparency */
	--modal-bg: rgba(15, 23, 42, 0.95);
}

/* ==================== BASE STYLES ==================== */
* {
	transition:
		background-color 0.3s ease,
		border-color 0.3s ease;
}

body {
	background-color: var(--bg-primary);
	color: var(--text-primary);
}

/* ==================== AUTH WRAPPER ==================== */
.auth-wrapper {
	min-height: 100vh;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dark .auth-wrapper {
	background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
}

/* ==================== AUTH CONTAINERS ==================== */
.login-container,
.register-container {
	border-radius: 24px;
	overflow: hidden;
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.25),
		0 0 0 1px rgba(255, 255, 255, 0.1);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	background: var(--bg-primary);
}

.login-container:hover,
.register-container:hover {
	transform: translateY(-5px);
	box-shadow:
		0 30px 60px -12px rgba(0, 0, 0, 0.3),
		0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* ==================== IMAGE SECTIONS ==================== */
.login-image,
.register-image {
	background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
	position: relative;
	overflow: hidden;
}

.dark .login-image,
.dark .register-image {
	background: linear-gradient(135deg, #1f2b32 0%, #1e1f1f 30%, #151d35 100%);
}

.login-image::before,
.register-image::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(
			circle at 20% 80%,
			rgba(59, 130, 246, 0.3) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 80% 20%,
			rgba(139, 92, 246, 0.3) 0%,
			transparent 50%
		);
}

/* ==================== CONTENT SECTIONS ==================== */
.login-content,
.register-content {
	background: linear-gradient(
		145deg,
		var(--bg-primary) 0%,
		var(--bg-secondary) 100%
	);
	padding: 2rem;
}

@media (min-width: 1024px) {
	.login-content,
	.register-content {
		padding: 3rem;
	}
}

/* ==================== TYPOGRAPHY ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--text-primary);
}

p,
span,
label {
	color: var(--text-secondary);
}

.dark label {
	color: #cbd5e1;
}

/* ==================== FORM CONTROLS ==================== */
.input-field {
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid var(--input-border);
	background: var(--input-bg);
	color: var(--input-text);
	border-radius: 12px;
	padding: 1rem 1rem 1rem 3rem;
	width: 100%;
}

.input-field:focus {
	border-color: var(--input-focus-border);
	box-shadow: 0 0 0 3px var(--input-focus-ring);
	transform: translateY(-2px);
	outline: none;
}

.input-field::placeholder {
	color: #94a3b8;
}

.dark .input-field::placeholder {
	color: #64748b;
}

/* ==================== BUTTONS ==================== */
.login-btn,
.register-btn {
	background: var(--primary-gradient);
	color: white;
	padding: 1rem 2rem;
	border-radius: 12px;
	font-weight: 600;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
	overflow: hidden;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
}

.login-btn:hover,
.register-btn:hover {
	transform: translateY(-3px);
	box-shadow:
		0 20px 40px -15px rgba(102, 126, 234, 0.4),
		0 0 0 2px rgba(255, 255, 255, 0.1);
	background: var(--primary-gradient-hover);
}

.login-btn::after,
.register-btn::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
	transition: 0.6s;
}

.login-btn:hover::after,
.register-btn:hover::after {
	left: 100%;
}

/* ==================== PASSWORD STRENGTH ==================== */
.strength-meter {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(
		90deg,
		#ef4444 0%,
		#f59e0b 33%,
		#10b981 66%,
		#3b82f6 100%
	);
	margin-top: 8px;
	overflow: hidden;
	position: relative;
}

.strength-fill {
	height: 100%;
	width: 0%;
	border-radius: 3px;
	background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981, #3b82f6);
	transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
}

.strength-fill::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.3),
		transparent
	);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.password-strength-text {
	font-size: 0.75rem;
	font-weight: 600;
	margin-top: 4px;
	text-align: right;
}

.strength-weak {
	color: #ef4444;
}

.strength-fair {
	color: #f59e0b;
}

.strength-good {
	color: #10b981;
}

.strength-strong {
	color: #3b82f6;
}

/* Dark mode adjustments for password strength text */
.dark .strength-weak {
	color: #fca5a5;
}

.dark .strength-fair {
	color: #fcd34d;
}

.dark .strength-good {
	color: #6ee7b7;
}

.dark .strength-strong {
	color: #93c5fd;
}

/* ==================== MODAL STYLES ==================== */
#responseModal {
	backdrop-filter: blur(12px) saturate(180%);
	animation: modalBackdropIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	background: rgba(0, 0, 0, 0.5);
}

.dark #responseModal {
	background: rgba(0, 0, 0, 0.7);
}

@keyframes modalBackdropIn {
	from {
		backdrop-filter: blur(0px) saturate(100%);
		opacity: 0;
	}
	to {
		backdrop-filter: blur(12px) saturate(180%);
		opacity: 1;
	}
}

.custom-modal-content {
	animation: modalContentIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow:
		0 25px 50px -12px rgba(0, 0, 0, 0.4),
		0 0 0 1px rgba(255, 255, 255, 0.1),
		0 10px 40px rgba(0, 0, 0, 0.3);
	transform-origin: center;
	background: linear-gradient(
		145deg,
		var(--bg-primary) 0%,
		var(--bg-secondary) 100%
	);
	border: 1px solid var(--border-color);
	border-radius: 20px;
	overflow: hidden;
	max-width: 28rem;
	width: 90%;
}

.dark .custom-modal-content {
	background: linear-gradient(
		145deg,
		var(--bg-primary) 0%,
		var(--bg-tertiary) 100%
	);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalContentIn {
	0% {
		opacity: 0;
		transform: translateY(60px) scale(0.9) rotateX(-15deg);
		filter: blur(10px);
	}
	60% {
		opacity: 1;
		filter: blur(0);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1) rotateX(0);
	}
}

.modal-exit {
	animation: modalContentOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalContentOut {
	0% {
		opacity: 1;
		transform: translateY(0) scale(1) rotateX(0);
		filter: blur(0);
	}
	50% {
		transform: translateY(-30px) scale(0.95) rotateX(10deg);
		filter: blur(5px);
	}
	100% {
		opacity: 0;
		transform: translateY(60px) scale(0.9) rotateX(-15deg);
		filter: blur(10px);
	}
}

/* Modal Type Styles */
.custom-modal-content.success {
	border-left: 5px solid #10b981;
}

.custom-modal-content.error {
	border-left: 5px solid #ef4444;
}

.custom-modal-content.info {
	border-left: 5px solid #3b82f6;
}

.custom-modal-content.warning {
	border-left: 5px solid #f59e0b;
}

.dark .custom-modal-content.success {
	border-left: 5px solid #34d399;
}

.dark .custom-modal-content.error {
	border-left: 5px solid #f87171;
}

.dark .custom-modal-content.info {
	border-left: 5px solid #60a5fa;
}

.dark .custom-modal-content.warning {
	border-left: 5px solid #fbbf24;
}

/* Modal Icon Styles */
.modal-icon-wrapper {
	position: relative;
	border-radius: 16px;
	padding: 3px;
	background-size: 300% 300%;
	animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

.modal-icon-wrapper.error {
	background: linear-gradient(135deg, #f56565, #ed64a6, #ed8936, #f56565);
}

.modal-icon-wrapper.success {
	background: linear-gradient(135deg, #48bb78, #38b2ac, #0bc5ea, #48bb78);
}

.modal-icon-wrapper.info {
	background: linear-gradient(135deg, #4299e1, #667eea, #9f7aea, #4299e1);
}

.modal-icon-wrapper.warning {
	background: linear-gradient(135deg, #f59e0b, #ed8936, #f56565, #f59e0b);
}

.modal-icon-inner {
	background: white;
	border-radius: 13px;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
}

.dark .modal-icon-inner {
	background: rgba(30, 41, 59, 0.95);
}

/* Icon Animation */
.icon-pulse {
	animation: iconPulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes iconPulse {
	0%,
	100% {
		transform: scale(1);
		box-shadow:
			0 0 0 0 rgba(66, 153, 225, 0.4),
			0 0 0 0 rgba(66, 153, 225, 0.1);
	}
	50% {
		transform: scale(1.08);
		box-shadow:
			0 0 0 15px rgba(66, 153, 225, 0),
			0 0 0 30px rgba(66, 153, 225, 0);
	}
}

/* Modal Text Colors */
#modalTitle {
	color: var(--text-primary);
}

#modalSubtitle {
	color: var(--text-secondary);
}

#modalMessage {
	color: var(--text-primary);
}

.custom-modal-close {
	color: var(--text-secondary);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-close:hover {
	transform: rotate(180deg) scale(1.15);
	background: var(--error-gradient);
	color: white;
	box-shadow: 0 10px 20px -10px rgba(245, 101, 101, 0.4);
}

/* ==================== CAPTCHA SECTION ==================== */
.captcha-container {
	font-family: "Courier New", monospace;
	letter-spacing: 5px;
	font-weight: 900;
	text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
	background: var(--primary-gradient);
	color: white;
	padding: 1rem 1.5rem;
	border-radius: 12px;
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.refresh-captcha {
	background: var(--primary-gradient);
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.refresh-captcha:hover {
	background: var(--primary-gradient-hover);
	transform: translateY(-2px);
	box-shadow: 0 10px 20px -10px rgba(102, 126, 234, 0.3);
}

/* ==================== FORGOT PASSWORD MODAL ==================== */
#forgotPasswordModal {
	background: rgba(0, 0, 0, 0.5);
}

.dark #forgotPasswordModal {
	background: rgba(0, 0, 0, 0.7);
}

#forgotPasswordModal > div {
	background: var(--bg-primary);
	border: 1px solid var(--border-color);
	color: var(--text-primary);
}

/* ==================== LINKS ==================== */
a {
	color: #3b82f6;
	transition: color 0.2s ease;
}

.dark a {
	color: #60a5fa;
}

a:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.dark a:hover {
	color: #93c5fd;
}

/* ==================== THEME TOGGLE ==================== */
#themeToggle {
	backdrop-filter: blur(10px);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark #themeToggle {
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

#themeToggle:hover {
	transform: rotate(15deg) scale(1.1);
	background: rgba(255, 255, 255, 0.2);
	box-shadow:
		0 10px 25px -10px rgba(255, 255, 255, 0.2),
		0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dark #themeToggle:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* ==================== FORM SECTIONS ==================== */
.bg-gray-50 {
	background-color: var(--bg-tertiary);
}

.dark .bg-gray-50 {
	background-color: rgba(51, 65, 85, 0.5);
}

.border-gray-200 {
	border-color: var(--border-color);
}

/* ==================== TESTIMONIAL CARD ==================== */
.testimonial-card {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	color: white;
}

.testimonial-card:hover {
	transform: translateY(-5px);
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.3);
}

/* ==================== FORM VALIDATION ==================== */
.border-green-500 {
	border-color: #10b981 !important;
}

.border-red-500 {
	border-color: #ef4444 !important;
}

.dark .border-green-500 {
	border-color: #34d399 !important;
}

.dark .border-red-500 {
	border-color: #f87171 !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
	.login-container,
	.register-container {
		border-radius: 16px;
		margin: 1rem;
	}

	.custom-modal-content {
		margin: 1rem;
		width: calc(100% - 2rem);
	}

	.login-content,
	.register-content {
		padding: 1.5rem;
	}
}

/* ==================== SPINNER ANIMATION ==================== */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.fa-spinner {
	animation: spin 1s linear infinite;
}

/* ==================== UTILITY CLASSES ==================== */
/* .hidden {
	display: none !important;
} */

.flex {
	display: flex !important;
}

/* ==================== FORM GRID LAYOUT ==================== */
.grid {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.grid-cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==================== FORM ICONS ==================== */
.input-group {
	position: relative;
}

.input-group i {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	pointer-events: none;
}

.dark .input-group i {
	color: #64748b;
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
	background: var(--text-secondary);
	border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-primary);
}
