/*
	The look of the page around the 3D view: a green-phosphor vector HUD in the Battlezone tradition, and dark glass panels for the menu, the pause card, and the physics lab.
*/


/* #region The page */
:root
{
	--phosphor: #8dffa8;
	--phosphor-dim: rgba(141, 255, 168, 0.45);
	--phosphor-faint: rgba(141, 255, 168, 0.12);
	--amber: #ffc45a;
	--alert: #ff6a5a;
	--glass: rgba(6, 12, 10, 0.72);
	--type: "Consolas", "Lucida Console", "Courier New", monospace;
}

html, body
{
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: #000;
	color: var(--phosphor);
	font-family: var(--type);
	user-select: none;
}

#stage
{
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.hidden
{
	display: none !important;
}

button
{
	font-family: var(--type);
	letter-spacing: 0.18em;
	color: var(--phosphor);
	background: rgba(20, 40, 28, 0.6);
	border: 1px solid var(--phosphor-dim);
	padding: 10px 22px;
	cursor: pointer;
	text-shadow: 0 0 6px var(--phosphor-dim);
}

button:hover, button.active
{
	background: rgba(60, 120, 80, 0.45);
	border-color: var(--phosphor);
}
/* #endregion */


/* #region The HUD */
#hud
{
	position: fixed;
	inset: 0;
	pointer-events: none;
	text-shadow: 0 0 6px var(--phosphor-dim);
}

#objective
{
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	letter-spacing: 0.25em;
}

#objective-title
{
	display: block;
	font-size: 15px;
}

#objective-detail
{
	display: block;
	font-size: 12px;
	opacity: 0.75;
	margin-top: 4px;
	letter-spacing: 0.12em;
}

#clock
{
	position: absolute;
	top: 62px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 30px;
	letter-spacing: 0.08em;
}

#flash
{
	position: absolute;
	top: 30%;
	left: 50%;
	transform: translateX(-50%);
	font-size: 26px;
	letter-spacing: 0.3em;
	color: var(--amber);
	text-shadow: 0 0 12px rgba(255, 196, 90, 0.7);
	opacity: 0;
	transition: opacity 0.25s;
	white-space: nowrap;
}

#flash.shown
{
	opacity: 1;
}

#standings
{
	position: absolute;
	top: 110px;
	right: 24px;
	font-size: 13px;
	line-height: 1.7;
	text-align: right;
}

#standings .you
{
	color: var(--amber);
}

#reticle
{
	position: absolute;
	left: 50%;
	top: 50%;
	width: 120px;
	height: 120px;
	transform: translate(-50%, -50%);
	stroke: var(--phosphor);
	stroke-width: 1.5;
	fill: none;
	filter: drop-shadow(0 0 3px var(--phosphor-dim));
}

#reticle .dot
{
	fill: var(--phosphor);
}

#reticle.locked
{
	stroke: var(--alert);
}

#lock
{
	position: absolute;
	left: 50%;
	top: calc(50% + 44px);
	transform: translateX(-50%);
	font-size: 11px;
	letter-spacing: 0.2em;
	color: var(--alert);
	text-shadow: 0 0 6px rgba(255, 106, 90, 0.6);
}

#pitch-ladder
{
	position: absolute;
	left: calc(50% + 90px);
	top: calc(50% - 60px);
	width: 6px;
	height: 120px;
	border-left: 1px solid var(--phosphor-dim);
}

#pitch-mark
{
	position: absolute;
	left: -1px;
	width: 10px;
	height: 2px;
	background: var(--phosphor);
}

#radar-frame
{
	position: absolute;
	left: 22px;
	bottom: 22px;
	width: 180px;
	height: 180px;
}

#radar
{
	width: 180px;
	height: 180px;
}

#heading
{
	position: absolute;
	top: -20px;
	width: 100%;
	text-align: center;
	font-size: 12px;
	letter-spacing: 0.2em;
}

#readouts
{
	position: absolute;
	left: 220px;
	bottom: 28px;
	font-size: 14px;
	line-height: 1.6;
}

.label
{
	display: inline-block;
	width: 52px;
	opacity: 0.6;
	font-size: 11px;
	letter-spacing: 0.2em;
}

#weapon-panel
{
	position: absolute;
	left: 50%;
	bottom: 26px;
	transform: translateX(-50%);
	text-align: center;
	width: 260px;
	font-size: 13px;
	letter-spacing: 0.2em;
}

.bar
{
	height: 6px;
	border: 1px solid var(--phosphor-dim);
	margin-top: 6px;
}

.bar > div
{
	height: 100%;
	background: var(--phosphor);
	box-shadow: 0 0 8px var(--phosphor-dim);
	transition: width 0.1s;
}

#hull-panel
{
	position: absolute;
	right: 26px;
	bottom: 26px;
	width: 220px;
	text-align: right;
	font-size: 13px;
}

#hull-bar.low
{
	background: var(--alert);
}

#craft-name
{
	margin-top: 6px;
	font-size: 11px;
	opacity: 0.7;
	letter-spacing: 0.15em;
}

#hint
{
	position: absolute;
	bottom: 90px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 12px;
	opacity: 0.75;
	letter-spacing: 0.12em;
}
/* #endregion */


/* #region The menu */
#menu
{
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding-top: 6vh;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.8));
}

#title
{
	text-align: center;
	text-shadow: 0 0 14px var(--phosphor-dim);
}

#title-kicker
{
	font-size: 12px;
	letter-spacing: 0.35em;
	opacity: 0.7;
}

h1
{
	margin: 10px 0 0;
	font-size: 46px;
	letter-spacing: 0.32em;
	font-weight: normal;
}

h2
{
	font-size: 13px;
	letter-spacing: 0.35em;
	font-weight: normal;
	opacity: 0.7;
	margin: 0 0 10px;
}

#menu-body
{
	display: flex;
	gap: 28px;
	margin-top: auto;
	margin-bottom: 18px;
}

#menu-body section
{
	background: var(--glass);
	border: 1px solid var(--phosphor-faint);
	padding: 16px 18px;
	backdrop-filter: blur(6px);
}

#range-list, #craft-list
{
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 300px;
}

.choice
{
	text-align: left;
	letter-spacing: 0.12em;
	padding: 9px 14px;
}

.choice small
{
	display: block;
	letter-spacing: 0.04em;
	opacity: 0.65;
	margin-top: 3px;
	font-size: 11px;
	text-shadow: none;
}

#craft-list
{
	max-height: 300px;
	overflow-y: auto;
}

#craft-detail
{
	margin-top: 10px;
	font-size: 11px;
	line-height: 1.6;
	opacity: 0.8;
	max-width: 300px;
}

#launch
{
	font-size: 18px;
	padding: 14px 60px;
	margin-bottom: 14px;
}

#controls-help
{
	font-size: 11px;
	opacity: 0.6;
	text-align: center;
	line-height: 1.8;
	margin-bottom: 4vh;
	letter-spacing: 0.06em;
}
/* #endregion */


/* #region The pause card and the loading card */
#pause, #loading
{
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(0, 0, 0, 0.55);
}

#pause button
{
	min-width: 240px;
}

#click-hint
{
	margin-top: 14px;
	font-size: 12px;
	opacity: 0.6;
}

#loading
{
	letter-spacing: 0.4em;
	background: #000;
}
/* #endregion */


/* #region The physics lab */
#lab
{
	position: fixed;
	top: 12px;
	right: 12px;
	bottom: 12px;
	width: 460px;
	background: var(--glass);
	border: 1px solid var(--phosphor-faint);
	backdrop-filter: blur(8px);
	font-size: 11.5px;
	display: flex;
	flex-direction: column;
	pointer-events: auto;
}

#lab-tabs
{
	display: flex;
}

#lab-tabs button
{
	flex: 1;
	padding: 8px 4px;
	font-size: 10px;
	letter-spacing: 0.12em;
	border-width: 0 0 1px 0;
}

.lab-page
{
	overflow-y: auto;
	padding: 10px 12px;
	flex: 1;
}

.lab-page table
{
	width: 100%;
	border-collapse: collapse;
}

.lab-page td
{
	padding: 2px 4px;
	vertical-align: top;
}

.lab-page td:last-child
{
	text-align: right;
	color: #e8fff0;
}

.lab-page tr.group td
{
	padding-top: 10px;
	opacity: 0.6;
	letter-spacing: 0.2em;
	text-align: left;
}

.tag
{
	font-size: 9px;
	padding: 0 4px;
	border: 1px solid currentColor;
	margin-left: 4px;
}

.tag.live
{
	color: var(--phosphor);
}

.tag.silent
{
	color: var(--amber);
}

.tag.dead
{
	color: var(--alert);
}

.pass
{
	color: var(--phosphor);
}

.fail
{
	color: var(--alert);
}

.switch
{
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid var(--phosphor-faint);
}

.switch button
{
	padding: 4px 10px;
	font-size: 10px;
}

.note
{
	opacity: 0.6;
	line-height: 1.6;
	margin: 6px 0 10px;
}
/* #endregion */