* {
	box-sizing: border-box;
}

body {
	background-color: #121212;
	font-family: 'Roboto', sans-serif;
	color: #dcdcdc;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow-x: hidden;
	overflow-y: hidden;
	justify-content: flex-start;
	align-items: center;
	text-align: center;
	user-select: none;
	position: relative;
	line-height: 1.6;
}

.main-container {
	width: 100%;
	max-width: 1200px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(24px, 4vw, 40px);
}

.title-container {
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: clamp(20px, 4vw, 32px);
}

h1 {
	font-weight: 900;
	font-size: clamp(2.5rem, 6vw, 5rem);
	color: #f0b66a;
	text-transform: uppercase;
	letter-spacing: clamp(0.08em, 0.12em, 0.15em);
	animation: glowPulse 6s ease-in-out infinite;
	margin: 0;
	text-shadow: 0 0 4px #f0b66aaa, 0 0 10px #c68f48cc, 0 0 15px #c68f48cc;
	word-break: break-word;
	hyphens: auto;
	text-align: center;
	line-height: 1.1;
}

h1::after {
	content: '';
	display: block;
	width: clamp(40px, 8vw, 70px);
	height: clamp(2px, 0.5vw, 3px);
	margin: clamp(10px, 2vw, 16px) auto 0;
	background: linear-gradient(90deg, #f0b66a 0%, #c68f48 100%);
	border-radius: 2px;
	animation: underlineGrow 6s ease-in-out infinite alternate;
	box-shadow: 0 0 6px #f0b66a88, 0 0 12px #c68f4888;
}

body::before {
	content: '';
	position: fixed;
	top: 50%;
	left: 50%;
	width: clamp(250px, 50vw, 400px);
	height: clamp(250px, 50vw, 400px);
	background: radial-gradient(
		circle,
		rgba(240, 182, 106, 0.3) 0%,
		transparent 70%
	);
	transform: translate(-50%, -50%);
	filter: blur(50px);
	animation: pulseBg 8s ease-in-out infinite alternate;
	pointer-events: none;
	z-index: -1;
}

.search-bar {
	width: 100%;
	max-width: 600px;
	margin-bottom: clamp(20px, 4vw, 32px);
	display: flex;
	justify-content: center;
	padding: 0 clamp(12px, 3vw, 24px);
}

#search {
	width: 100%;
	padding: clamp(12px, 2.5vw, 16px) clamp(16px, 3.5vw, 24px);
	font-size: clamp(1rem, 2.5vw, 1.25rem);
	border-radius: clamp(25px, 8vw, 50px);
	border: none;
	outline: none;
	box-shadow: 0 0 8px #c68f48aa;
	background-color: #222;
	color: #eee;
	letter-spacing: 0.03em;
	transition: box-shadow 0.3s ease, transform 0.2s ease;
	min-height: 48px;
}

#search:focus {
	box-shadow: 0 0 16px #f0b66a;
	transform: scale(1.02);
}

#music-list {
	height: clamp(300px, 60vh, 500px);
	width: 100%;
	max-width: 800px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0 clamp(12px, 3vw, 24px);
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2.5vw, 20px);
	scrollbar-width: thin;
	scrollbar-color: #f0b66a88 #1a1a1a;
}

#music-list::-webkit-scrollbar {
	width: clamp(8px, 1.5vw, 12px);
}

#music-list::-webkit-scrollbar-thumb {
	background: #f0b66a88;
	border-radius: 6px;
	border: 1px solid #1a1a1a;
}

#music-list::-webkit-scrollbar-track {
	background: #1a1a1a;
	border-radius: 6px;
}

#music-list::-webkit-scrollbar-thumb:hover {
	background: #f0b66acc;
}

.file-card {
	margin-bottom: 0;
	padding: 16px 20px;
	background: linear-gradient(135deg, #3c2e0cbb, #2a1e0500);
	border-radius: 14px;
	box-shadow: 0 4px 12px rgba(240, 182, 106, 0.15), inset 0 0 12px #f0b66a33;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: 'name actions';
	align-items: center;
	transition: all 0.3s ease;
	cursor: pointer;
	user-select: none;
	min-height: 70px;
	gap: 20px;
	width: 100%;
}

.file-card:hover,
.file-card:focus-visible {
	background: linear-gradient(135deg, #f0b66a88, #c68f4877);
	box-shadow: 0 6px 18px rgba(240, 182, 106, 0.7), inset 0 0 16px #f0b66aaa;
	outline: none;
	transform: translateY(-2px);
}

.file-name {
	grid-area: name;
	font-weight: 600;
	font-size: 1.15rem;
	color: #f0b66a;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	user-select: text;
	text-align: left;
	line-height: 1.4;
	min-width: 0;
}

.file-actions {
	grid-area: actions;
	display: flex;
	gap: 12px;
	align-items: center;
	flex-shrink: 0;
}

.file-link {
	color: #f0b66a;
	font-weight: 500;
	font-size: 0.9rem;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 20px;
	border: 1.5px solid transparent;
	background-color: #3c2e0cbb;
	box-shadow: 0 0 6px #f0b66a55;
	transition: all 0.3s ease;
	user-select: none;
	white-space: nowrap;
	min-height: 36px;
	min-width: 70px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.file-link:hover,
.file-link:focus-visible {
	background-color: #f0b66a;
	color: #1a1a1a;
	border-color: #c68f48;
	box-shadow: 0 0 10px #f0b66aaa, 0 0 16px #c68f48cc;
	outline: none;
	transform: scale(1.05);
}

audio {
	width: 100%;
	max-width: 100%;
	margin-top: clamp(6px, 1.5vw, 10px);
	outline: none;
	border-radius: 6px;
	background-color: #111;
	height: clamp(32px, 6vw, 40px);
}

footer {
	width: 100%;
	margin-top: auto;
	display: flex;
	gap: clamp(20px, 5vw, 40px);
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 24px);
	flex-wrap: wrap;
	background-color: #1c1c1c;
	border-top: 1px solid #444;
}

.social-link {
	color: #f0b66a;
	font-size: 2.5rem;
	text-decoration: none;
	transition: all 0.3s ease;
	filter: drop-shadow(0 0 3px #c68f48aa);
	min-width: 48px;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 8px;
}

.social-link:hover,
.social-link:focus {
	color: #d18f2a;
	transform: scale(1.15);
	filter: drop-shadow(0 0 8px #d18f2a);
	outline: none;
	background-color: rgba(240, 182, 106, 0.15);
}

.social-link:focus-visible {
	outline: 2px solid #f0b66a;
	outline-offset: 2px;
}

@keyframes glowPulse {
	0%,
	100% {
		text-shadow: 0 0 4px #f0b66aaa, 0 0 10px #c68f48cc, 0 0 15px #c68f48cc;
		color: #f0b66a;
	}
	50% {
		text-shadow: 0 0 8px #f8cc88bb, 0 0 16px #d3a25cbb, 0 0 24px #d3a25cbb;
		color: #f8cc88;
	}
}

@keyframes underlineGrow {
	0% {
		width: clamp(30px, 6vw, 50px);
		opacity: 0.5;
		box-shadow: 0 0 4px #c68f48aa;
	}
	100% {
		width: clamp(50px, 10vw, 80px);
		opacity: 0.85;
		box-shadow: 0 0 10px #d3a25cbb;
	}
}

@keyframes pulseBg {
	0% {
		filter: blur(50px) brightness(0.95);
		opacity: 0.55;
	}
	100% {
		filter: blur(40px) brightness(1.1);
		opacity: 0.8;
	}
}

@media (max-width: 1024px) {
	body {
		padding-bottom: 140px;
	}

	#music-list {
		height: clamp(280px, 55vh, 450px);
	}

	footer {
		bottom: 25px;
	}
}

@media (max-width: 768px) {
	body {
		padding: 24px 16px 140px;
	}

	.file-card {
		grid-template-columns: 1fr;
		grid-template-areas:
			'name'
			'actions';
		gap: 12px;
		padding: 16px 18px;
		text-align: center;
		min-height: 80px;
	}

	.file-name {
		text-align: center;
		white-space: normal;
		word-break: break-word;
		line-height: 1.3;
		font-size: 1.1rem;
	}

	.file-actions {
		justify-content: center;
		gap: 10px;
	}

	.file-link {
		flex: 1;
		min-width: 85px;
		max-width: 110px;
		font-size: 0.85rem;
		padding: 8px 12px;
	}

	#music-list {
		height: 350px;
		padding: 0 16px;
	}

	footer {
		bottom: 20px;
		gap: 28px;
		padding: 6px 14px;
	}
}

@media (max-width: 480px) {
	body {
		padding: 20px 12px 120px;
	}

	h1 {
		font-size: 2.5rem;
		letter-spacing: 0.08em;
	}

	.search-bar {
		padding: 0 12px;
	}

	#search {
		padding: 14px 18px;
		font-size: 1.1rem;
	}

	.file-card {
		padding: 14px 16px;
		border-radius: 12px;
		min-height: 85px;
		gap: 10px;
	}

	.file-name {
		font-size: 1rem;
	}

	.file-actions {
		flex-direction: column;
		gap: 8px;
		width: 100%;
	}

	.file-link {
		width: 100%;
		max-width: none;
		min-width: auto;
		padding: 10px 16px;
		font-size: 0.9rem;
		border-radius: 25px;
	}

	#music-list {
		height: 300px;
		gap: 12px;
		padding: 0 12px;
	}

	footer {
		gap: 24px;
		bottom: 15px;
		padding: 4px 12px;
	}

	.social-link {
		font-size: 2.2rem;
		min-width: 44px;
		min-height: 44px;
		padding: 6px;
	}
}

@media (max-width: 360px) {
	body {
		padding: 18px 10px 110px;
	}

	h1 {
		font-size: 2.2rem;
	}

	#search {
		padding: 12px 16px;
		font-size: 1rem;
	}

	.file-card {
		padding: 12px 14px;
		min-height: 90px;
	}

	.file-name {
		font-size: 0.95rem;
	}

	.file-link {
		font-size: 0.8rem;
		padding: 9px 14px;
	}

	#music-list {
		height: 280px;
		padding: 0 10px;
	}

	footer {
		gap: 20px;
		bottom: 12px;
		padding: 4px 10px;
	}

	.social-link {
		font-size: 2rem;
		min-width: 40px;
		min-height: 40px;
		padding: 4px;
	}
}

@media (min-width: 1200px) {
	.main-container {
		max-width: 1400px;
	}

	#music-list {
		max-width: 1000px;
		height: clamp(400px, 65vh, 600px);
	}
}

@media (max-height: 500px) and (orientation: landscape) {
	body {
		padding-top: clamp(12px, 2vh, 24px);
		padding-bottom: clamp(60px, 12vh, 80px);
	}

	h1 {
		font-size: clamp(1.5rem, 4vh, 2.5rem);
	}

	.title-container {
		margin-bottom: clamp(12px, 2vh, 20px);
	}

	.search-bar {
		margin-bottom: clamp(12px, 2vh, 20px);
	}

	#music-list {
		height: clamp(150px, 45vh, 250px);
	}

	footer {
		bottom: clamp(8px, 2vh, 15px);
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	body::before {
		animation: none;
	}

	h1,
	h1::after {
		animation: none;
	}
}

@media (prefers-contrast: high) {
	.file-card {
		border: 2px solid #f0b66a;
	}

	.file-link {
		border: 2px solid #f0b66a;
	}

	#search {
		border: 2px solid #f0b66a;
	}
}

*:focus-visible {
	outline: 2px solid #f0b66a;
	outline-offset: 2px;
}

@media print {
	body {
		background: white;
		color: black;
	}

	body::before {
		display: none;
	}

	footer {
		position: static;
		margin-top: 2rem;
	}

	.file-card {
		background: white;
		border: 1px solid black;
		box-shadow: none;
	}
}
