/* НАОБОРОТ web: HUD поверх канвы. Тёмный космос, моноширинный шрифт. */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; background: #05070d; }

body {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	color: #cfd8e3;
	user-select: none;
}

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

#hud { position: fixed; inset: 0; pointer-events: none; }

#topbar, #botbar {
	position: absolute; left: 0; right: 0;
	display: flex; justify-content: space-between; align-items: flex-start;
	padding: 10px 12px; gap: 8px;
}
#topbar { top: 0; }
#botbar { bottom: 0; align-items: flex-end; }

.chip {
	background: rgba(8, 12, 22, 0.72);
	border: 1px solid rgba(120, 160, 220, 0.25);
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 13px;
	pointer-events: auto;
	backdrop-filter: blur(4px);
	white-space: nowrap;
}
.chip.big { font-size: 17px; letter-spacing: 1px; color: #eef4fb; }
#counterChip { opacity: 0.95; }

.chip button {
	background: none; border: none; color: #7fa8d8; cursor: pointer;
	font-size: 13px; padding: 0 2px; font-family: inherit;
}
.chip button:hover { color: #d6e9ff; }

#face { color: #8fb7e8; margin-right: 8px; }

.col { display: flex; flex-direction: column; gap: 8px; }
.col.left { align-items: flex-start; }
.col.mid { align-items: center; flex: 1; }
.col.right { align-items: flex-end; }

#mode { font-size: 12px; color: #9adcff; letter-spacing: 3px; min-height: 16px; }

#hints { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.hint {
	background: rgba(8, 12, 22, 0.78);
	border: 1px solid rgba(120, 160, 220, 0.2);
	border-radius: 5px;
	padding: 4px 12px;
	font-size: 13px;
	color: #d9e6f4;
	transition: opacity 0.6s;
}
.hint.gone { opacity: 0; }

#beacons {
	background: rgba(8, 12, 22, 0.72);
	border: 1px solid rgba(190, 120, 255, 0.35);
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 12px;
	pointer-events: auto;
	max-width: 340px;
}
#beacons.empty { display: none; }
#beacons .btitle { color: #cf9bf2; letter-spacing: 2px; font-size: 10px; margin-bottom: 4px; }
#beacons .brow { display: flex; justify-content: space-between; gap: 10px; padding: 1px 0; }
#beacons .brow span { overflow: hidden; text-overflow: ellipsis; }
#beacons button {
	background: rgba(190, 120, 255, 0.15); border: 1px solid rgba(190, 120, 255, 0.4);
	border-radius: 4px; color: #e6c8ff; cursor: pointer; font-family: inherit; font-size: 11px;
}
#beacons button:hover { background: rgba(190, 120, 255, 0.35); }

#crosshair {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
	font-size: 20px; color: rgba(255, 255, 255, 0.75); text-shadow: 0 0 6px #000;
}

/* постоянная компактная шпаргалка управления */
#ctrlhint {
	position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
	font-size: 10px; letter-spacing: 0.4px; color: rgba(160, 185, 214, 0.55);
	text-shadow: 0 0 4px #000; white-space: nowrap;
}

#viewChip button {
	font-size: 14px; padding: 0 6px;
}
#viewChip span { display: inline-block; min-width: 44px; text-align: center; }

#pause {
	position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
	background: rgba(8, 12, 22, 0.85); border: 1px solid rgba(120, 160, 220, 0.3);
	border-radius: 6px; padding: 8px 16px; font-size: 13px; color: #bcd2ea;
}

.off { display: none !important; }

/* модалка телепорта и стартовый оверлей */

#tpModal, #newsModal, #overlay {
	position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(3, 5, 10, 0.72);
	z-index: 10;
}
#overlay { background: radial-gradient(ellipse at 50% 40%, #0b1120 0%, #04060b 75%); }

.panel {
	width: min(560px, 92vw);
	background: rgba(10, 15, 28, 0.92);
	border: 1px solid rgba(120, 160, 220, 0.35);
	border-radius: 10px;
	padding: 26px 30px;
	display: flex; flex-direction: column; gap: 14px;
}
.ptitle { font-size: 26px; color: #f0f6ff; letter-spacing: 2px; }
.ptitle .thin { color: #7fa8d8; font-size: 16px; letter-spacing: 1px; }
.psub { font-size: 13px; color: #9fb4cc; line-height: 1.5; }

.panel input {
	background: #060a14; border: 1px solid rgba(120, 160, 220, 0.4);
	border-radius: 6px; color: #e8f1fb; font-family: inherit; font-size: 15px;
	padding: 10px 12px; outline: none;
}
.panel input:focus { border-color: #6ea8e8; }

.prow { display: flex; gap: 10px; }
.panel button {
	background: rgba(110, 168, 232, 0.16); border: 1px solid rgba(110, 168, 232, 0.5);
	border-radius: 6px; color: #d6e9ff; cursor: pointer; font-family: inherit;
	font-size: 14px; padding: 9px 18px; letter-spacing: 1px;
}
.panel button:hover { background: rgba(110, 168, 232, 0.32); }

#tpErr, #ovErr { color: #ff9d8a; font-size: 13px; min-height: 16px; }
.controls { font-size: 12px; color: #7f93ab; line-height: 1.7; }

/* новости администратора: чип ✉ NEWS и панель N */
#newsChip { cursor: pointer; }
#newsChip:hover { border-color: rgba(120, 160, 220, 0.55); }
#newsChip.unread { color: #ffd257; border-color: rgba(255, 210, 87, 0.5); }
#newsModal .panel { max-height: 76vh; }
#newsList {
	overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
	user-select: text;
}
#newsList .msg { border-left: 2px solid rgba(120, 160, 220, 0.35); padding-left: 12px; }
#newsList .mdate { font-size: 11px; color: #58708c; margin-bottom: 3px; }
#newsList .mtext {
	font-size: 13px; line-height: 1.55; color: #d9e6f4; overflow-wrap: break-word;
}
#newsList a { color: #7fd0ff; }
#newsList a:hover { color: #b8e6ff; }

#flash {
	position: fixed; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 12px;
	background: rgba(30, 6, 8, 0.45); z-index: 9; pointer-events: none;
	animation: flashin 0.4s;
}
#flashTitle { font-size: 42px; color: #ffd8c8; letter-spacing: 6px; text-shadow: 0 0 30px #ff5d45; }
#flashSub { font-size: 15px; color: #e8b8ad; }
@keyframes flashin { from { opacity: 0; } to { opacity: 1; } }
