@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding-top: 36px;
	min-height: 100vh;
	font-family: "Inter", Arial, sans-serif;
	background: #050608;
	color: #f1f5f9;
	overflow-x: hidden;
}

#bg-canvas {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
}

.alert-warning {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 8px 12px;
	font-size: 0.76rem;
	text-align: center;
	color: #f6cd57;
	background: rgba(39, 30, 3, 0.96);
	border-bottom: 1px solid #4d3c08;
	z-index: 1000;
}

.app-shell {
	position: relative;
	z-index: 1;
	width: min(1600px, 96vw);
	min-height: 84vh;
	margin: 12px auto 16px;
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 16px;
}

.app-sidebar {
	padding: 22px;
	border-radius: 12px;
	background: rgba(14, 16, 23, 0.94);
	border: 1px solid rgba(122, 130, 156, 0.2);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.44);
}

h1 {
	margin: 0 0 10px;
	font-size: 1.62rem;
	letter-spacing: -0.02em;
}

.description {
	margin: 0 0 10px;
	line-height: 1.5;
	font-size: 0.83rem;
	color: #a5b0c2;
}

.description b {
	color: #e2e8f0;
}

.description a {
	color: #bca7ff;
	text-decoration: none;
}

.description a:hover {
	text-decoration: underline;
}

.description-muted {
	color: #7f8ca4;
	margin-bottom: 16px;
}

#ref-input-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

#ref-input-row.hidden {
	display: none;
}

.input-label {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #7f8ca4;
	font-weight: 600;
}

#ref-select {
	width: 100%;
	font-family: inherit;
	font-size: 0.82rem;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1px solid #2c3350;
	background: #0a0c13;
	color: #ecf2ff;
	outline: none;
	transition:
		border-color 0.16s,
		box-shadow 0.16s;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #7f8ca4 50%),
		linear-gradient(135deg, #7f8ca4 50%, transparent 50%);
	background-position:
		calc(100% - 16px) calc(50% - 2px),
		calc(100% - 11px) calc(50% - 2px);
	background-size:
		5px 5px,
		5px 5px;
	background-repeat: no-repeat;
	padding-right: 30px;
}

#ref-select:focus {
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.viewer-host {
	min-width: 0;
	padding: 12px;
	border-radius: 12px;
	background: rgba(12, 14, 20, 0.93);
	border: 1px solid rgba(122, 130, 156, 0.18);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.44);
}

@media (max-width: 980px) {
	.app-shell {
		grid-template-columns: 1fr;
	}
}
