/* 🌌 ENHANCED GLASSMORPHISM THEME 🌌 */

/* ============================================
   BACKGROUND
   ============================================ */

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

body {
	background: url('https://images2.alphacoders.com/135/1354185.jpeg') no-repeat center center fixed !important;
	background-size: cover !important;
	position: relative;
	font-family: "Inter", sans-serif !important;
	overflow-x: hidden;
	margin: 0;
	padding: 0;
}

/* Subtle overlay to darken background slightly */
body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
	pointer-events: none;
	z-index: 0;
}

/* Subtle dot pattern overlay for depth */
body::after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
	background-size: 30px 30px;
	pointer-events: none;
	z-index: 0;
	opacity: 0.3;
}

/* ============================================
   GLASSMORPHIC CARDS
   ============================================ */

/* Animated gradient border effect */
@keyframes borderGlow {
	0%, 100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

/* Target Homepage's actual service cards */
div[class*="services"] > div > div {
	background: rgba(255, 255, 255, 0.07) !important;
	backdrop-filter: blur(20px) saturate(180%) !important;
	-webkit-backdrop-filter: blur(20px) saturate(180%) !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	border-radius: 18px !important;
	box-shadow:
		0 6px 24px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
	padding: 18px !important;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
	position: relative !important;
	cursor: pointer !important;
	overflow: hidden;
	min-height: 120px;
	display: flex;
	flex-direction: column;
}

/* Animated gradient border on hover */
div[class*="services"] > div > div::before {
	content: "";
	position: absolute;
	top: -2px;
	left: -2px;
	right: -2px;
	bottom: -2px;
	background: linear-gradient(
		60deg,
		rgba(40, 150, 203, 0),
		rgba(40, 150, 203, 0.4),
		rgba(100, 200, 255, 0.4),
		rgba(40, 150, 203, 0)
	);
	background-size: 300% 300%;
	border-radius: 20px;
	opacity: 0;
	z-index: -1;
	transition: opacity 0.5s ease;
	animation: borderGlow 3s ease infinite;
}

div[class*="services"] > div > div:hover::before {
	opacity: 1;
}

div[class*="services"] > div > div:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(40, 150, 203, 0.5) !important;
	transform: translateY(-4px) scale(1.02) !important;
	box-shadow:
		0 16px 50px rgba(0, 0, 0, 0.5),
		0 0 40px rgba(40, 150, 203, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.15),
		inset 0 -1px 0 rgba(0, 0, 0, 0.15) !important;
	z-index: 10 !important;
}

/* Rotate and scale icons/logos on hover */
div[class*="services"] > div > div:hover svg,
div[class*="services"] > div > div:hover img {
	transform: rotate(8deg) scale(1.15) !important;
	filter: drop-shadow(0 4px 12px rgba(40, 150, 203, 0.5)) !important;
}

svg,
img {
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Loading shimmer animation */
@keyframes shimmer {
	0% {
		background-position: -1000px 0;
	}
	100% {
		background-position: 1000px 0;
	}
}

/* Widget containers */
div[class*="information"],
div[class*="widget"] {
	background: rgba(255, 255, 255, 0.08) !important;
	backdrop-filter: blur(25px) saturate(180%) !important;
	-webkit-backdrop-filter: blur(25px) saturate(180%) !important;
	border: 1px solid rgba(255, 255, 255, 0.18) !important;
	border-radius: 16px !important;
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
	padding: 16px !important;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
	position: relative;
	overflow: hidden;
}

/* Shimmer effect for loading states */
div[class*="information"]::after,
div[class*="widget"]::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.05),
		transparent
	);
	background-size: 1000px 100%;
	animation: shimmer 3s infinite;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

div[class*="information"].loading::after,
div[class*="widget"].loading::after {
	opacity: 1;
}

div[class*="information"]:hover,
div[class*="widget"]:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(40, 150, 203, 0.5) !important;
	box-shadow:
		0 12px 45px rgba(0, 0, 0, 0.45),
		0 0 30px rgba(40, 150, 203, 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
	transform: translateY(-2px);
}

/* Pulse animation for active elements */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* Make top widgets row flow better - enhanced header */
header,
[class*="header"] {
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.09) 0%,
		rgba(255, 255, 255, 0.04) 100%
	) !important;
	backdrop-filter: blur(30px) saturate(180%) !important;
	-webkit-backdrop-filter: blur(30px) saturate(180%) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
	border-radius: 0 0 20px 20px !important;
	padding: 16px 28px !important;
	margin-bottom: 28px !important;
	box-shadow:
		0 6px 24px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
	position: relative;
}

/* Subtle top accent line */
header::before,
[class*="header"]::before {
	content: "";
	position: absolute;
	top: 0;
	left: 10%;
	right: 10%;
	height: 2px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(40, 150, 203, 0.5),
		transparent
	);
	border-radius: 2px;
}

/* System info widgets in header - compact single row */
header > div,
[class*="header"] > div {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	align-items: center !important;
	justify-content: flex-start !important;
}

/* Individual system widgets - more compact */
header > div > div,
[class*="header"] > div > div {
	background: rgba(255, 255, 255, 0.05) !important;
	backdrop-filter: blur(15px) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: 12px !important;
	padding: 8px 14px !important;
	font-size: 0.85rem !important;
	transition: all 0.25s ease !important;
}

header > div > div:hover,
[class*="header"] > div > div:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	transform: translateY(-1px);
}

/* System widget group styling (if using grouped system stats) */
div[class*="System"] {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 10px !important;
	background: rgba(255, 255, 255, 0.05) !important;
	backdrop-filter: blur(20px) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: 14px !important;
	padding: 10px 16px !important;
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
	transition: all 0.25s ease !important;
}

div[class*="System"]:hover {
	background: rgba(255, 255, 255, 0.07) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	box-shadow:
		0 6px 20px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   CLEAN INNER ELEMENTS
   ============================================ */

/* Remove default inner borders and backgrounds */
div[class*="services"] > div > div > * {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
	color: #ffffff !important;
	font-weight: 600 !important;
	font-size: 1.1rem !important;
	margin: 0 0 12px 0 !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
	letter-spacing: 0.5px !important;
	font-family: "Inter", sans-serif !important;
}

/* Group titles with enhanced styling */
div[class*="services"] > h2,
h2[class*="text"] {
	color: #ffffff !important;
	font-size: 1.4rem !important;
	font-weight: 700 !important;
	margin: 0 0 24px 0 !important;
	padding: 0 0 12px 20px !important;
	text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
	position: relative !important;
	letter-spacing: 0.5px !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Cool accent bar before section titles */
div[class*="services"] > h2::before,
h2[class*="text"]::before {
	content: "" !important;
	position: absolute !important;
	left: 0 !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 4px !important;
	height: 60% !important;
	background: linear-gradient(
		180deg,
		rgba(40, 150, 203, 0.9),
		rgba(100, 200, 255, 0.7)
	) !important;
	border-radius: 2px !important;
	box-shadow: 0 0 10px rgba(40, 150, 203, 0.5) !important;
}

/* Accent color for icons and highlights */
svg,
i,
[class*="icon"] {
	color: #2896cb !important;
	filter: drop-shadow(0 2px 4px rgba(40, 150, 203, 0.3)) !important;
}

/* Text content */
p,
span:not([class*="icon"]),
div {
	color: rgba(255, 255, 255, 0.9) !important;
	font-size: 0.95rem !important;
	line-height: 1.6 !important;
}

/* Stats and metrics */
[class*="stat"],
[class*="metric"],
[class*="information"] {
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
}

/* Links */
a {
	color: #2896cb !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

a:hover {
	color: #4db8e8 !important;
}

/* Buttons */
button,
[role="button"] {
	background: rgba(40, 150, 203, 0.2) !important;
	border: 1px solid rgba(40, 150, 203, 0.4) !important;
	color: #ffffff !important;
	border-radius: 8px !important;
	padding: 8px 16px !important;
	transition: all 0.2s ease !important;
}

button:hover,
[role="button"]:hover {
	background: rgba(40, 150, 203, 0.3) !important;
	border-color: rgba(40, 150, 203, 0.6) !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(40, 150, 203, 0.5);
}

/* ============================================
   IMPROVED ERROR STATES
   ============================================ */

/* Error containers - minimal styling */
[class*="error"],
[class*="information-widget-error"],
[class*="api-error"],
div[class*="Error"] {
	background: rgba(220, 53, 69, 0.08) !important;
	border: 1px solid rgba(220, 53, 69, 0.2) !important;
	border-radius: 8px !important;
	padding: 8px 12px !important;
	margin: 6px 0 !important;
	backdrop-filter: blur(10px) !important;
	font-size: 0.8rem !important;
}

/* Error text styling - more subtle */
span[class*="error"],
[class*="error"] span {
	color: rgba(255, 120, 120, 0.7) !important;
	font-size: 0.8rem !important;
	font-weight: 400 !important;
}

/* Error icons - more subtle */
[class*="error"] svg,
[class*="error"] i {
	color: rgba(220, 53, 69, 0.6) !important;
	width: 14px !important;
	height: 14px !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
	header,
	[class*="header"] {
		padding: 16px 24px !important;
	}

	div[class*="System"] {
		gap: 10px !important;
		padding: 10px 14px !important;
	}
}

@media (max-width: 768px) {
	body::after {
		background-size: 20px 20px !important;
	}

	header,
	[class*="header"] {
		padding: 12px 16px !important;
		border-radius: 0 0 16px 16px !important;
		margin-bottom: 20px !important;
	}

	header > div,
	[class*="header"] > div {
		gap: 8px !important;
		justify-content: center !important;
	}

	header > div > div,
	[class*="header"] > div > div {
		padding: 6px 10px !important;
		font-size: 0.8rem !important;
	}

	main {
		padding: 16px !important;
	}

	div[class*="services"] > div {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	div[class*="services"] > div > div {
		padding: 16px !important;
		border-radius: 16px !important;
	}

	div[class*="services"] {
		margin-bottom: 32px !important;
	}

	div[class*="services"] > h2,
	h2[class*="text"] {
		font-size: 1.2rem !important;
		padding: 0 0 10px 16px !important;
		margin-bottom: 16px !important;
	}

	div[class*="System"] {
		gap: 8px !important;
		padding: 8px 12px !important;
		flex-wrap: wrap !important;
	}
}

/* ============================================
   HOMEPAGE SPECIFIC OVERRIDES
   ============================================ */

/* Don't override Homepage's layout - let it handle grid naturally */
main {
	padding: 28px 36px !important;
	position: relative !important;
	z-index: 1 !important;
	max-width: 100%;
	min-height: 100vh;
}

/* Service groups spacing */
div[class*="services"] {
	margin-bottom: 48px !important;
}

/* Status indicators for online/offline services */
div[class*="services"] > div > div[class*="online"]::after,
div[class*="service"]:has(div:not([class*="error"]))::after {
	content: "";
	position: absolute;
	top: 18px;
	right: 18px;
	width: 8px;
	height: 8px;
	background: rgba(76, 175, 80, 0.9);
	border-radius: 50%;
	box-shadow:
		0 0 8px rgba(76, 175, 80, 0.8),
		0 0 16px rgba(76, 175, 80, 0.4);
	animation: pulse 2s ease-in-out infinite;
}

/* Fix grid layout - Homepage uses its own grid system */
div[class*="services"] > div {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
	gap: 24px !important;
	width: 100% !important;
}

/* Ensure cards don't exceed container */
div[class*="services"] > div > div {
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Better spacing between service stats */
div[class*="services"] > div > div > div {
	margin-top: 12px !important;
}

/* Fix for specific sections with different column counts */
div[class*="services"]:has(> h2:first-child) > div {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
}

/* Search bar - enhanced */
input[type="text"],
input[type="search"] {
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-radius: 16px !important;
	color: #ffffff !important;
	padding: 14px 20px !important;
	backdrop-filter: blur(25px) saturate(180%) !important;
	font-size: 0.95rem !important;
	font-weight: 500 !important;
	transition: all 0.3s ease !important;
	box-shadow:
		0 4px 20px rgba(0, 0, 0, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

input[type="text"]::placeholder,
input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
}

input[type="text"]:focus,
input[type="search"]:focus {
	outline: none !important;
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(40, 150, 203, 0.7) !important;
	box-shadow:
		0 0 30px rgba(40, 150, 203, 0.3),
		0 4px 24px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
	transform: translateY(-2px);
}

/* Slow moving scan line effect for extra flair */
@keyframes scanline {
	0% {
		transform: translateY(-100%);
	}
	100% {
		transform: translateY(100vh);
	}
}

body::after {
	animation: scanline 8s linear infinite;
}
