/* Shared CSS for PuckLog Chart Pages */
/* This file contains common styles used across team-charts.html and player-charts.html */

/* Reset and Base Styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
	color: #e0e0e0;
	line-height: 1.6;
	min-height: 100vh;
}

/* Container and Layout */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Header Styles */
header {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(10px);
	color: white;
	padding: 15px 0;
	text-align: center;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 10px;
}

.logo {
	height: 80px;
	width: auto;
}

.back-btn {
	position: absolute;
	left: 30px;
	top: 50%;
	transform: translateY(-50%);
	padding: 12px 24px;
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
	color: white;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 500;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px 0 rgba(52, 152, 219, 0.3);
}

.back-btn:hover {
	transform: translateY(-50%) translateY(-2px);
	box-shadow: 0 6px 20px 0 rgba(52, 152, 219, 0.4);
}

/* Common Section Styles */
.section {
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 30px;
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
	margin-bottom: 30px;
}

.section.beta {
	background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
	border: 2px solid rgba(147, 51, 234, 0.3);
}

.section-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
}

.section-header h3 {
	color: #ffffff;
	font-size: 1.3rem;
	font-weight: 600;
	margin: 0;
}

/* Info Badges */
.info-badges {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.season-badge {
	padding: 4px 12px;
	background: rgba(52, 152, 219, 0.15);
	border: 1px solid rgba(52, 152, 219, 0.4);
	border-radius: 20px;
	color: #3498db;
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
}

.league-games-info {
	padding: 4px 12px;
	background: rgba(46, 204, 113, 0.15);
	border: 1px solid rgba(46, 204, 113, 0.4);
	border-radius: 20px;
	color: #2ecc71;
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
	width: 200px;
	text-align: center;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.league-games-info.placeholder {
	color: #666;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Controls */
.controls {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

.select-wrapper {
	position: relative;
}

.select-wrapper select {
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #e0e0e0;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.3s ease;
}

.select-wrapper select:focus {
	outline: none;
	border-color: #3498db;
	background: rgba(255, 255, 255, 0.15);
}

/* Input Styles */
.input-field {
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #e0e0e0;
	font-size: 1rem;
	transition: all 0.3s ease;
}

.input-field:focus {
	outline: none;
	border-color: #3498db;
	background: rgba(255, 255, 255, 0.15);
}

.input-field:disabled {
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.3);
	cursor: not-allowed;
	border-color: rgba(255, 255, 255, 0.1);
}

.input-field::placeholder {
	color: #888;
}

/* Button Styles */
.btn {
	padding: 10px 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #e0e0e0;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.btn:hover {
	background: rgba(255, 255, 255, 0.15);
	transform: translateY(-1px);
}

.btn.selected {
	background: rgba(52, 152, 219, 0.3);
	border-color: #3498db;
	color: white;
}

.btn:disabled {
	background: rgba(255, 255, 255, 0.1);
	color: #666;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.btn-primary {
	background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
	color: white;
	border: none;
	padding: 16px 48px;
	border-radius: 10px;
	font-size: 1.1rem;
	font-weight: 600;
	box-shadow: 0 4px 15px 0 rgba(46, 204, 113, 0.4);
	letter-spacing: 0.5px;
}

.btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px 0 rgba(46, 204, 113, 0.5);
}

.btn-secondary {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	color: white;
	border: none;
	padding: 15px 30px;
	border-radius: 8px;
	font-size: 1.1rem;
	font-weight: 600;
	box-shadow: 0 4px 15px 0 rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px 0 rgba(231, 76, 60, 0.4);
}

/* Range Options */
.range-options {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
}

.custom-range {
	display: none;
	gap: 15px;
	justify-content: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
	align-items: center;
}

.custom-range label {
	font-size: 1rem;
	color: #e0e0e0;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
}

.custom-range input {
	width: 100px;
	padding: 8px 12px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	color: #e0e0e0;
	text-align: center;
}

.custom-range input:focus {
	outline: none;
	border-color: #3498db;
	background: rgba(255, 255, 255, 0.15);
}

/* Chart Display */
.chart-section {
	display: none;
	text-align: center;
}

.chart-image {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chart-info {
	margin-top: 20px;
	padding: 15px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	font-size: 0.9rem;
	color: #ccc;
}

/* Error Message */
.error-message {
	display: none;
	background: rgba(231, 76, 60, 0.15);
	border: 1px solid rgba(231, 76, 60, 0.4);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 20px;
	color: #e74c3c;
	text-align: center;
}

.error {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
	color: white;
	padding: 20px;
	border-radius: 10px;
	margin-top: 20px;
	box-shadow: 0 4px 15px 0 rgba(231, 76, 60, 0.3);
}

/* Loading Overlay */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
	display: flex;
	opacity: 1;
	visibility: visible;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid rgba(255, 255, 255, 0.1);
	border-left: 4px solid #3498db;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 20px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.loading-text {
	color: white;
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 10px;
}

.loading-subtext {
	color: #aaa;
	font-size: 0.9rem;
}

/* Utility Classes */
.hidden {
	display: none !important;
}

.text-center {
	text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 10px;
	}
	
	.back-btn {
		position: static;
		transform: none;
		margin-bottom: 15px;
	}
	
	.header-top {
		flex-direction: column;
		gap: 10px;
	}
	
	.controls {
		flex-direction: column;
		align-items: stretch;
	}
	
	.custom-range {
		flex-direction: column;
	}
	
	.custom-range label {
		justify-content: space-between;
	}
	
	.section-header {
		flex-direction: column;
		gap: 10px;
	}

	.range-options {
		flex-direction: column;
	}
	
	.info-badges {
		justify-content: center;
	}
}