:root {
	--radar-primary: #b1d0e7;
	--radar-secondary: #6492b4;
	--radar-green: #50904c;
	--radar-red: rgba(201, 11, 11, 0.9);
	--team-t: #df7d29;
	--team-ct: #84c8ed;
}

body {
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: Arial, Helvetica, sans-serif;
	-moz-user-select: none;
	user-select: none;
	cursor: not-allowed;
	background: #000000;
}

body > div {
	color: white;
	height: 100vh;
	width: 100vh;
	max-width: 100vh;
	max-height: 100vw;
	position: relative;
	overflow: hidden;
}




.settings-toggle {
	position: fixed;
	top: 10px;
	right: 10px;
	z-index: 1000;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 6px;
	background: rgba(20, 20, 30, 0.8);
	color: #a647c7;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.settings-toggle:hover {
	background: rgba(40, 40, 55, 0.95);
	color: #ffffff;
}

.settings-toggle svg {
	display: block;
	pointer-events: none;
}


.rotate90-toggle {
	top: 52px;
}


.settings-panel {
	position: fixed;
	top: 50px;
	right: 10px;
	z-index: 1001;
	width: 280px;
	max-height: 80vh;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 12px;
	border-radius: 8px;
	background: rgba(20, 20, 30, 0.95);
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	font-family: Arial, Helvetica, sans-serif;
}

.settings-panel[hidden] {
	display: none;
}


.settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(166, 71, 199, 0.3);
}

.settings-header h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
}

.settings-reset {
	padding: 3px 10px;
	font-size: 11px;
	color: #a647c7;
	background: transparent;
	border: 1px solid rgba(166, 71, 199, 0.5);
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.settings-reset:hover {
	background: rgba(166, 71, 199, 0.2);
	color: #ffffff;
}


.settings-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}


.settings-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 6px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-group:last-child {
	border-bottom: none;
}

.settings-group h3 {
	margin: 0 0 4px 0;
	font-size: 12px;
	font-weight: 600;
	color: #a647c7;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}


.settings-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.settings-row label {
	font-size: 12px;
	color: #c8c8d0;
}


.settings-panel input[type="range"] {
	width: 100px;
	accent-color: #a647c7;
	cursor: pointer;
}


.settings-panel input[type="checkbox"] {
	width: 14px;
	height: 14px;
	accent-color: #a647c7;
	cursor: pointer;
}


.settings-panel select {
	background: rgba(20, 20, 30, 0.9);
	color: #ffffff;
	border: 1px solid rgba(166, 71, 199, 0.4);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 12px;
	cursor: pointer;
}


.settings-value {
	font-size: 11px;
	color: #a647c7;
	min-width: 32px;
	text-align: right;
}


.conn-status {
	position: fixed;
	top: 10px;
	right: 54px;
	z-index: 1000;
	height: 36px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	border-radius: 6px;
	background: rgba(20, 20, 30, 0.8);
	font-size: 12px;
	font-weight: 600;
	color: #888888;
	pointer-events: none;
	white-space: nowrap;
}

.conn-status--connecting {
	color: #888888;
}

.conn-status--live {
	color: #4caf50;
}

.conn-status--error {
	color: #f44336;
}


.bomb-timer {
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: rgba(20, 20, 30, 0.85);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	font-family: Arial, Helvetica, sans-serif;
	color: #fff;
	min-width: 220px;
	box-sizing: border-box;
}

.bomb-timer[hidden] {
	display: none;
}

.bomb-timer-label {
	font-weight: bold;
	color: #ff4444;
	font-size: 14px;
}

.bomb-timer-bar {
	flex: 1;
	height: 8px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	overflow: hidden;
}

.bomb-timer-fill {
	height: 100%;
	background: linear-gradient(to right, #ff4444, #ff8844);
	border-radius: 4px;
	width: 100%;
}

.bomb-timer-text {
	font-weight: bold;
	font-size: 14px;
	min-width: 36px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.bomb-timer-defuse {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-left: 8px;
	border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.bomb-timer-defuse[hidden] {
	display: none;
}

.bomb-timer-defuse-label {
	font-size: 11px;
	color: #4488ff;
	font-weight: bold;
}

.bomb-timer-defuse-bar {
	width: 60px;
	height: 6px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
	overflow: hidden;
}

.bomb-timer-defuse-fill {
	height: 100%;
	background: linear-gradient(to right, #4488ff, #66aaff);
	border-radius: 3px;
	width: 0%;
}

.bomb-timer.urgent {
	animation: bomb-urgent 0.5s infinite;
}

@keyframes bomb-urgent {
	0%, 100% {
		background: rgba(20, 20, 30, 0.85);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	}
	50% {
		background: rgba(255, 0, 0, 0.85);
		box-shadow: 0 2px 12px rgba(255, 0, 0, 0.8);
	}
}

.bomb-timer.urgent .bomb-timer-text {
	color: #ff4444;
}


.bomb-timer.is-critical {
	border-color: #ff6860;
	box-shadow: 0 0 12px rgba(255, 104, 96, 0.6);
}
.bomb-timer.is-critical .bomb-timer-fill {
	background: #ff6860;
}
.bomb-timer.is-critical .bomb-timer-text {
	color: #ff6860;
}

.bomb-timer.is-defuse-safe {
	border-color: #4fe08d;
	box-shadow: 0 0 12px rgba(79, 224, 141, 0.6);
}
.bomb-timer.is-defuse-safe .bomb-timer-fill {
	background: #4fe08d;
}
.bomb-timer.is-defuse-safe .bomb-timer-text {
	color: #4fe08d;
}

.bomb-timer.is-defuse-late {
	border-color: #ff6860;
	box-shadow: 0 0 12px rgba(255, 104, 96, 0.6);
	animation: bomb-timer-pulse 0.5s infinite;
}
.bomb-timer.is-defuse-late .bomb-timer-fill {
	background: #ff6860;
}
.bomb-timer.is-defuse-late .bomb-timer-text {
	color: #ff6860;
}

@keyframes bomb-timer-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}


.team-panel {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 500;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
	width: 260px;
	max-height: 85vh;
	overflow-y: auto;
	background: rgba(15, 18, 25, 0.92);
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
	font-family: Arial, Helvetica, sans-serif;
	box-sizing: border-box;
}

.team-panel-left {
	left: 8px;
}

.team-panel-right {
	right: 8px;
}

.team-panel:empty {
	display: none;
}


.team-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 8px 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 2px;
}

.team-panel__name {
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.7);
}

.team-panel__count {
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	padding: 1px 6px;
	border-radius: 8px;
}

.team-panel__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.team-panel__empty {
	text-align: center;
	color: rgba(255, 255, 255, 0.3);
	font-size: 11px;
	padding: 12px 0;
}


.player-card {
	--card-accent: #888;
	position: relative;
	min-height: 90px;
	padding: 10px 10px 10px 80px;
	border-radius: 10px;
	border: 1px solid rgba(100, 146, 180, 0.13);
	background: linear-gradient(180deg, rgba(9, 23, 35, 0.94), rgba(7, 19, 29, 0.92));
	overflow: hidden;
	box-sizing: border-box;
	transition: opacity 0.2s, border-color 0.15s, box-shadow 0.15s;
	cursor: pointer;
}

.player-card.is-viewer-player {
	border-color: rgba(255, 138, 0, 0.9);
	box-shadow: 0 0 0 1px rgba(255, 138, 0, 0.4), 0 0 18px rgba(255, 138, 0, 0.18);
}

.player-card.is-ally {
	border-color: rgba(41, 140, 255, 0.42);
}

.player-card.is-enemy {
	border-color: rgba(239, 51, 64, 0.42);
}

.viewer-player-help {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: -2px 0 10px;
	padding: 8px 10px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 6px;
	background: rgba(255, 255, 255, .025);
	color: var(--radar-secondary);
	font-size: 11px;
}

.viewer-player-help span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.viewer-player-help small {
	flex-basis: 100%;
	color: rgba(255, 255, 255, .55);
	font-size: 10px;
}

.viewer-color {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.viewer-color--self { background: #ff8a00; }
.viewer-color--ally { background: #298cff; }
.viewer-color--enemy { background: #ef3340; }

.player-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 2px;
	background: var(--card-accent);
	opacity: 0.9;
}

.player-card.is-right {
	padding: 10px 80px 10px 10px;
}

.player-card.is-right::before {
	inset: 0 0 0 auto;
}

.player-card.is-dead {
	opacity: 0.56;
}


.player-card__status {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--card-accent);
	box-shadow: 0 0 8px var(--card-accent);
	z-index: 2;
}

.player-card.is-right .player-card__status {
	left: auto;
	right: 8px;
}

.player-card.is-dead .player-card__status {
	background: #666;
	box-shadow: none;
}


.player-card__model {
	position: absolute;
	left: -4px;
	bottom: -2px;
	width: 90px;
	height: 120px;
	object-fit: contain;
	object-position: center bottom;
	pointer-events: none;
}

.player-card.is-right .player-card__model {
	left: auto;
	right: -4px;
	transform: scaleX(-1);
}


.player-card__content {
	min-height: 70px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.player-card.is-right .player-card__content {
	align-items: flex-end;
	text-align: right;
}


.player-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.player-card.is-right .player-card__top {
	flex-direction: row-reverse;
}

.player-card__name {
	font-size: 12px;
	font-weight: bold;
	color: #d9eaf6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.player-card__money {
	font-size: 11px;
	font-weight: bold;
	color: var(--radar-green);
	flex-shrink: 0;
	white-space: nowrap;
}


.player-card__stats {
	display: flex;
	align-items: center;
	gap: 8px;
}

.player-card.is-right .player-card__stats {
	flex-direction: row-reverse;
}

.player-card__stat {
	display: flex;
	align-items: center;
	gap: 3px;
	color: var(--radar-primary);
	font-size: 11px;
}


.player-card__stat-icon,
.player-card__weapon-icon,
.player-card__util-icon {
	background-color: var(--radar-secondary);
	-webkit-mask: no-repeat center / contain;
	mask: no-repeat center / contain;
}

.player-card__stat-icon,
.player-card__util-icon {
	width: 14px;
	height: 14px;
}

.player-card__weapon-icon {
	width: 28px;
	height: 18px;
}

.player-card__stat-value {
	font-size: 11px;
	font-weight: bold;
	color: #ddd;
}


.player-card__weapon {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--radar-secondary);
}

.player-card.is-right .player-card__weapon {
	flex-direction: row-reverse;
}

.player-card__weapon-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}


.player-card__util {
	display: flex;
	align-items: center;
	gap: 6px;
}

.player-card.is-right .player-card__util {
	flex-direction: row-reverse;
}

.player-card__util-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--radar-primary);
	opacity: 0.3;
}


@media (max-width: 1200px) {
	.team-panel {
		width: 220px;
		padding: 8px;
	}
	.player-card {
		padding: 8px 8px 8px 70px;
		min-height: 80px;
	}
	.player-card.is-right {
		padding: 8px 70px 8px 8px;
	}
	.player-card__model {
		width: 75px;
		height: 100px;
	}
}

@media (max-width: 768px) {
	.team-panel {
		display: none;
	}
}


