:root {
	color-scheme: dark;
	--bg: #0d0d0f;
	--panel: #16161a;
	--text: #e6e6e6;
	--muted: #8a8a93;
	--accent: #f97316;
	--border: #26262c;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	height: 100%;
	background: var(--bg);
	color: var(--text);
	font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, sans-serif;
}

header {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border);
}

header h1 {
	font-size: 1rem;
	margin: 0;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
}

.muted {
	color: var(--muted);
	font-size: 0.85rem;
}

main {
	display: grid;
	grid-template-columns: 280px 1fr;
	height: calc(100% - 49px);
}

#sidebar {
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	min-height: 0;
}

#filter {
	margin: 0.5rem;
	padding: 0.4rem 0.6rem;
	background: var(--panel);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 4px;
	outline: none;
}

#filter:focus {
	border-color: var(--accent);
}

#list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0.5rem;
	overflow: auto;
	flex: 1;
}

#list li {
	padding: 0.4rem 0.6rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.85rem;
	word-break: break-all;
	color: var(--text);
}

#list li:hover {
	background: var(--panel);
}

#list li.active {
	background: var(--accent);
	color: #000;
}

#list li .size {
	display: block;
	font-size: 0.7rem;
	color: var(--muted);
}

#list li.active .size {
	color: rgba(0, 0, 0, 0.6);
}

#player {
	display: flex;
	flex-direction: column;
	padding: 1rem;
	gap: 0.5rem;
	min-width: 0;
}

#video {
	width: 100%;
	flex: 1;
	min-height: 0;
	background: #000;
	border-radius: 4px;
}

#meta {
	font-family: ui-monospace, SFMono-Regular, monospace;
}

@media (max-width: 700px) {
	main {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}
	#sidebar {
		border-right: none;
		border-bottom: 1px solid var(--border);
		max-height: 40vh;
	}
}
