@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

/* Keyframe animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(30px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes float {
	0%, 100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-10px);
	}
}

@keyframes glow {
	0%, 100% {
		box-shadow: 0 0 10px rgba(94, 124, 255, 0.3);
	}
	50% {
		box-shadow: 0 0 20px rgba(94, 124, 255, 0.6);
	}
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.8;
	}
}

@keyframes shimmer {
	0% {
		background-position: -1000px 0;
	}
	100% {
		background-position: 1000px 0;
	}
}

@keyframes musicPulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
}

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

html, body {
	width: 100%;
	height: 100%;
	overflow-x: hidden;
}

/* Audio Controls */
.audio-controls {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 100;
	animation: slideInRight 0.6s ease-out;
}

.music-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: 2px solid rgba(94, 124, 255, 0.5);
	background-color: rgba(255, 255, 255, 0.9);
	font-size: 24px;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.music-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 8px 25px rgba(94, 124, 255, 0.3);
	border-color: rgba(94, 124, 255, 0.8);
	background-color: rgba(255, 255, 255, 1);
}

.music-btn.playing {
	animation: musicPulse 2s ease-in-out infinite;
}

.mw {
	text-align: center;
	font-family: "Merriweather", serif;
	font-optical-sizing: auto;
	font-weight: 650;
	font-style: bold;
	font-variation-settings: "wdth" 100;
	font-size: 25px;
	position: relative;
	z-index: 0;
	animation: fadeIn 0.8s ease-out;
}

.mwp {
	text-align: center;
	font-family: "Merriweather", serif;
	font-optical-sizing: auto;
	font-weight: 650;
	font-style: normal;
	font-variation-settings: "wdth" 100;
	font-size: 25px;
	position: relative;
	z-index: 0;
	animation: fadeIn 1s ease-out 0.2s both;
}

.topnavbar {
	position: relative;
	overflow: visible;
	height: 55px;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: slideInLeft 0.6s ease-out;
}

.navlink {
	position: absolute;
	left: 20px;
	font-family: "Merriweather", serif;
	font-weight: 650;
	font-size: 16px;
	color: #fff;
	text-decoration: none;
	padding: 6px 14px;
	border-radius: 50px;
	background-color: #3a4a6b;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	z-index: 1;
	animation: float 3s ease-in-out infinite;
}

.navlink:hover {
	background-color: #4c5f84;
	transform: scale(1.1) translateY(-5px);
	box-shadow: 0 8px 20px rgba(94, 124, 255, 0.4);
}

.youtube-link {
	left: auto;
	right: 20px;
	font-size: 18px;
	padding: 6px 12px;
	background-color: #ff0000;
}

.youtube-link:hover {
	background-color: #cc0000;
}

.topnavbar::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: #5e7cff64;
	filter: blur(0px);
	z-index: 0;
	border-radius: 200px;
	animation: glow 2s ease-in-out infinite;
}

.backdrop {
	position: fixed;
	inset: -30px;
	background-image: url('background.png');
	background-size: cover;
	background-position: center;
	filter: blur(6px) brightness(0.6);
	z-index: -1;
	animation: pulse 4s ease-in-out infinite;
}

.textbox {
	display: inline-block;
	position: absolute;
	left: 20px;
	top: 25%;
	transform: translateY(-50%);
	padding: 8px 16px;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(10px) brightness(1);
	-webkit-backdrop-filter: blur(10px);
	z-index: 10;
	animation: slideInLeft 0.8s ease-out 0.3s both;
	transition: all 0.3s ease;
}

.textbox:hover {
	background-color: rgba(255, 255, 255, 0.9);
	transform: translateY(-50%) scale(1.02);
	box-shadow: 0 8px 30px rgba(94, 124, 255, 0.2);
}

.textbox p {
	animation: fadeIn 1s ease-out 0.5s both;
}

.videosidebar {
	position: absolute;
	right: 20px;
	top: 75px;
	width: 380px;
	max-height: 60vh;
	padding: 12px 16px;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(10px) brightness(1);
	-webkit-backdrop-filter: blur(10px);
	z-index: 10;
	overflow-y: auto;
	animation: slideInRight 0.8s ease-out 0.3s both;
	transition: all 0.3s ease;
}

.videosidebar:hover {
	background-color: rgba(255, 255, 255, 0.85);
	box-shadow: 0 8px 30px rgba(94, 124, 255, 0.2);
}

#youtube-videos {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.video-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 6px;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	animation: fadeIn 0.6s ease-out backwards;
}

.video-card:nth-child(1) {
	animation-delay: 0s;
}

.video-card:nth-child(2) {
	animation-delay: 0.1s;
}

.video-card:nth-child(3) {
	animation-delay: 0.2s;
}

.video-card:hover {
	transform: scale(1.05) translateY(-5px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.video-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-size: cover;
	background-position: center;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.video-card:hover .video-thumb {
	filter: brightness(0.8);
}

.video-play {
	width: 48px;
	height: 48px;
	background: rgba(0, 0, 0, 0.7) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') center/24px no-repeat;
	border-radius: 50%;
	opacity: 0.85;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	animation: float 3s ease-in-out infinite;
}

.video-card:hover .video-play {
	opacity: 1;
	transform: scale(1.2);
	box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.video-title {
	font-family: "Merriweather", serif;
	font-size: 14px;
	font-weight: 650;
	margin: 6px 0 0;
	text-align: center;
	line-height: 1.3;
	animation: fadeIn 0.6s ease-out 0.1s both;
}

/* Tablet/Medium screens */
@media (max-width: 1024px) {
	.mw {
		font-size: 22px;
	}

	.mwp {
		font-size: 18px;
	}

	.videosidebar {
		width: 320px;
		right: 15px;
		top: 65px;
		max-height: 50vh;
	}

	.textbox {
		left: 15px;
	}

	.navlink {
		left: 10px;
		font-size: 14px;
		padding: 5px 12px;
	}

	.youtube-link {
		right: 10px;
		padding: 5px 10px;
		font-size: 16px;
	}

	.audio-controls {
		top: 15px;
		right: 15px;
	}

	.music-btn {
		width: 45px;
		height: 45px;
		font-size: 20px;
	}
}

/* Mobile/Small screens */
@media (max-width: 768px) {
	.mw {
		font-size: 20px;
	}

	.mwp {
		font-size: 16px;
	}

	.topnavbar {
		height: 50px;
	}

	.navlink {
		left: 10px;
		font-size: 12px;
		padding: 4px 10px;
	}

	.youtube-link {
		right: 65px;
		font-size: 14px;
		padding: 4px 8px;
	}

	.textbox {
		left: 10px;
		right: 10px;
		top: 60px;
		transform: translateY(0);
		max-width: calc(100% - 20px);
		padding: 12px;
	}

	.textbox:hover {
		transform: scale(1.01);
	}

	.videosidebar {
		position: static;
		width: 100%;
		max-height: none;
		margin: 10px;
		margin-top: 300px;
		right: auto;
		top: auto;
		animation: slideInRight 0.8s ease-out 0.5s both;
	}

	.videosidebar:hover {
		transform: none;
	}

	.video-card:hover {
		transform: scale(1.03);
	}

	.audio-controls {
		top: 12px;
		right: 12px;
	}

	.music-btn {
		width: 42px;
		height: 42px;
		font-size: 18px;
	}
}

/* Very small screens */
@media (max-width: 480px) {
	.mw {
		font-size: 18px;
	}

	.mwp {
		font-size: 14px;
	}

	.navlink {
		font-size: 11px;
		padding: 3px 8px;
	}

	.youtube-link {
		right: 60px;
		font-size: 12px;
		padding: 3px 6px;
	}

	.textbox {
		padding: 8px 10px;
	}

	.textbox p {
		font-size: 14px;
	}

	.videosidebar {
		margin-top: 280px;
		margin: 8px;
		padding: 8px 12px;
	}

	.video-card:hover {
		transform: scale(1.02);
	}

	.video-title {
		font-size: 12px;
	}

	.audio-controls {
		top: 10px;
		right: 10px;
	}

	.music-btn {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}
}

/* Landscape mobile */
@media (max-height: 600px) and (max-width: 768px) {
	.textbox {
		top: 50px;
		padding: 6px 12px;
	}

	.mwp {
		font-size: 14px;
	}

	.videosidebar {
		margin-top: 180px;
	}
}

/* Scrollbar styling */
.videosidebar::-webkit-scrollbar {
	width: 8px;
}

.videosidebar::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 10px;
}

.videosidebar::-webkit-scrollbar-thumb {
	background: rgba(94, 124, 255, 0.5);
	border-radius: 10px;
	transition: background 0.3s;
}

.videosidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(94, 124, 255, 0.8);
}
