:root {
	--moving-gradient: linear-gradient(90deg, #c59a1b, #3b7f3f, #ffffff, #c59a1b, #3b7f3f, #ffffff, #c59a1b);
	--panel-background: rgba(0, 0, 0, 0.58);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 24px;
	min-height: 100vh;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1.5;
	text-align: center;
	background: url("images/background.gif") center center / cover fixed no-repeat;
	color: #ffffff;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.42);
	pointer-events: none;
	z-index: 0;
}

main {
	position: relative;
	z-index: 1;
	max-width: 960px;
	margin: 0 auto;
	padding: 24px;
	background: var(--panel-background);
	border-radius: 18px;
	border: 3px solid transparent;
	background-image: linear-gradient(var(--panel-background), var(--panel-background)), var(--moving-gradient);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	background-size: 100% 100%, 400% 100%;
	animation: moveGradient 18s linear infinite;
	box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}

.audio-prompt {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 5;
	width: min(92vw, 560px);
	padding: 14px 16px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.25);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
	color: #ffffff;
}

.audio-prompt-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.audio-prompt.hidden {
	display: none;
}

h1,
h2 {
	font-size: 1.6rem;
	margin-top: 0;
	color: #ffffff;
}

p,
label {
	color: #ffffff;
}

pre,
code,
input,
button,
canvas {
	font-size: 1rem;
}

pre {
	max-width: 100%;
	padding: 14px;
	overflow-x: auto;
	white-space: pre-wrap;
	text-align: left;
	background-color: rgba(0, 0, 0, 0.55);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

code {
	color: #ffffff;
}

.portfolio-note {
	color: #ffffff;
}

.portfolio-link {
	font-style: italic;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	background-image: linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe14a, #22c55e, #38bdf8, #6366f1, #f43f5e, #ff3b3b);
	background-size: 300% 100%;
	animation: rainbowShift 4.5s linear infinite;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
	text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

input[type="file"] {
	max-width: 100%;
	padding: 10px;
	margin: 8px auto;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
}

button {
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	background: linear-gradient(135deg, #c59a1b, #3b7f3f);
	color: #ffffff;
	font-weight: 500;
}

button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

canvas {
	display: block;
	margin: 12px auto;
	width: 96px;
	height: 96px;
	image-rendering: pixelated;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.45);
	box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

@keyframes moveGradient {
	0% {
		background-position: 0% 50%;
	}
	100% {
		background-position: 100% 50%;
	}
}

@keyframes rainbowShift {
	0% {
		background-position: 0% 50%;
	}
	100% {
		background-position: 100% 50%;
	}
}

@media (max-width: 640px) {
	body {
		padding: 14px;
	}

	main {
		padding: 18px;
	}
}
