#bg {
	position: fixed;
	inset: 0;
	background: url('background.png') center / cover no-repeat;
	filter: blur(6px);
	transform: scale(1.06); /* slight overscale hides blur edge bleed */
	z-index: -1;
}

body {
	margin: 0;
	background-color: transparent;
	color: #fff;
	font-family: Monospace;
	font-size: 13px;
	line-height: 24px;
	overscroll-behavior: none;
}

a {
	color: #ff0;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

button {
	cursor: pointer;
	text-transform: uppercase;
}

#info {
	position: absolute;
	top: 0px;
	width: 100%;
	padding: 10px;
	box-sizing: border-box;
	text-align: center;
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	z-index: 1; /* TODO Solve this in HTML */
}

a, button, input, select {
	pointer-events: auto;
}

.lil-gui {
	z-index: 2 !important; /* TODO Solve this in HTML */
}

@media all and ( max-width: 640px ) {
	.lil-gui.root { 
		right: auto;
		top: auto;
		max-height: 50%;
		max-width: 80%;
		bottom: 0;
		left: 0;
	}
}

#overlay {
	position: absolute;
	font-size: 16px;
	z-index: 2;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	background: rgba(0,0,0,0.7);
}

	#overlay button {
		background: transparent;
		border: 0;
		border: 1px solid rgb(255, 255, 255);
		border-radius: 4px;
		color: #ffffff;
		padding: 12px 18px;
		text-transform: uppercase;
		cursor: pointer;
	}

#notSupported {
	width: 50%;
	margin: auto;
	background-color: #f00;
	margin-top: 20px;
	padding: 10px;
}

/* ── Gallery navigation ───────────────────────────────────── */
#nav-prev, #nav-next {
	position: fixed;
	top: 50%;
	transform: translateY( -50% );
	z-index: 10;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba( 0,0,0,0.6 );
	border: 1px solid rgba( 255,255,255,0.2 );
	cursor: pointer;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
}
#nav-prev { left: 1rem; }
#nav-next { right: 1rem; }

#nav-counter {
	position: fixed;
	bottom: 4rem;
	left: 50%;
	transform: translateX( -50% );
	z-index: 10;
	font-family: Monospace;
	font-size: 12px;
	color: #aaa;
	pointer-events: none;
}

/* ── Upload button ────────────────────────────────────────── */
#upload-btn {
	position: fixed;
	top: 14px;
	right: 16px;
	z-index: 10;
	background: #000;
	border: none;
	color: #fff;
	font-family: Monospace;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 0.08em;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	pointer-events: auto;
}

/* ── Upload modal ─────────────────────────────────────────── */
#upload-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 200;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

#modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0,0,0,0.8 );
}

#modal-box {
	position: relative;
	background: #0d0d0d;
	border: 1px solid rgba( 255,255,255,0.1 );
	border-radius: 10px;
	width: 100%;
	max-width: 460px;
	padding: 2rem;
	font-family: Monospace;
	color: #fff;
	box-shadow: 0 24px 60px rgba( 0,0,0,0.7 );
	max-height: 90vh;
	overflow-y: auto;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.modal-header span {
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.modal-header button {
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 4px 8px;
}

.modal-field {
	margin-bottom: 1.1rem;
}

.modal-field label {
	display: block;
	font-size: 10px;
	color: #ff0;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.modal-field input,
.modal-field textarea {
	width: 100%;
	box-sizing: border-box;
	background: #1a1a1a;
	border: 1px solid rgba( 255,255,255,0.12 );
	border-radius: 4px;
	color: #fff;
	padding: 10px 12px;
	font-family: Monospace;
	font-size: 13px;
	outline: none;
	resize: vertical;
}

.file-drop {
	position: relative;
	background: #1a1a1a;
	border: 1px dashed rgba( 255,255,255,0.2 );
	border-radius: 4px;
	padding: 1rem;
	text-align: center;
	cursor: pointer;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.file-drop span { color: #555; font-size: 13px; }

.file-drop input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.modal-btn {
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-family: Monospace;
	font-weight: bold;
	font-size: 13px;
	letter-spacing: 0.1em;
	padding: 12px;
	text-transform: uppercase;
}

.modal-btn-primary {
	width: 100%;
	background: #000;
	color: #fff;
	border: 1px solid rgba( 255,255,255,0.15 );
	margin-top: 0.5rem;
}

.modal-btn-primary:disabled {
	background: #222;
	cursor: not-allowed;
}

/* ── Music player ─────────────────────────────────────────── */
#player {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX( -50% );
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 20px;
	background: rgba( 0, 0, 0, 0.75 );
	color: #fff;
	font-family: Monospace;
	font-size: 12px;
	pointer-events: auto;
	white-space: nowrap;
}

#track-name {
	color: #ff0;
	letter-spacing: 0.05em;
}

#player-controls {
	display: flex;
	align-items: center;
	gap: 14px;
}

#player-controls button {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	opacity: 0.85;
	text-transform: none;
}

#player-controls button:hover {
	opacity: 1;
}
