* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: #00111a;
	color: #e2e8f0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	overflow-x: hidden;
	user-select: none;
	-webkit-user-select: none;
}

.matrix-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1200px;
	min-height: 100vh;
	margin: 0 auto;
	padding: 16px;
}

/* Toolbar Header */
.matrix-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #021827;
	border: 1px solid #0a2d42;
	border-radius: 8px 8px 0 0;
	padding: 10px 16px;
}

.matrix-branding {
	display: flex;
	align-items: center;
	gap: 10px;
}

.live-indicator {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #10b981;
	box-shadow: 0 0 8px #10b981;
}

.live-indicator.inactive {
	background-color: #64748b;
	box-shadow: none;
}

.matrix-title {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.2px;
}

.matrix-tag {
	background-color: #002b40;
	color: #38bdf8;
	font-size: 10px;
	font-family: monospace;
	padding: 2px 6px;
	border-radius: 4px;
	border: 1px solid #0284c7;
}

.matrix-controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.control-group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.control-label {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
}

.matrix-select {
	background-color: #001c2b;
	border: 1px solid #003b59;
	color: #f1f5f9;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 4px;
	cursor: pointer;
	outline: none;
}

.matrix-select:focus {
	border-color: #38bdf8;
}

.date-stepper {
	display: flex;
	align-items: center;
	background-color: #001c2b;
	border: 1px solid #003b59;
	border-radius: 4px;
	overflow: hidden;
}

.date-btn {
	background: none;
	border: none;
	color: #94a3b8;
	padding: 4px 8px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.date-btn:hover:not(:disabled) {
	background-color: #00334d;
	color: #ffffff;
}

.date-btn:disabled {
	color: #334155;
	cursor: not-allowed;
}

.date-display {
	font-family: monospace;
	font-size: 11px;
	color: #f59e0b;
	padding: 0 6px;
	white-space: nowrap;
}

/* Main Viewport Stage */
.matrix-stage {
	position: relative;
	width: 100%;
	height: calc(100vh - 120px);
	min-height: 480px;
	background-color: #001826;
	border-left: 1px solid #0a2d42;
	border-right: 1px solid #0a2d42;
	overflow: hidden;
}

.matrix-svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* SVG Elements & Transitions */
.trail-path {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke-width 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
}

.trail-path:hover {
	stroke-width: 4px !important;
	opacity: 1 !important;
}

.game-orb-node {
	cursor: grab;
	transition: transform 0.1s ease-out;
}

.game-orb-node:active {
	cursor: grabbing;
}

@keyframes pulse-ring {
	0%, 100% {
		transform: scale(1);
		opacity: 0.3;
	}
	50% {
		transform: scale(1.4);
		opacity: 0.6;
	}
}

.orb-pulse {
	animation: pulse-ring 2s infinite ease-in-out;
	transform-origin: center;
}

/* GameDetails Floating Card */
.game-details-card {
	position: absolute;
	width: 240px;
	background-color: rgba(3, 23, 38, 0.94);
	border: 1px solid #0c4a6e;
	border-radius: 8px;
	padding: 10px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	pointer-events: none;
	z-index: 50;
	transition: opacity 0.15s ease;
}

.game-details-card.hidden {
	display: none;
}

.card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #0a3750;
	padding-bottom: 6px;
	margin-bottom: 8px;
}

.card-sport {
	font-family: monospace;
	font-weight: 700;
	font-size: 11px;
	color: #38bdf8;
}

.card-timeleft {
	font-weight: 600;
	font-size: 11px;
	color: #cbd5e1;
}

.card-airing-badge {
	background-color: #dc2626;
	color: #ffffff;
	font-size: 9px;
	font-weight: 900;
	padding: 1px 4px;
	border-radius: 3px;
	letter-spacing: 0.5px;
}

.card-matchup {
	display: flex;
	align-items: center;
	justify-content: space-around;
	background-color: rgba(0, 17, 26, 0.7);
	border: 1px solid #082f49;
	border-radius: 6px;
	padding: 6px 4px;
	margin-bottom: 8px;
}

.team-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 45%;
}

.team-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.team-initials {
	font-weight: 700;
	font-size: 12px;
	color: #f1f5f9;
}

.team-score {
	font-family: monospace;
	font-size: 20px;
	font-weight: 800;
	color: #fbbf24;
}

.vs-divider {
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 10px;
	color: #94a3b8;
}

.points-badge {
	font-family: monospace;
	font-weight: 800;
	font-size: 10px;
	color: #ffffff;
	padding: 2px 6px;
	border-radius: 3px;
}

.card-headline {
	font-size: 10px;
	color: #94a3b8;
	font-style: italic;
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid #0a3750;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.scrub-active-hint {
	font-family: monospace;
	font-size: 9px;
	color: #38bdf8;
	text-align: center;
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px dashed #0c4a6e;
}

/* Empty State / Message Dialog */
.matrix-dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: rgba(2, 24, 39, 0.96);
	border: 1px solid #0284c7;
	border-radius: 10px;
	padding: 24px;
	width: 90%;
	max-width: 420px;
	text-align: center;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
	z-index: 40;
}

.matrix-dialog.hidden {
	display: none;
}

.dialog-title {
	font-size: 20px;
	font-weight: 800;
	color: #ffffff;
	margin-bottom: 8px;
}

.dialog-message {
	font-size: 13px;
	color: #cbd5e1;
	line-height: 1.5;
}

.dialog-message a {
	color: #38bdf8;
	text-decoration: underline;
}

/* Footer / Legend */
.matrix-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #021827;
	border: 1px solid #0a2d42;
	border-radius: 0 0 8px 8px;
	padding: 8px 16px;
	font-size: 11px;
	color: #94a3b8;
}

.legend-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 4px;
}

.legend-swatch {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

.footer-instruction {
	font-family: monospace;
	font-size: 10px;
	color: #38bdf8;
}

@media (max-width: 768px) {
	.matrix-header {
		flex-direction: column;
		gap: 8px;
		align-items: flex-start;
	}
	.matrix-footer {
		flex-direction: column;
		gap: 6px;
		align-items: flex-start;
	}
}
