/* File Upload Styles */
.file-upload-section {
	margin: 20px auto;
	max-width: 800px;
	padding: 0 20px;
}

.upload-container {
	border: 2.5px double #444;
	padding: 30px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
}

.upload-area {
	border: 3px dashed #3498db;
	padding: 40px 20px;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
	background: rgba(52, 152, 219, 0.05);
}

.upload-area:hover {
	border-color: #2980b9;
	background: rgba(52, 152, 219, 0.1);
	transform: translateY(-2px);
}

.upload-area.drag-over {
	border-color: #27ae60;
	background: rgba(46, 204, 113, 0.1);
	transform: scale(1.02);
}

.upload-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.upload-icon {
	color: #3498db;
	opacity: 0.7;
}

/* Timeline Synchronization Styles */
.time-range-highlight {
	pointer-events: none !important;
	transition: all 0.3s ease;
}

.time-range-legend {
	pointer-events: none;
}

.timeline-sync-indicator {
	padding: 8px 12px;
	margin: 5px 0;
	transition: all 0.2s ease;
	gap: 0;
	background: #0008;
}

.timeline-sync-indicator.active {
	background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(155, 89, 182, 0.2));
	border-color: rgba(52, 152, 219, 0.5);
	box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

/* Timeline Controls */
.timeline-controls {
	display: flex;

	font-size: 12px;
	width: 100%;
	box-sizing: border-box;
	justify-content: space-evenly;
}

.timeline-controls label {
	margin-right: 3px;
}

.timeline-controls button {
	padding: 2px 6px;
	cursor: pointer;
	font-size: 10px;
	height: 18px;
}

.timeline-controls input {
	height: 16px;
	padding: 1px 3px;
	font-size: 10px;
}

#timelineRange {
	width: 100%;
}

#timelineRangeSlider {
	float: left;
	width: 95%;
}

/* Override chart-container for timeline - make it flex container */


#timelineChart {
	overflow-x: scroll;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	height: auto;
}

#timelineChart svg {
	margin: auto;
}

#scoreChart {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	overflow: hidden;
}

.score-progression-scroll {
	overflow: scroll;
	flex: 1 1 auto;
}

.score-progression-container {
	border-spacing:0;
  	border-collapse: collapse;
	width: 100%;
	min-height: min-content;
}

.score-progression-container::before {
	content: '📊 Scroll to navigate timeline →';
	position: absolute;
	top: -25px;
	right: 0;
	background: rgba(155, 89, 182, 0.1);
	color: #9b59b6;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: bold;
	z-index: 10;
	pointer-events: none;
}

.file-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(46, 204, 113, 0.1);
	border: 2px solid #27ae60;
	border-radius: 10px;
	padding: 20px;
	margin: 10px 0;
}

.file-details {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.file-name {
	font-weight: bold;
	color: #2c3e50;
	font-size: 1.1rem;
}

.file-size {
	color: #7f8c8d;
	font-size: 0.9rem;
}

.remove-file-btn {
	background: #e74c3c;
	color: white;
	border: none;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 1.2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
}

.remove-file-btn:hover {
	background: #c0392b;
}

.upload-actions {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-top: 20px;
}

.error-message {
	background: rgba(231, 76, 60, 0.1);
	border: 2px solid #e74c3c;
	border-radius: 10px;
	padding: 15px;
	margin: 15px 0;
	color: #c0392b;
	text-align: center;
	display: none;
}

.error-message.show {
	display: block;
}

/* Dashboard Layout */
.dashboard {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	grid-template-rows: 2fr auto min-content;
	gap: 20px;
	min-height: 80vh;
	max-width: 100%;
}

.dashboard >* {
	border: 2.5px double #444;
}

.chart-container {
	padding: 20px;
	
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
	height: 650px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow: hidden;
}

.chart-container > div {
	min-height: auto;
	width: 100%;
}

.chart-container svg {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.chart-container h2 {

	margin-bottom: 20px;
	text-align: center;
	border-bottom: 2px double #3498db;
	padding-bottom: 10px;
}

/* Canvas styling for Chart.js */

/* Metrics Panel 
.metrics-panel {
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 15px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(10px);
	border: 1px double rgba(255, 255, 255, 0.2);
}

.metrics-panel h2 {
	font-size: 1.8rem;
	color: #2c3e50;
	margin-bottom: 25px;
	text-align: center;
	border-bottom: 2px double;
	padding-bottom: 10px;
}
*/
.metrics-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 5px;
	margin: 5px;
}

.metric-card {
	
	text-align: center;
	border: 2px solid transparent;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.metric-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c, #f39c12, #2ecc71, #1abc9c);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.metric-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
	border-color: #3498db;
}

.metric-card:hover::before {
	opacity: 1;
}

.metric-card h6, .metric-card h3, .metric-card h2, .metric-card h5, .timeline-sync-indicator h3 {
	margin: 0;
}

/*.metric-card span {
	font-size: 2rem;
	font-weight: bold;
	color: #3498db;
	display: block;
	margin-bottom: 8px;
}

.metric-card p {
	font-size: 0.9rem;
	color: #7f8c8d;
	line-height: 1.4;
}*/

/* Specific metric colors */
.metric-card:nth-child(1) span { color: #e74c3c; } /* Trickshot */
.metric-card:nth-child(2) span { color: #9b59b6; } /* Stealth */
.metric-card:nth-child(3) span { color: #f39c12; } /* Speed */
.metric-card:nth-child(4) span { color: #e67e22; } /* RPM */
.metric-card:nth-child(5) span { color: #2ecc71; } /* Range */
.metric-card:nth-child(6) span { color: #1abc9c; } /* Accuracy */

/* Responsive Design */
@media (max-width: 768px) {
	main {
		padding: 15px;
	}
	
	header h1 {
		font-size: 2rem;
	}
	
	.dashboard {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.chart-container {
		padding: 20px;
	}
	
	.metrics-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 15px;
	}
	
	.metric-card {
		padding: 15px;
	}
	
	.metric-card span {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	header h1 {
		font-size: 1.5rem;
	}
	
	.metrics-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* Dashboard Layout */
/*.dashboard {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 25px;
	margin-bottom: 40px;
}*/

.chart-container:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.chart-container h2 {
	font-size: 1.5rem;
	color: #2c3e50;
	margin-bottom: 20px;
	text-align: center;
	border-bottom: 2px solid #3498db;
	padding-bottom: 10px;
}

/* SVG styling for D3.js hexagon chart */
#hexChart {
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 100%;
	height: inherit;
}

#hexChart svg {
	margin: auto;
}

/* D3 hexagon chart specific styles */
.hexagon-chart .grid-circle {
	fill: none;
	stroke: rgba(127, 140, 141, 0.3);
	stroke-width: 1;
}

.hexagon-chart .grid-label {
	font-size: 10px;
	fill: #7f8c8d;
}

.hexagon-chart .axis-line {
	stroke: rgba(127, 140, 141, 0.3);
	stroke-width: 1;
}

.hexagon-chart .data-area {
	fill: rgba(52, 152, 219, 0.2);
	stroke: rgba(52, 152, 219, 1);
	stroke-width: 3;
}

.hexagon-chart .data-point {
	stroke: #fff;
	stroke-width: 2;
	cursor: pointer;
	transition: all 0.3s ease;
}

.hexagon-chart .data-point:hover {
	stroke-width: 3;
}

.hexagon-chart .axis-label {
	text-anchor: middle;
	font-size: 12px;
	font-weight: bold;
	
}

.hexagon-chart .chart-title {
	text-anchor: middle;
	font-size: 16px;
	font-weight: bold;
	fill: #2c3e50;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hexagon-chart .tooltip-bg {
	fill: rgba(44, 62, 80, 0.9);
	stroke-width: 2;
	rx: 5;
}

.hexagon-chart .tooltip-text {
	fill: #fff;
	font-size: 12px;
	text-anchor: middle;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Modal Styles */
.chart-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
}

.modal-content {
	background: #222;
	margin: 2% auto;
	padding: 0;
	border-radius: 15px;
	width: 90%;
	max-width: 1200px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 30px;
	background: #000;
	color: white;
	border-radius: 15px 15px 0 0;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.5rem;
}

.modal-close {
	background: none;
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	padding: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
}

.modal-close:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
	padding: 30px;
	max-height: calc(90vh - 120px);
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 30px;
	grid-template-rows: 1fr;
}

#modalChart {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	overflow: scroll
}

#modalDetails {
	background: #444;
	border-radius: 10px;
	padding: 20px;
	border: 1px solid rgba(52, 152, 219, 0.2);
	overflow: scroll;
}

/* Fullscreen chart specific styles */
.hexagon-chart.fullscreen .data-point {
	r: 8;
}

.hexagon-chart.fullscreen .axis-label {
	font-size: 16px;
}

.hexagon-chart.fullscreen .chart-title {
	font-size: 20px;
}

/* Metrics details table */
.metrics-details h3 {
	color: #2c3e50;
	margin-bottom: 15px;
	border-bottom: 2px solid #3498db;
	padding-bottom: 5px;
}

.metrics-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.metrics-table th,
.metrics-table td {
	padding: 8px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.metrics-table th {
	background-color: #f8f9fa;
	font-weight: bold;
	color: #2c3e50;
}

.performance-badge {
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: bold;
	text-transform: uppercase;
}

.performance-badge.excellent {
	background-color: #d4edda;
	color: #155724;
}

.performance-badge.good {
	background-color: #cce7ff;
	color: #004085;
}

.performance-badge.average {
	background-color: #fff3cd;
	color: #856404;
}

.performance-badge.poor {
	background-color: #f8d7da;
	color: #721c24;
}

.performance-badge.very-poor {
	background-color: #f5c6cb;
	color: #721c24;
}

/* Hit details styles */

.hit-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

/* Fullscreen indicators */
.fullscreen-indicator {
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.fullscreen-indicator:hover {
	opacity: 1;
}

/* Responsive modal */
@media (max-width: 768px) {
	.modal-body {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.modal-content {
		width: 95%;
		margin: 5% auto;
	}
	
	.modal-header {
		padding: 15px 20px;
	}
	
	.modal-body {
		padding: 20px;
	}
}


/* Specific metric colors */
.metric-card:nth-child(1) span { color: #e74c3c; } /* Trickshot */
.metric-card:nth-child(2) span { color: #9b59b6; } /* Stealth */
.metric-card:nth-child(3) span { color: #f39c12; } /* Speed */
.metric-card:nth-child(4) span { color: #e67e22; } /* RPM */
.metric-card:nth-child(5) span { color: #2ecc71; } /* Range */
.metric-card:nth-child(6) span { color: #1abc9c; } /* Accuracy */

/* Responsive Design */
@media (max-width: 768px) {
	main {
		padding: 15px;
	}
	
	header h1 {
		font-size: 2rem;
	}
	
	.dashboard {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.chart-container {
		padding: 20px;
	}
	
	.metrics-grid {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 15px;
	}
	
	.metric-card {
		padding: 15px;
	}
	
	.metric-card span {
		font-size: 1.5rem;
	}

	.metric-card h2 {
		font-weight: bold;
	}
}

@media (max-width: 480px) {
	header h1 {
		font-size: 1.5rem;
	}
	
	.metrics-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* Chart responsiveness improvements */
@media (max-width: 1200px) {
	.dashboard {
		grid-template-columns: 1fr 1fr !important;
		grid-template-rows: auto !important;
	}
}

@media (max-width: 900px) {
	.dashboard {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto !important;
	}
	
	.chart-container {
		padding: 15px !important;
		min-height: 350px !important;
	}
}

tbody {
	font-size: .75em;
}

.playerScores {
	overflow:scroll;
}

/* Score table team coloring */
#playerScores tr {
	transition: all 0.2s ease;
	border-left: 4px solid transparent;
	width: 95%;
}

#playerScores tr:hover {
	opacity: 0.9;
	transform: translateX(2px);
}

#playerScores td {
	padding: 6px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}