/* ============================================
   CLEAN & ELEGANT PANEL DESIGN - Black & White
   ============================================ */

/* Ultra Compact Panel Container - Very Small Width */
.panel {
	width: 240px !important; /* Much smaller - only for legend visibility */
	background: rgba(0, 0, 0, 0.95) !important;
	backdrop-filter: blur(20px) !important;
	-webkit-backdrop-filter: blur(20px) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-right: 2px solid rgba(255, 255, 255, 0.15) !important;
	box-shadow: 
		0 10px 40px rgba(0, 0, 0, 0.8),
		inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
	position: relative !important;
	overflow: hidden !important;
}

/* Subtle top accent */
.panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, 
		rgba(99, 102, 241, 0.8) 0%, 
		rgba(139, 92, 246, 0.8) 50%,
		rgba(236, 72, 153, 0.8) 100%);
	pointer-events: none;
}

/* Compact Panel Sections - Smaller Padding */
.panel-section {
	margin-bottom: 12px !important;
	padding: 14px !important;
	border-radius: 12px !important;
	background: rgba(255, 255, 255, 0.03) !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	position: relative;
	overflow: hidden;
	transition: all 0.3s ease !important;
}

/* Left accent line */
.panel-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: linear-gradient(180deg, 
		rgba(99, 102, 241, 0.8) 0%, 
		rgba(139, 92, 246, 0.8) 50%, 
		rgba(236, 72, 153, 0.8) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.panel-section:hover {
	background: rgba(255, 255, 255, 0.05) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	transform: translateX(4px) !important;
}

.panel-section:hover::before {
	opacity: 1;
}

/* Clean Section Titles */
.panel-section-title {
	color: rgba(255, 255, 255, 0.6) !important;
	margin-bottom: 10px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 2px !important;
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
}

.panel-section-title::before {
	content: '▸';
	color: rgba(99, 102, 241, 0.8);
	font-size: 10px;
}

/* Ultra Compact Section Body - Much Smaller Text */
.panel-section-body {
	font-size: 22px !important; /* Much smaller for compact panel */
	font-weight: 800 !important;
	line-height: 26px !important;
	color: rgba(255, 255, 255, 0.98) !important;
	letter-spacing: -1px !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Compact Text Elements - White */
.panel-date-text {
	font-size: 12px !important;
	line-height: 18px !important;
	color: rgba(255, 255, 255, 0.85) !important;
	font-weight: 600 !important;
	letter-spacing: 0.3px !important;
}

.panel-time-text {
	line-height: 28px !important;
	font-size: 24px !important;
	font-weight: 800 !important;
	color: rgba(255, 255, 255, 0.98) !important;
	letter-spacing: -0.5px !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

.panel-location-text {
	font-size: 13px !important;
	line-height: 18px !important;
	color: rgba(255, 255, 255, 0.95) !important;
	font-weight: 600 !important;
	letter-spacing: 0.2px !important;
}

/* Desktop Ultra Compact Experience */
@media screen and (min-width: 640px) {
	.panel {
		width: 260px !important; /* Much smaller for compact stats */
		left: 12px !important;
		top: 12px !important;
		max-height: calc(100% - 24px) !important;
		border-radius: 16px !important;
	}
	
	.panel-section {
		margin-bottom: 14px !important;
		padding: 16px !important;
		border-radius: 12px !important;
	}
	
	.panel-section-title {
		margin-bottom: 12px !important;
		font-size: 12px !important;
	}
	
	.panel-section-body {
		font-size: 24px !important; /* Much smaller for compact panel */
		line-height: 28px !important;
	}
	
	.panel-date-text {
		font-size: 13px !important;
		line-height: 19px !important;
	}
	
	.panel-time-text {
		line-height: 30px !important;
		font-size: 26px !important;
	}
	
	.panel-location-text {
		font-size: 14px !important;
		line-height: 20px !important;
	}
}

/* Add icon indicators */
.panel-section-title[data-icon]::before {
	content: attr(data-icon);
	font-size: 14px;
	margin-right: 4px;
}


/* Clean Scrollbar */
.panel::-webkit-scrollbar {
	width: 6px;
}

.panel::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 10px;
	margin: 10px 0;
}

.panel::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
}

.panel::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Smooth entrance animation */
.panel-section {
	animation: slide-in-up 0.4s ease backwards;
}

.panel-section:nth-child(1) { animation-delay: 0.05s; }
.panel-section:nth-child(2) { animation-delay: 0.1s; }
.panel-section:nth-child(3) { animation-delay: 0.15s; }
.panel-section:nth-child(4) { animation-delay: 0.2s; }
.panel-section:nth-child(5) { animation-delay: 0.25s; }

@keyframes slide-in-up {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Clean close button */
.close-button {
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	backdrop-filter: blur(10px) !important;
	transition: all 0.3s ease !important;
}

.close-button:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	border-color: rgba(255, 255, 255, 0.2) !important;
	transform: scale(1.05) !important;
}


/* ============================================
   ATLAS LOADER - Branding
   ============================================ */
#atlas-loader {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 99998;
	text-align: center;
	pointer-events: none;
	animation: atlas-fade-out 1s ease 2s forwards;
}

.atlas-logo {
	font-size: 72px;
	font-weight: 900;
	letter-spacing: 8px;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
	animation: atlas-glow 2s ease-in-out infinite;
	margin-bottom: 16px;
}

.atlas-subtitle {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 3px;
	color: rgba(255, 255, 255, 0.7);
	text-transform: uppercase;
	animation: atlas-pulse 2s ease-in-out infinite;
}

@keyframes atlas-glow {
	0%, 100% {
		filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
	}
	50% {
		filter: drop-shadow(0 0 40px rgba(99, 102, 241, 1));
	}
}

@keyframes atlas-pulse {
	0%, 100% {
		opacity: 0.7;
	}
	50% {
		opacity: 1;
	}
}

@keyframes atlas-fade-out {
	to {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.2);
	}
}

/* Hide ATLAS loader when page is loaded */
body.loaded #atlas-loader {
	display: none;
}

@media screen and (max-width: 640px) {
	.atlas-logo {
		font-size: 48px;
		letter-spacing: 6px;
	}
	
	.atlas-subtitle {
		font-size: 11px;
		letter-spacing: 2px;
	}
}


/* ============================================
   SYSTEM STATUS WIDGET - Always Visible
   ============================================ */
.system-widget {
	position: fixed;
	top: 80px;
	right: 16px;
	width: 280px;
	background: rgba(0, 0, 0, 0.95);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	z-index: 1000;
	transition: all 0.3s ease;
	pointer-events: auto;
	display: block !important;
	animation: slide-in-right 0.5s ease;
}

@keyframes slide-in-right {
	from {
		opacity: 0;
		transform: translateX(100px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.system-widget.collapsed {
	width: 200px;
}

.widget-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	cursor: pointer;
}

.widget-title {
	font-size: 13px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
	letter-spacing: 0.5px;
}

.widget-toggle {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	font-size: 10px;
	cursor: pointer;
	padding: 4px 8px;
	transition: all 0.3s ease;
}

.widget-toggle:hover {
	color: rgba(255, 255, 255, 1);
	transform: scale(1.2);
}

.widget-body {
	padding: 12px;
}

.widget-section {
	margin-bottom: 16px;
}

.widget-section:last-child {
	margin-bottom: 0;
}

.widget-label {
	font-size: 10px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.widget-value {
	font-size: 24px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.95);
	line-height: 1;
}

.widget-value.small {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
}

/* Source Indicators */
.source-indicators {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.source-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	transition: all 0.3s ease;
}

.source-item:hover {
	background: rgba(255, 255, 255, 0.06);
}

.source-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transition: all 0.3s ease;
}

.source-dot.active {
	background: #10b981;
	box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
	animation: pulse-green 2s ease-in-out infinite;
}

.source-dot.offline {
	background: #ef4444;
	box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.source-dot.unknown {
	background: #f59e0b;
	box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

@keyframes pulse-green {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.7; transform: scale(1.2); }
}

.source-name {
	flex: 1;
	font-size: 12px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
}

.source-count {
	font-size: 14px;
	font-weight: 700;
	color: rgba(99, 102, 241, 0.9);
	min-width: 24px;
	text-align: right;
}

/* Mobile Responsive */
@media screen and (max-width: 640px) {
	.system-widget {
		top: auto;
		bottom: 80px;
		right: 10px;
		width: 240px;
	}
	
	.system-widget.collapsed {
		width: 180px;
	}
	
	.widget-header {
		padding: 10px 12px;
	}
	
	.widget-title {
		font-size: 12px;
	}
	
	.widget-body {
		padding: 10px;
	}
	
	.widget-value {
		font-size: 20px;
	}
	
	.widget-value.small {
		font-size: 11px;
	}
}
