:root {
	color-scheme: dark;
	font-family: Inter, ui-sans-serif, system-ui, sans-serif;
	background: #0b1020;
	color: #eef2ff;
}

* { box-sizing: border-box; }

body {
	min-height: 100vh;
	margin: 0;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 20% 0%, #1e3a8a55, transparent 35rem),
		#0b1020;
}

.app {
	width: min(1100px, calc(100% - 32px));
	margin: 32px auto;
}

header { margin-bottom: 24px; }
h1 { margin: 4px 0 8px; font-size: clamp(2rem, 5vw, 3.5rem); }
.eyebrow { margin: 0; color: #818cf8; font-weight: 800; letter-spacing: .16em; }
.status { min-height: 1.5em; margin: 0; color: #a5b4fc; }

.join-form {
	max-width: 580px;
	margin-bottom: 24px;
}

label { display: block; margin-bottom: 8px; font-weight: 700; }
.join-row { display: flex; gap: 10px; }

input, button {
	border: 1px solid #334155;
	border-radius: 12px;
	padding: 12px 16px;
	font: inherit;
}

input {
	min-width: 0;
	flex: 1;
	background: #111827;
	color: inherit;
}

button {
	cursor: pointer;
	border-color: #6366f1;
	background: #4f46e5;
	color: white;
	font-weight: 700;
}

button:hover:not(:disabled) { background: #6366f1; }
button:disabled { cursor: not-allowed; opacity: .45; }
button.danger { border-color: #be123c; background: #9f1239; }

.videos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

figure {
	position: relative;
	overflow: hidden;
	min-height: 240px;
	margin: 0;
	border: 1px solid #293548;
	border-radius: 18px;
	background: #050814;
	box-shadow: 0 18px 60px #0006;
}

video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

figcaption {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #020617bb;
	font-size: .85rem;
}

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.diagnostics {
	margin-top: 24px;
	padding: 18px;
	border: 1px solid #7f1d1d;
	border-radius: 14px;
	background: #220b12;
}

.diagnostics h2 {
	margin: 0 0 12px;
	font-size: 1rem;
	color: #fda4af;
}

.diagnostics pre {
	overflow-x: auto;
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: #fecdd3;
	font: .85rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 700px) {
	.videos { grid-template-columns: 1fr; }
	.join-row { flex-direction: column; }
}
