/**
 * HL2GO Media Player Styles
 * 
 * Styled to match hl2go-modern theme with neon effects and dark theme
 */

/* Use theme CSS variables if available, otherwise use defaults */
:root {
	--hl2go-primary-color: var(--primary-color, #00ff88);
	--hl2go-secondary-color: var(--secondary-color, #0099ff);
	--hl2go-accent-color: var(--accent-color, #ff0066);
	--hl2go-bg-dark: var(--bg-dark, #0a0e27);
	--hl2go-bg-darker: var(--bg-darker, #050811);
	--hl2go-bg-card: var(--bg-card, #111827);
	--hl2go-text-primary: var(--text-primary, #ffffff);
	--hl2go-text-secondary: var(--text-secondary, #b0b8c4);
	--hl2go-border-color: var(--border-color, #1f2937);
	--hl2go-shadow-glow: var(--shadow-glow, 0 0 20px rgba(0, 255, 136, 0.3));
	--hl2go-gradient-primary: var(--gradient-primary, linear-gradient(135deg, #00ff88 0%, #0099ff 100%));
}

/* Main Player Container - Fixed at bottom */
.hl2go-media-player {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--hl2go-bg-card);
	border-top: 1px solid var(--hl2go-border-color);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
	z-index: 9999;
	padding: 1rem;
	font-family: 'Roboto', sans-serif;
	color: var(--hl2go-text-primary);
	backdrop-filter: blur(10px);
}

/* Player Content */
.hl2go-media-player .player-content {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	max-width: 1400px;
	margin: 0 auto;
	flex-wrap: wrap;
}

/* Track Info Section */
.hl2go-media-player .track-info {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1;
	min-width: 200px;
}

.hl2go-media-player .track-thumbnail {
	width: 60px;
	height: 60px;
	border-radius: 5px;
	background: var(--hl2go-bg-dark);
	border: 1px solid var(--hl2go-border-color);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.hl2go-media-player .track-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hl2go-media-player .track-thumbnail span {
	font-size: 1.5rem;
	color: var(--hl2go-text-secondary);
}

.hl2go-media-player .track-details {
	flex: 1;
	min-width: 0;
}

.hl2go-media-player .track-title {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--hl2go-text-primary);
	margin-bottom: 0.25rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hl2go-media-player .track-artist {
	font-size: 0.85rem;
	color: var(--hl2go-text-secondary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Player Controls */
.hl2go-media-player .player-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 2;
	min-width: 300px;
}

.hl2go-media-player .control-buttons {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hl2go-media-player .control-btn {
	background: var(--hl2go-bg-dark);
	color: var(--hl2go-primary-color);
	border: 1px solid var(--hl2go-border-color);
	border-radius: 5px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	padding: 0;
	box-shadow: var(--hl2go-shadow-glow);
}

.hl2go-media-player .control-btn:hover {
	background: var(--hl2go-bg-card);
	box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
	transform: translateY(-2px);
	border-color: var(--hl2go-primary-color);
}

.hl2go-media-player .control-btn:active {
	transform: translateY(0);
}

.hl2go-media-player .play-pause-btn {
	width: 50px;
	height: 50px;
	font-size: 1.5rem;
	background: var(--hl2go-gradient-primary);
	color: var(--hl2go-bg-dark);
	border: none;
	box-shadow: var(--hl2go-shadow-glow);
}

.hl2go-media-player .play-pause-btn:hover {
	box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

/* Progress Section */
.hl2go-media-player .progress-section {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
	min-width: 200px;
}

.hl2go-media-player .time-display {
	font-size: 0.85rem;
	color: var(--hl2go-text-secondary);
	min-width: 40px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.hl2go-media-player .progress-bar-container {
	flex: 1;
}

.hl2go-media-player .progress-bar {
	width: 100%;
	height: 6px;
	background: var(--hl2go-bg-dark);
	border: 1px solid var(--hl2go-border-color);
	border-radius: 3px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.hl2go-media-player .progress-fill {
	height: 100%;
	background: var(--hl2go-gradient-primary);
	border-radius: 3px;
	width: 0%;
	transition: width 0.1s linear;
	box-shadow: var(--hl2go-shadow-glow);
}

.hl2go-media-player .progress-bar:hover .progress-fill {
	box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

/* Volume Control */
.hl2go-media-player .volume-control {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 150px;
}

.hl2go-media-player .volume-btn {
	background: var(--hl2go-bg-dark);
	color: var(--hl2go-primary-color);
	border: 1px solid var(--hl2go-border-color);
	border-radius: 5px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1rem;
	padding: 0;
	box-shadow: var(--hl2go-shadow-glow);
}

.hl2go-media-player .volume-btn:hover {
	background: var(--hl2go-bg-card);
	box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
	border-color: var(--hl2go-primary-color);
}

.hl2go-media-player .volume-slider-container {
	flex: 1;
}

.hl2go-media-player .volume-slider {
	width: 100%;
	height: 4px;
	background: var(--hl2go-bg-dark);
	border: 1px solid var(--hl2go-border-color);
	border-radius: 2px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.hl2go-media-player .volume-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 12px;
	height: 12px;
	background: var(--hl2go-gradient-primary);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--hl2go-shadow-glow);
	transition: all 0.3s ease;
}

.hl2go-media-player .volume-slider::-webkit-slider-thumb:hover {
	box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
	transform: scale(1.2);
}

.hl2go-media-player .volume-slider::-moz-range-thumb {
	width: 12px;
	height: 12px;
	background: var(--hl2go-gradient-primary);
	border-radius: 50%;
	cursor: pointer;
	border: none;
	box-shadow: var(--hl2go-shadow-glow);
	transition: all 0.3s ease;
}

.hl2go-media-player .volume-slider::-moz-range-thumb:hover {
	box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
	transform: scale(1.2);
}

/* YouTube Container (hidden but visible for ToS compliance) */
#youtubeContainer {
	position: fixed;
	bottom: 10px;
	right: 10px;
	width: 200px;
	height: 113px;
	z-index: 10000;
	opacity: 0.3;
	pointer-events: auto;
}

#youtubeContainer iframe {
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* SoundCloud Container (hidden) */
#soundcloudContainer {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.hl2go-media-player .player-content {
		gap: 1rem;
	}
	
	.hl2go-media-player .track-info {
		min-width: 150px;
	}
	
	.hl2go-media-player .player-controls {
		min-width: 250px;
	}
	
	.hl2go-media-player .volume-control {
		min-width: 120px;
	}
}

@media (max-width: 768px) {
	.hl2go-media-player {
		padding: 0.75rem;
	}
	
	.hl2go-media-player .player-content {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}
	
	.hl2go-media-player .track-info {
		min-width: auto;
	}
	
	.hl2go-media-player .track-thumbnail {
		width: 50px;
		height: 50px;
	}
	
	.hl2go-media-player .player-controls {
		flex-direction: column;
		gap: 0.75rem;
		min-width: auto;
	}
	
	.hl2go-media-player .control-buttons {
		justify-content: center;
	}
	
	.hl2go-media-player .progress-section {
		width: 100%;
		min-width: auto;
	}
	
	.hl2go-media-player .volume-control {
		width: 100%;
		min-width: auto;
	}
	
	.hl2go-media-player .time-display {
		font-size: 0.75rem;
		min-width: 35px;
	}
	
	#youtubeContainer {
		width: 150px;
		height: 85px;
		bottom: 5px;
		right: 5px;
	}
}

@media (max-width: 480px) {
	.hl2go-media-player {
		padding: 0.5rem;
	}
	
	.hl2go-media-player .track-title {
		font-size: 0.85rem;
	}
	
	.hl2go-media-player .track-artist {
		font-size: 0.75rem;
	}
	
	.hl2go-media-player .control-btn {
		width: 36px;
		height: 36px;
		font-size: 1rem;
	}
	
	.hl2go-media-player .play-pause-btn {
		width: 44px;
		height: 44px;
		font-size: 1.3rem;
	}
	
	.hl2go-media-player .volume-btn {
		width: 32px;
		height: 32px;
		font-size: 0.9rem;
	}
	
	#youtubeContainer {
		width: 120px;
		height: 68px;
	}
}

/* Add padding to body when player is visible */
body.hl2go-player-active {
	padding-bottom: 90px;
}

@media (max-width: 768px) {
	body.hl2go-player-active {
		padding-bottom: 140px;
	}
}
