body {
	background:#111;
	color:#eee;
	font-family:Arial, sans-serif;
	margin:0;
}
header {
	text-align:center;
	padding:24px;
	background:#1b1b1b;
}
header img {
	max-width:640px;
	width:100%;
	height:auto;
}
.subtitle {
	color:#ddd;
	font-size:18px;
	letter-spacing:2px;
	margin-top:8px;
}
.controls {
	margin: 20px auto;
	max-width: 700px;
	padding: 0 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

#yearForm {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

#yearForm label {
	color: #ddd;
	font-weight: 600;
	font-size: 15px;
}

.player-search-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.player-inputs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.player-inputs input[type="text"] {
	width: 100%;
	padding: 12px 16px;
	background: #222;
	border: 2px solid #333;
	border-radius: 8px;
	color: #eee;
	font-size: 15px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.player-inputs input[type="text"]:focus {
	outline: none;
	border-color: #8c03fc;
}

.player-inputs input[type="text"]::placeholder {
	color: #666;
}

.player-actions {
	display: flex;
	gap: 10px;
}

.player-actions button {
	flex: 1;
	padding: 12px 20px;
	background: #8c03fc;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	transition: background 0.2s;
}

.player-actions button:hover {
	background: #a020ff;
}

.clear-player {
	padding: 12px 20px;
	background: #333;
	color: #999;
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.2s;
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}

.clear-player:hover {
	background: #444;
	color: #fff;
}

select {
	padding: 12px 16px;
	background: #333;
	color: #eee;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	min-width: 150px;
	cursor: pointer;
}
.tabs {
	display:flex;
	justify-content:center;
	gap:10px;
	flex-wrap:wrap;
	margin-bottom:20px;
}
.tab {
	padding:8px 14px;
	background:#222;
	border-radius:6px;
	cursor:pointer;
}
.tab.active {
	background:#8c03fc;
}
.container {
	max-width:1100px;
	margin:0 auto 40px;
	background:#1c1c1c;
	padding:20px;
	border-radius:12px;
}
.group {
	display:none;
}
.group.active {
	display:block;
}
table {
	width:100%;
	border-collapse:collapse;
}
th, td {
	padding:8px;
	border-bottom:1px solid #333;
}
thead th {
	background:#2a2a2a;
	border-bottom:2px solid #8c03fc;
}

tbody tr:nth-child(even) td {
	background:#1f1f1f;
}

tbody tr:nth-child(odd) td {
	background:#171717;
}


th {
	background:#222;
	text-align:left;
}
th.value, td.value {
	text-align:right;
	font-weight:600;
}

tbody tr {
	cursor:pointer;
	transition:background 0.2s;
}
.container table tbody tr {
	cursor:default;
}
.container .group.active table tbody tr {
	cursor:pointer;
}
tbody tr:hover td {
	background:#2a2a2a !important;
}
tbody tr.no-leaderboard {
	cursor:default;
	opacity:0.6;
}
tbody tr.no-leaderboard:hover td {
	background:inherit !important;
}
.back-button {
	display:inline-block;
	padding:10px 20px;
	background:#8c03fc;
	color:#fff;
	text-decoration:none;
	border-radius:6px;
	margin-bottom:20px;
}
.back-button:hover {
	background:#a020ff;
}
.leaderboard-rank {
	font-weight:bold;
	color:#8c03fc;
}

#loading {
	position:fixed;
	inset:0;
	background:rgba(0,0,0,0.6);
	display:none;
	align-items:center;
	justify-content:center;
	font-size:20px;
	z-index:9999;
}

.search-container {
	max-width: 600px;
	margin: 0 auto 20px;
	position: relative;
	display: flex;
	gap: 8px;
}

#statSearch {
	flex: 1;
	padding: 12px 16px;
	background: #222;
	border: 2px solid #333;
	border-radius: 8px;
	color: #eee;
	font-size: 15px;
	transition: border-color 0.2s;
}

#statSearch:focus {
	outline: none;
	border-color: #8c03fc;
}

#statSearch::placeholder {
	color: #666;
}

#clearSearch {
	padding: 12px 16px;
	background: #333;
	border: none;
	border-radius: 8px;
	color: #999;
	cursor: pointer;
	font-size: 16px;
	transition: all 0.2s;
}

#clearSearch:hover {
	background: #444;
	color: #fff;
}

#findPlayerBtn {
	padding: 12px 20px;
	background: #8c03fc;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	transition: background 0.2s;
	white-space: nowrap;
}

#findPlayerBtn:hover {
	background: #a020ff;
}

tr.hidden-by-search {
	display: none !important;
}

.highlighted-player {
	background: rgba(140, 3, 252, 0.2) !important;
	border-left: 4px solid #8c03fc;
}

.highlighted-player td {
	background: rgba(140, 3, 252, 0.2) !important;
	font-weight: 600;
}

.highlighted-player:hover td {
	background: rgba(140, 3, 252, 0.3) !important;
}

.no-results {
	text-align: center;
	padding: 40px;
	color: #888;
	font-size: 16px;
}

.page-intro {
	text-align:center;
	margin:20px auto 10px;
	max-width:900px;
	padding:18px 22px;
	background:#161616;
	border:1px solid #2a2a2a;
	border-radius:10px;
}

.page-intro h1 {
	margin:0 0 6px;
	font-size:22px;
	font-weight:700;
	letter-spacing:1px;
}

.page-intro p {
	margin:0;
	color:#aaa;
	font-size:14px;
}

.page-intro .hint {
	color:#8c03fc;
	font-weight:600;
}

.comparison {
	font-weight: 700;
}

.comparison.positive {
	color: #4caf50;
}

.comparison.negative {
	color: #f44336;
}

.comparison.neutral {
	color: #888;
}

#player2Input {
	transition: all 0.3s ease;
}

.nav-links {
	text-align: center;
	margin: 20px 0;
	display: flex;
	justify-content: center;
	gap: 15px;
}

.nav-links a {
	padding: 12px 24px;
	background: #8c03fc;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: background 0.2s;
}

.nav-links a:hover {
	background: #a020ff;
}

.chart-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.chart-container {
	background: #1c1c1c;
	padding: 25px;
	border-radius: 12px;
	border: 1px solid #2a2a2a;
}

.chart-container h3 {
	margin: 0 0 20px 0;
	text-align: center;
	color: #8c03fc;
	font-size: 18px;
}

.chart-wrapper {
	position: relative;
	height: 350px;
	width: 100%;
	overflow: hidden;
}

.chart-wrapper canvas {
	max-width: 100%;
	max-height: 100%;
}

.chart-total {
	text-align: center;
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #333;
	color: #aaa;
	font-size: 14px;
}

.chart-total strong {
	color: #fff;
	font-size: 18px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
	/* Fix chart grid for mobile */
	.chart-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 0 10px;
	}
	
	/* Reduce chart container padding on mobile */
	.chart-container {
		padding: 15px;
	}
	
	/* Reduce chart height on mobile */
	.chart-wrapper {
		height: 280px;
		width: 100%;
		max-width: 100%;
	}
	
	.chart-wrapper canvas {
		max-width: 100% !important;
		max-height: 100% !important;
	}
	
	/* Adjust chart title size */
	.chart-container h3 {
		font-size: 16px;
		margin-bottom: 15px;
	}
	
	/* Adjust chart total text */
	.chart-total {
		font-size: 13px;
		margin-top: 12px;
		padding-top: 12px;
	}
	
	.chart-total strong {
		font-size: 16px;
	}
	
	/* Make container padding smaller on mobile */
	.container {
		padding: 15px;
		margin: 0 10px 40px;
	}
	
	/* Adjust header padding */
	header {
		padding: 16px;
	}
	
	/* Make the nav-links stack properly on mobile */
	.nav-links {
		flex-direction: column;
		margin: 15px 10px;
		gap: 10px;
	}
	
	.nav-links a {
		width: 100%;
		box-sizing: border-box;
		padding: 14px 20px;
		font-size: 16px;
	}
}
