@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap&text=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz%20");

:root {
	/* Primary UI colors from AppUIColors.light */
	--primary-color: #1751d0; /* Blue primary */
	--primary-light: #ebf0fb; /* Lighter blue */
	--primary-dark: #0e3ba7; /* Darker blue */
	--secondary-color: #6941c6; /* Purple secondary */
	--error-color: #e53935; /* Red for errors */
	--success-color: #2e7d32; /* Green for success */
	--warning-color: #f57c00; /* Orange for warnings */

	/* Background and surface colors from AppNeutralColors.light */
	--background-color: #f8f9fc; /* Light background with blue tint */
	--card-bg: #ffffff; /* Pure white */
	--light-blue: #ebf0fb; /* Lighter blue matching primaryLight */
	--surface-color: #f5f5f5; /* grey100 from AppNeutralColors */

	/* Text colors from AppNeutralColors.light */
	--text-color: #212121; /* grey900 */
	--text-secondary-color: #616161; /* grey700 */
	--text-disabled: #9e9e9e; /* grey500 */

	/* Accent colors */
	--accent-blue: #3b82f6;

	/* Effect colors */
	--progress-bg: rgba(23, 81, 208, 0.05);
	--progress-shimmer: rgba(255, 255, 255, 0.8);
	--feature-icon-bg: rgba(23, 81, 208, 0.1);

	/* Status background colors */
	--status-info-bg: #ebf0fb; /* statusInfoBackground */
	--status-success-bg: #e1faea; /* statusSuccessBackground */
	--status-error-bg: #fff3e0; /* statusErrorBackground */
}

@media (prefers-color-scheme: dark) {
	:root {
		/* Primary UI colors from AppUIColors.dark */
		--primary-color: #4d89f0; /* More vibrant blue for dark mode */
		--primary-light: #2a4d89; /* Darker blue for dark mode */
		--primary-dark: #2967d1; /* Richer dark blue for dark mode */
		--secondary-color: #9d7fea; /* More vibrant purple for dark mode */
		--error-color: #f55753; /* Brighter red for dark mode */
		--success-color: #43c566; /* More vibrant green for dark mode */
		--warning-color: #ffa726; /* Warmer orange for dark mode */

		/* Background and surface colors from AppNeutralColors.dark */
		--background-color: #1f1f1f; /* Teams-like dark background */
		--card-bg: #2d2d2d; /* Surface color (grey200) */
		--light-blue: #122340; /* Dark blue background */
		--surface-color: #242424; /* grey100 from dark theme */

		/* Text colors from AppNeutralColors.dark */
		--text-color: #e3e3e3; /* grey800 */
		--text-secondary-color: #a1a1a1; /* grey600 */
		--text-disabled: #858585; /* grey500 */

		/* Accent colors */
		--accent-blue: #4d89f0;

		/* Effect colors */
		--progress-bg: rgba(77, 137, 240, 0.1);
		--progress-shimmer: rgba(255, 255, 255, 0.3);
		--feature-icon-bg: rgba(77, 137, 240, 0.2);

		/* Status background colors */
		--status-info-bg: #122340; /* Dark blue background */
		--status-success-bg: #0e2317; /* Dark green background */
		--status-error-bg: #2d1212; /* Dark red background */
	}
}

body {
	margin: 0;
	padding: 0;
	font-family: "Roboto", sans-serif;
	background: var(--background-color);
	height: 100vh;
	overflow: hidden;
	opacity: 0;
	animation: fadeIn 0.5s ease-out forwards;
	color: var(--text-color);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.loading-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100vh;
	width: 100vw;
	position: relative;
	overflow: hidden;
	padding: 20px;
	box-sizing: border-box;
}

.content-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 1;
	width: 100%;
	max-width: 500px;
}

/* Background ambient elements */
.ambient-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: 0.4;
}

.ambient-circle {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(
		circle,
		var(--primary-light) 0%,
		rgba(59, 130, 246, 0) 70%
	);
	animation: float 15s infinite ease-in-out;
}

.circle-1 {
	width: 300px;
	height: 300px;
	top: -150px;
	left: -100px;
}

.circle-2 {
	width: 400px;
	height: 400px;
	bottom: -200px;
	right: -100px;
	animation-delay: -5s;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-15px) translateX(15px);
	}
}

.app-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 25px;
	opacity: 0;
	transform: translateY(20px);
	animation: titleAppear 0.8s ease-out 0.3s forwards;
	position: relative;
}

.app-title::after {
	content: "";
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	animation: titleUnderline 0.6s ease-out 1.1s forwards;
}

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

@keyframes titleUnderline {
	from {
		width: 0;
	}
	to {
		width: 40px;
	}
}

.tagline {
	font-size: 14px;
	color: var(--text-secondary-color);
	margin-bottom: 40px;
	text-align: center;
	max-width: 280px;
	opacity: 0;
	animation: fadeIn 1s ease-out 0.8s forwards;
}

.logo-container {
	position: relative;
	width: 64px;
	height: 64px;
	margin-bottom: 30px;
	opacity: 0;
	transform: scale(0.8);
	animation: logoAppear 0.8s ease-out forwards;
}

@keyframes logoAppear {
	0% {
		opacity: 0;
		transform: scale(0.8) rotate(-10deg);
	}
	100% {
		opacity: 1;
		transform: scale(1) rotate(0deg);
	}
}

.logo-pulse {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: radial-gradient(
		circle,
		rgba(var(--primary-color-rgb), 0.2) 0%,
		rgba(var(--primary-color-rgb), 0) 70%
	);
	animation: pulse 2s infinite;
}

/* Multiple pulse effects with different sizes and timing */
.logo-pulse-outer {
	position: absolute;
	top: -15%;
	left: -15%;
	width: 130%;
	height: 130%;
	border-radius: 50%;
	background: radial-gradient(
		circle,
		rgba(var(--primary-color-rgb), 0.1) 0%,
		rgba(var(--primary-color-rgb), 0) 70%
	);
	animation: pulse 2.5s infinite 0.3s;
}

@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: scale(2);
		opacity: 0;
	}
}

.progress-container {
	width: 180px;
	height: 4px;
	background-color: var(--progress-bg);
	border-radius: 8px;
	overflow: hidden;
	margin-top: 16px;
	position: relative;
}

.progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(
		to right,
		rgba(var(--primary-color-rgb), 0.6),
		var(--primary-color)
	);
	border-radius: 8px;
	position: relative;
	animation: progressGrow 4s ease-out forwards;
}

.progress-shimmer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent 0%,
		var(--progress-shimmer) 50%,
		transparent 100%
	);
	animation: shimmer 1.5s infinite;
}

.progress-text {
	font-size: 13px;
	color: var(--primary-color);
	margin-top: 12px;
	opacity: 0.8;
	font-weight: 500;
	letter-spacing: 1px;
}

/* Loading dots animation */
.loading-dots {
	display: inline-flex;
	margin-left: 4px;
}

.dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: var(--primary-color);
	margin: 0 2px;
	opacity: 0.8;
}

.dot:nth-child(1) {
	animation: dotPulse 1.5s infinite 0s;
}

.dot:nth-child(2) {
	animation: dotPulse 1.5s infinite 0.2s;
}

.dot:nth-child(3) {
	animation: dotPulse 1.5s infinite 0.4s;
}

@keyframes dotPulse {
	0%,
	100% {
		transform: scale(0.8);
		opacity: 0.6;
	}
	50% {
		transform: scale(1.2);
		opacity: 1;
	}
}

/* Feature icons that appear one by one */
.feature-icons {
	display: flex;
	justify-content: center;
	margin-top: 30px;
	opacity: 0;
	animation: fadeIn 0.8s ease-out 1.2s forwards;
}

.feature-icon {
	width: 32px;
	height: 32px;
	background-color: var(--feature-icon-bg);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 8px;
	transform: scale(0);
	animation: iconPop 0.5s ease-out forwards;
}

.feature-icon svg {
	width: 16px;
	height: 16px;
	fill: var(--primary-color);
}

.feature-icon:nth-child(1) {
	animation-delay: 1.3s;
}

.feature-icon:nth-child(2) {
	animation-delay: 1.5s;
}

.feature-icon:nth-child(3) {
	animation-delay: 1.7s;
}

@keyframes iconPop {
	0% {
		transform: scale(0);
	}
	100% {
		transform: scale(1);
	}
}

/* New styles for smoother transitions */
.loading-container.ready-for-flutter {
	animation: containerPrepare 0.6s ease-out forwards;
}

@keyframes containerPrepare {
	to {
		background-color: var(--light-blue);
	}
}

.flutter-transition-complete {
	opacity: 0;
	transition: opacity 0.8s ease-out;
}

/* Error message styles */
.error-card {
	background: white;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 80, 179, 0.12);
	max-width: 450px;
	width: 90%;
	text-align: center;
	animation: errorAppear 0.5s ease-out forwards;
}

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

.error-button {
	padding: 14px 32px;
	background: #0050b3;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 80, 179, 0.2);
}

.error-button:hover {
	background: #1751d0;
	box-shadow: 0 6px 16px rgba(0, 80, 179, 0.3);
	transform: translateY(-1px);
}

.error-button:active {
	transform: translateY(1px);
	box-shadow: 0 2px 8px rgba(0, 80, 179, 0.2);
}

.error-icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 24px;
	background-color: rgba(0, 80, 179, 0.08);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.error-title {
	color: #0050b3;
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 16px;
}

.error-message {
	color: #5a6a85;
	line-height: 1.6;
	margin-bottom: 32px;
}

.error-footer {
	margin-top: 32px;
	font-size: 13px;
	color: #828fa3;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
	.ambient-circle.circle-1 {
		width: 200px;
		height: 200px;
	}

	.ambient-circle.circle-2 {
		width: 250px;
		height: 250px;
	}

	.feature-icon {
		width: 28px;
		height: 28px;
		margin: 0 6px;
	}

	.feature-icon svg {
		width: 14px;
		height: 14px;
	}

	.error-card {
		padding: 30px;
		width: 85%;
	}
}

@media (max-width: 480px) {
	.logo-container {
		width: 56px;
		height: 56px;
		margin-bottom: 24px;
	}

	.progress-container {
		width: 160px;
	}

	.ambient-circle.circle-1 {
		width: 180px;
		height: 180px;
	}

	.ambient-circle.circle-2 {
		width: 220px;
		height: 220px;
	}

	.feature-icon {
		width: 24px;
		height: 24px;
		margin: 0 5px;
	}

	.feature-icon svg {
		width: 12px;
		height: 12px;
	}

	.app-title {
		font-size: 20px;
		margin-bottom: 18px;
	}

	.tagline {
		font-size: 12px;
		margin-bottom: 30px;
		max-width: 240px;
	}

	.error-card {
		padding: 24px;
		width: 90%;
	}

	.error-icon {
		width: 60px;
		height: 60px;
		margin-bottom: 20px;
	}

	.error-icon svg {
		width: 28px;
		height: 28px;
	}

	.error-title {
		font-size: 20px;
		margin-bottom: 12px;
	}

	.error-message {
		font-size: 14px;
		margin-bottom: 24px;
	}

	.error-button {
		padding: 12px 24px;
		font-size: 14px;
	}

	.error-footer {
		margin-top: 24px;
		font-size: 12px;
	}
}

@media (max-width: 360px) {
	.progress-container {
		width: 140px;
	}

	.logo-container {
		width: 48px;
		height: 48px;
	}

	.feature-icons {
		margin-top: 20px;
	}

	.feature-icon {
		width: 20px;
		height: 20px;
		margin: 0 4px;
	}

	.error-card {
		padding: 20px;
		width: 95%;
	}

	.error-icon {
		width: 50px;
		height: 50px;
	}

	.error-icon svg {
		width: 24px;
		height: 24px;
	}

	.error-button {
		padding: 10px 20px;
	}
}

@keyframes shimmer {
	from {
		transform: translateX(-100%);
	}
	to {
		transform: translateX(100%);
	}
}

@keyframes progressGrow {
	0% {
		width: 0%;
	}
	50% {
		width: 50%;
	}
	100% {
		width: 90%;
	}
}

#flutter_target {
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

/* ===== Smart App Banner ===== */
.smart-app-banner {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(100%);
	background: white;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
	z-index: 9999;
	padding: 16px 24px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 20px;
	border-radius: 12px;
	max-width: 90vw;
	width: auto;
	opacity: 0;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.smart-app-banner--visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

.smart-app-banner--hiding {
	transform: translateX(-50%) translateY(100%);
	opacity: 0;
}

.smart-app-banner__content {
	display: flex;
	align-items: center;
	gap: 12px;
}

.smart-app-banner__logo {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.smart-app-banner__text {
	flex: 1;
}

.smart-app-banner__text p {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	color: var(--text-color);
	white-space: nowrap;
}

.smart-app-banner__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 16px;
}

.smart-app-banner__remember {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
	color: var(--text-secondary-color);
	user-select: none;
	white-space: nowrap;
}

.smart-app-banner__remember input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--primary-color);
	cursor: pointer;
}

.smart-app-banner__buttons {
	display: flex;
	gap: 10px;
}

.smart-app-banner__btn {
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border: none;
	font-family: inherit;
	white-space: nowrap;
}

.smart-app-banner__btn--primary {
	background: var(--primary-color);
	color: white;
}

.smart-app-banner__btn--primary:hover {
	background: var(--primary-dark);
}

.smart-app-banner__btn--secondary {
	background: transparent;
	color: var(--primary-color);
	border: 1px solid var(--primary-color);
}

.smart-app-banner__btn--secondary:hover {
	background: var(--primary-light);
}

/* Responsive layout */
@media (max-width: 768px) {
	.smart-app-banner {
		flex-direction: column;
		gap: 12px;
		padding: 14px 18px;
		max-width: 95vw;
	}

	.smart-app-banner__content {
		width: 100%;
		justify-content: center;
	}

	.smart-app-banner__text p {
		font-size: 14px;
		white-space: normal;
		text-align: center;
	}

	.smart-app-banner__actions {
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}

	.smart-app-banner__buttons {
		width: 100%;
		flex-direction: row;
	}

	.smart-app-banner__btn {
		flex: 1;
	}

	.smart-app-banner__remember {
		justify-content: center;
	}
}
