﻿
*, *::before, *::after
{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root
{
	--red: #c0392b;
}

body
{
	font-family: system-ui, sans-serif;
	background: #111;
	color: #fff;
	min-height: 100dvh;
}

nav
{
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
	height: 64px;
	background: rgba(10,10,10,0.85);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo
{
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--red);
	text-decoration: none;
}

.nav-links
{
	display: flex;
	gap: 0.25rem;
	list-style: none;
}

	.nav-links a
	{
		display: block;
		padding: 0.4rem 0.9rem;
		border-radius: 99px;
		color: rgba(255,255,255,0.75);
		text-decoration: none;
		font-size: 0.9rem;
		font-weight: 500;
		transition: background 0.2s, color 0.2s;
	}

		.nav-links a:hover, .nav-links a.active
		{
			background: rgba(192,57,43,0.25);
			color: #fff;
		}

.hamburger
{
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
}

	.hamburger span
	{
		display: block;
		width: 24px;
		height: 2px;
		background: #fff;
		border-radius: 2px;
		transition: transform 0.3s, opacity 0.3s;
	}

	.hamburger.open span:nth-child(1)
	{
		transform: translateY(7px) rotate(45deg);
	}

	.hamburger.open span:nth-child(2)
	{
		opacity: 0;
	}

	.hamburger.open span:nth-child(3)
	{
		transform: translateY(-7px) rotate(-45deg);
	}

.drawer
{
	display: none;
	position: fixed;
	top: 64px;
	left: 0;
	right: 0;
	z-index: 9;
	background: rgba(10,10,10,0.97);
	backdrop-filter: blur(20px);
	padding: 1rem 1.5rem 2rem;
	transform: translateY(-110%);
	transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

	.drawer.open
	{
		transform: translateY(0);
	}

	.drawer a
	{
		display: block;
		padding: 1rem 0;
		color: rgba(255,255,255,0.8);
		text-decoration: none;
		font-size: 1.4rem;
		font-weight: 700;
		border-bottom: 1px solid rgba(255,255,255,0.07);
	}

		.drawer a:last-child
		{
			border-bottom: none;
		}

		.drawer a:hover
		{
			color: var(--red);
		}

@media (max-width: 640px)
{
	.nav-links
	{
		display: none;
	}

	.hamburger
	{
		display: flex;
	}

	.drawer
	{
		display: block;
	}
}

.content
{
	max-width: 960px;
	margin: 3rem auto;
	padding: 0 1.5rem;
}

h1
{
	font-size: clamp(2rem,8vw,4rem);
	font-weight: 900;
	margin-bottom: 2rem;
}

.hero-wrap
{
	display: flex;
	flex-direction: column;
	max-width: 500px;
	margin: 0 auto 3rem;
}

.hero-label
{
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 0.5rem;
}

.hero-thumb
{
	position: relative;
	aspect-ratio: 4/3;
	border-radius: 1.5rem;
	overflow: hidden;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 5rem;
}

	.hero-thumb img
	{
		width: 100%;
		height: 100%;
		object-fit: cover;
		cursor: pointer;
		transition: transform 0.2s;
	}

		.hero-thumb img:hover
		{
			transform: scale(1.03);
		}

	.hero-thumb .play-badge
	{
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 3rem;
		color: #fff;
		text-shadow: 0 2px 8px rgba(0,0,0,0.6);
		pointer-events: none;
	}

.upload-progress-wrap
{
	display: none;
	align-items: center;
	gap: 0.6rem;
	max-width: 360px;
	margin: -1rem 0 2rem;
}

.upload-progress-track
{
	flex: 1;
	height: 6px;
	background: rgba(255,255,255,0.1);
	border-radius: 99px;
	overflow: hidden;
}

.upload-progress-bar
{
	height: 100%;
	width: 0%;
	background: var(--red);
	transition: width 0.15s;
}

.upload-progress-text
{
	font-size: 0.8rem;
	opacity: 0.7;
	min-width: 5rem;
}

.upload-btn.busy
{
	opacity: 0.5;
	pointer-events: none;
}

.grid
{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.75rem;
}

	.grid .item
	{
		display: flex;
		flex-direction: column;
		transition: opacity 0.15s;
	}

		.grid .item.dragging
		{
			opacity: 0.35;
		}

		.grid .item.drag-over
		{
			outline: 2px dashed var(--red);
			outline-offset: 4px;
			border-radius: 0.75rem;
		}

.thumb-wrap
{
	position: relative;
}

.grid .item img
{
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	border-radius: 0.75rem;
	cursor: pointer;
	transition: transform 0.2s;
}

	.grid .item img:hover
	{
		transform: scale(1.03);
	}

.grid.reorder-mode .item img
{
	cursor: grab;
}

.play-badge
{
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5rem;
	color: #fff;
	text-shadow: 0 2px 8px rgba(0,0,0,0.6);
	pointer-events: none;
}

.caption
{
	font-size: 0.85rem;
	line-height: 1.4;
	color: rgba(255,255,255,0.75);
	margin-top: 0.35rem;
	word-break: break-word;
}

	.caption:empty
	{
		display: none;
	}

.caption-edit
{
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.4rem;
	font-size: 0.85rem;
	font-family: inherit;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 0.4rem;
	color: #fff;
	resize: vertical;
	min-height: 3.5rem;
}

.caption-btn
{
	margin-top: 0.25rem;
	padding: 0.2rem 0.6rem;
	font-size: 0.75rem;
	border-radius: 99px;
	border: none;
	background: rgba(255,255,255,0.12);
	color: #fff;
	cursor: pointer;
}

	.caption-btn:hover
	{
		background: rgba(255,255,255,0.2);
	}

.caption-btn-danger
{
	background: rgba(192,57,43,0.3);
}

	.caption-btn-danger:hover
	{
		background: rgba(192,57,43,0.55);
	}

.empty
{
	opacity: 0.35;
	font-size: 0.9rem;
	padding: 1rem 0;
}

.upload-btn
{
	display: inline-block;
	padding: 0.6rem 1.4rem;
	margin-bottom: 2rem;
	border-radius: 99px;
	background: var(--red);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
	transition: filter 0.2s;
}

	.upload-btn:hover
	{
		filter: brightness(0.85);
	}

#lb
{
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.92);
	z-index: 99;
	align-items: center;
	justify-content: center;
}

	#lb.open
	{
		display: flex;
	}

	#lb img,
	#lb video
	{
		max-width: 90vw;
		max-height: 90vh;
		border-radius: 0.5rem;
	}

#lb-body
{
	display: flex;
	flex-direction: column;
	align-items: center;
}

#lb-media
{
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}

.lb-nav
{
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,0.45);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	user-select: none;
}

	.lb-nav:hover
	{
		background: rgba(0,0,0,0.7);
	}

#lb-prev
{
	left: 0.75rem;
}

#lb-next
{
	right: 0.75rem;
}

@media (hover: none)
{
	.lb-nav
	{
		opacity: 0.35;
	}
}

#lb-caption
{
	color: #fff;
	font-size: 0.9rem;
	line-height: 1.5;
	margin-top: 0.75rem;
	max-width: 90vw;
	text-align: center;
	word-break: break-word;
}

	#lb-caption:empty
	{
		display: none;
	}

#lb-body .caption-edit
{
	max-width: 90vw;
	min-width: min(400px, 90vw);
	margin-top: 0.75rem;
}

#lb-body #lb-save-btn
{
	margin-top: 0.75rem;
}

.lb-actions
{
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

#lb-close
{
	position: absolute;
	top: 1rem;
	right: 1.5rem;
	font-size: 2rem;
	cursor: pointer;
	color: #fff;
}
