:root {
	--config-tombstone-opacity: .4;
	--config-bomb-dot-scale: .7;
}

body {
	overflow: hidden;
}

#container {
	-webkit-backface-visibility: hidden;
	transition: transform .025;
}

#radar {
	position: absolute;
	height: 100%;
	width: 100%;
	bottom: 0;
	left: 0;
	z-index: 1;
	transform: scale(1) translate(0%, 0%);

	will-change: transform;
	outline: .1vmin solid transparent;
	-webkit-backface-visibility: hidden;
	background: #000000;
}

#radar img {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	opacity: 1;
	transition: opacity .4s;
}

#blasts, #smokes, #entities, #flashbangs, #projectiles, #trails {
	position: absolute;
	height: 100%;
	width: 100%;
	bottom: 0;
	left: 0;
	z-index: 2;
}

div.dot, div.label {
	position: absolute;
	height: 5.6vmin;
	width: 5.6vmin;
	left: -100vw;
	bottom: -100vh;
	display: block;
	background: #f00;
	transform: translate(-50%, 50%);
	transform-origin: 0% 100%;
	border-radius: 100% .2vmin 100% 100%;
	box-shadow: 0 0 1.6vmin .8vmin rgba(0, 0, 0, .2);
	opacity: 1;
	z-index: 15;

	will-change: bottom, left, transform;
	outline: .1vmin solid transparent;
	-webkit-backface-visibility: hidden;
	backface-visibility: initial;
}

div.dot::before, div.dot::after {
	content: '';
	position: absolute;
	z-index: 14;
	opacity: 0;
	transition: opacity .02s;
}

div.dot::before {
	height: 4vmin;
	width: 4vmin;
	background: radial-gradient(circle at right top, #0000 0 45%, #BE2C2C 0 70%, #0000 0);
	left: -1.3vmin;
	bottom: -1.3vmin;
}

div.dot::after {
	height: 6.6vmin;
	width: 6.6vmin;
	background: linear-gradient(180deg, #888 1vmin, #0000 0), linear-gradient(270deg, #888 1vmin, #0000 0), linear-gradient(180deg, #bbb 2vmin, #0000 0), linear-gradient(270deg, #bbb 2vmin, #0000 0), linear-gradient(180deg, #fff 3vmin, #0000 0), linear-gradient(270deg, #fff 3vmin, #0000 0);
	left: 2vmin;
	bottom: 2vmin;
}

div.dot.CT {
	background: #5ab8f4;
}

div.dot.T {
	background: #f0c941;
}


div.dot.color0 { background: #5ab8f4; }
div.dot.color1 { background: #4caf50; }
div.dot.color2 { background: #f0c941; }
div.dot.color3 { background: #ff8200; }
div.dot.color4 { background: #a647c7; }
div.dot.color5 { background: #ffffff; }


div.dot.enemy {
	box-shadow: 0 0 0 1.2vmin rgba(255, 50, 50, 0.95), 0 0 1.6vmin .8vmin rgba(0, 0, 0, .2);
}

div.dot.bomb {
	border-radius: 2vmin .4vmin 2vmin 2.4vmin;
	background: #FF8200;
	
	box-shadow: 0 0 0 2px rgba(255, 176, 72, 0.98), 0 0 0 4px transparent, 0 0 0 6px rgba(255, 176, 72, 0.5);
	animation: bombRingPulse 4.6s linear infinite;
}

@keyframes bombRingPulse {
	0%, 100% {
		box-shadow: 0 0 0 2px rgba(255, 176, 72, 0.98), 0 0 0 4px transparent, 0 0 0 6px rgba(255, 176, 72, 0.5);
	}
	50% {
		box-shadow: 0 0 0 3px rgba(255, 176, 72, 0.98), 0 0 0 5px transparent, 0 0 0 8px rgba(255, 176, 72, 0.3);
	}
}

div.dot.active {
	z-index: 7000 !important;
	box-shadow: 0 0 0 .2vmin rgba(0, 0, 0, .9), 0 0 0 1vmin rgba(255, 255, 255, .9), 0 0 2.4vmin 1.2vmin rgba(255, 255, 255, .2);
}

div.dot.hurting::before {
	opacity: .8;
}

div.dot.shooting::after {
	opacity: .75;
}

div.dot.flashed {
	background: #ffffff !important;
	box-shadow: 0 0 1.6vmin .8vmin rgba(255, 255, 255, .4), inset 0 0 2vmin 1vmin rgba(255, 255, 255, .9);
}

div.dot.flashed.active {
	background: #ffffff !important;
	box-shadow: 0 0 0 .2vmin rgba(0, 0, 0, .9), 0 0 0 1vmin rgba(255, 255, 255, .9), 0 0 2.4vmin 1.2vmin rgba(255, 255, 255, .2), inset 0 0 2vmin 1vmin rgba(255, 255, 255, .9);
}


div.dot.enemy.active {
	box-shadow: 0 0 0 1.2vmin rgba(255, 50, 50, 0.95), 0 0 0 .2vmin rgba(0, 0, 0, .9), 0 0 0 1vmin rgba(255, 255, 255, .9), 0 0 2.4vmin 1.2vmin rgba(255, 255, 255, .2);
}


div.dot.enemy.flashed {
	background: #ffffff !important;
	box-shadow: 0 0 0 1.2vmin rgba(255, 50, 50, 0.95), 0 0 1.6vmin .8vmin rgba(255, 255, 255, .4), inset 0 0 2vmin 1vmin rgba(255, 255, 255, .9);
}


div.dot.enemy.flashed.active {
	background: #ffffff !important;
	box-shadow: 0 0 0 1.2vmin rgba(255, 50, 50, 0.95), 0 0 0 .2vmin rgba(0, 0, 0, .9), 0 0 0 1vmin rgba(255, 255, 255, .9), 0 0 2.4vmin 1.2vmin rgba(255, 255, 255, .2), inset 0 0 2vmin 1vmin rgba(255, 255, 255, .9);
}


div.dot.followed {
	z-index: 7000 !important;
	box-shadow: 0 0 0 .3vmin rgba(0, 255, 0, .9), 0 0 2vmin 1vmin rgba(0, 255, 0, .3);
}

div.dot.dead {
	color: transparent;
	text-shadow: none;
	border-radius: 0;
	clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
	opacity: var(--config-tombstone-opacity);
	z-index: 13 !important;
	filter: none;
}

div.dot > div {
	position: absolute;
	bottom: 1.3vmin;
	left: 1.3vmin;
	width: 3vmin;
	height: 3vmin;
	background: #0000;
	box-shadow: inset 0 0 0 1.5vmin rgba(255,255,255,0);
	box-sizing: border-box;
	border-radius: 60vmin;
}

div.dot.dead > div {
	display: none;
}

div.label {
	background: none;
	display: flex;
	justify-content: center;
	color: black;
	font-weight: bold;
	text-shadow: 0 0 1.2vmin rgba(255, 255, 255, .2);
	box-shadow: none;
	line-height: 5.6vmin;
	font-size: 4.8vmin;
}

div.label.active {
	z-index: 7000 !important;
	font-size: 5vmin;
}

div.label.dead {
	display: none;
}

div.label span {
	display: block;
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	font-size: .7em;
	color: #FFF;
	text-shadow: 0 0 .3em #000;
	opacity: .85;
	white-space: nowrap;
}

div.label span .weapon-icon {
	display: inline-block;
	width: 1.4em;
	height: 1.4em;
	vertical-align: middle;
	margin: 0 1px;
	filter: drop-shadow(0 0 .2em #000);
}

/* Viewer-relative team palette. These rules intentionally override CS2's
   per-player competitive colors and temporary flash/bomb fills. */
div.dot.viewer-self,
div.dot.viewer-self.flashed,
div.dot.viewer-self.bomb {
	background: #ff8a00 !important;
	box-shadow: 0 0 0 .35vmin rgba(20, 20, 20, .95),
		0 0 0 1.15vmin rgba(255, 138, 0, .95),
		0 0 2.2vmin 1.1vmin rgba(255, 138, 0, .42) !important;
	z-index: 8000 !important;
}

div.dot.ally,
div.dot.ally.flashed,
div.dot.ally.bomb {
	background: #298cff !important;
	box-shadow: 0 0 0 .28vmin rgba(12, 35, 75, .92),
		0 0 1.4vmin .45vmin rgba(41, 140, 255, .28) !important;
}

div.dot.enemy,
div.dot.enemy.flashed,
div.dot.enemy.bomb {
	background: #ef3340 !important;
	box-shadow: 0 0 0 .3vmin rgba(75, 10, 15, .95),
		0 0 1.5vmin .5vmin rgba(239, 51, 64, .34) !important;
}

div.label.viewer-self span { color: #ffad45; }
div.label.ally span { color: #70b3ff; }
div.label.enemy span { color: #ff737d; }

#bomb {
	position: absolute;
	background-image: url("../img/bomb-dropped.webp");
	background-size: contain;
	height: 2.2vmin;
	width: 2.2vmin;
	bottom: -30%;
	left: -30%;
	transform: scale(var(--config-bomb-dot-scale)) translate(-50%, 50%);
	transform-origin: bottom left;
}

#bomb.defused {
	background-image: url("../img/bomb-defused.webp");
	filter: drop-shadow(0 0 .4vmin rgba(0, 255, 0, .3));
}

#bomb.planted {
	background-image: url("../img/bomb-planted.webp");
	animation: beep 1s infinite;
}

#bomb.planting {
	background-image: url("../img/bomb-dropped.webp");
	animation: planting-pulse 0.8s infinite;
}

@keyframes planting-pulse {
	0% {
		filter: drop-shadow(0 0 0 rgba(255, 165, 0, 0));
		background-color: rgba(255, 165, 0, 0);
	}
	50% {
		filter: drop-shadow(0 0 1vmin rgba(255, 165, 0, 0.9));
		background-color: rgba(255, 165, 0, 0.25);
	}
	100% {
		filter: drop-shadow(0 0 0 rgba(255, 165, 0, 0));
		background-color: rgba(255, 165, 0, 0);
	}
}

@keyframes beep {
	0% {
		filter: drop-shadow(0 0 0 rgba(255, 0, 0, 1));
		background-color: rgba(255, 0, 0, 0);
	}
	10% {
		filter: drop-shadow(0 0 1vmin rgba(255, 0, 0, 1));
		background-color: rgba(255, 0, 0, 0.2);
	}
	20% {
		filter: drop-shadow(0 0 1.8vmin rgba(255, 0, 0, 0));
		background-color: rgba(255, 0, 0, 0);
	}
}

#blasts > svg {
	position: absolute;
	height: 100%;
	width: 100%;
	stroke: rgba(255, 255, 255, 0.4);
	stroke-width: .5px;
	stroke-linecap: round;
}

#blasts > div {
	position: absolute;
	border-radius: 100%;
	opacity: .6;
	transform-origin: center;
	overflow: hidden;
	border: .6vmin solid #757575;
	transform: translate(-50%, 50%);
}

#smokes > div {
	position: absolute;
	border-radius: 100%;
	opacity: .8;
	transform-origin: center;
	background: radial-gradient(circle, #9F9D9D 0%, #9F9D9D 60%, transparent 100%);
	overflow: hidden;
	border-color: #D7D7D7;
	transform: translate(-50%, 50%);
	transition: opacity .3s;
}

#smokes > div::before {
	content: '';
	display: block;
	height: 100%;
	width: 100%;
	border: transparent solid .6vmin;
	border-color: inherit;
	border-radius: 100%;
	box-sizing: border-box;
}

#smokes > div.CT {
	background: radial-gradient(circle, #678FAA 0%, #678FAA 60%, transparent 100%);
	border-color: #77C5F6;
}

#smokes > div.T {
	background: radial-gradient(circle, #CCBA7D 0%, #CCBA7D 60%, transparent 100%);
	border-color: #F1D369;
}

#smokes > div.hide {
	opacity: 0;
}

#smokes > div.fading {
	transition: opacity 1.8s;
}

#smokes > div > div {
	height: 100%;
	width: 100%;
	border: transparent solid .6vmin;
	border-color: inherit;
	border-radius: 100%;
	background-color: #364254;
	transform: translate(-0.6vmin, 0.6vmin);
	position: absolute;
	opacity: 1;
	transition: background-color .15s, opacity .8s;
}

#smokes > div > div.flash {
	background-color: #fff;
}

#smokes > div > div.fade {
	opacity: 0;
}

#infernos {
	position: absolute;
	height: 100%;
	width: 100%;
	bottom: 0;
	left: 0;
	z-index: 2;
}

.inferno {
	position: absolute;
	height: 100%;
	width: 100%;
	bottom: 0;
	left: 0;
	z-index: 2;
	transition: opacity .3s;
}

.inferno > div {
	position: absolute;
	border-radius: 100%;
	opacity: .75;
	background: #ff4848;
	box-sizing: border-box;
	border: #ce3f00 solid .2vmin;
	transform: translate(-50%, 50%);
	transition: opacity .3s;
}

#infernos .inferno.CT > div.flame {
	border-color: #84c8ed;
	background: rgba(132, 200, 237, 0.5);
}

#infernos .inferno.T > div.flame {
	border-color: #f0c040;
	background: rgba(240, 192, 64, 0.5);
}

#infernos .inferno.U > div.flame {
	border-color: #ff2f2f;
	background: rgba(255, 47, 47, 0.5);
}

.projectile-timer {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translate(-50%, 4px);
	color: #ffffff;
	background: rgba(0, 0, 0, 0.7);
	padding: 1px 4px;
	border-radius: 3px;
	font-size: 1.2vmin;
	font-weight: bold;
	font-family: monospace;
	pointer-events: none;
	z-index: 10;
	white-space: nowrap;
}

#flashbangs > div {
	position: absolute;
	opacity: .8;
	background: #FFF;
	box-sizing: border-box;
	transform-origin: center;
	border-radius: 100%;
	transform: translate(-50%, 50%);
	clip-path: polygon(15% 8%, 40% 25%, 50% 0%, 60% 25%, 85% 8%, 74% 35%, 100% 36%, 78% 50%, 100% 70%, 72.5% 67%, 77.5% 92.5%, 60% 75%, 50% 100%, 40% 75%, 22.5% 92.5%, 27.5% 67%, 0% 70%, 22% 50%, 0% 36%, 26% 35%);
	box-shadow: inset 0 0 0vmin 1.7vmin #FC9F2D, inset 0 0 5vmin 0 #FEA130;
	transition: opacity .3s;
}

#flashbangs > div.full {
	opacity: .8;
}

#flashbangs > div.hide {
	opacity: 0;
}

#trails path {
	stroke-linejoin: round;
	fill: none;
}

#projectiles > div {
	position: absolute;
	box-sizing: border-box;
	transform-origin: center;
	transform: translate(-50%, 50%);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	height: 4vmin;
	width: 4vmin;
}

#projectiles > div.U {
	filter: grayscale(1) brightness(0.7);
}

#droppedWeapons > div {
	position: absolute;
	box-sizing: border-box;
	transform: translate(-50%, 50%);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	height: 3vmin;
	width: 3vmin;
	opacity: 0.85;
	filter: drop-shadow(0 0 0.3vmin rgba(0, 0, 0, 0.8));
	pointer-events: none;
}

#advisory {
	position: absolute;
	width: 14%;
	height: 7%;
	background: #f00;
	border-radius: 3vmin 8vmin 8vmin 3vmin;
	background: linear-gradient(to right, #222, #292929);
	color: #000;
	box-shadow: 0 0 .4vmin .3vmin rgba(255, 255, 255, .05);
	display: none;
}

#advisory::before {
	content: "";
	position: absolute;
	top: 10%;
	left: 7%;
	height: 80%;
	width: 40%;
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

#advisory span {
	position: absolute;
	top: 10%;
	right: 5%;
	height: 80%;
	width: 40%;
	border-radius: 100%;
	box-sizing: border-box;
	box-shadow: 0 0 .4vmin .3v rgba(255, 255, 255, .2) inset;
	background: #000;
	text-align: center;
	color: #000;
	line-height: 5.9vmin;
	font-size: 5vmin;
	font-weight: bold;
}

#advisory .advisory-text {
	position: absolute;
	top: 25%;
	right: 48%;
	height: 50%;
	width: 30%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 3vmin;
	font-weight: bold;
	text-shadow: 0 0 0.3vmin rgba(0, 0, 0, 0.8);
	white-space: nowrap;
}

#advisory.planting::before {
	background-image: url("../img/adv-plant.webp");
}

#advisory.planting {
	background: linear-gradient(to right, #AD9A3C, #ECCD37);
	box-shadow: 0 0 .4vmin .3vmin rgba(255,252,0,.2);
}

#advisory.defuse::before {
	background-image: url("../img/adv-defuse.webp");
}

#advisory.defuse {
	background: linear-gradient(to right, #39536d, #3a7eb1);
	box-shadow: 0 0 .4vmin .3vmin rgba(0,41,255,.2);
}

#advisory.solesurvivor::before {
	background-image: url("../img/adv-solesurvivor.webp");
}

#advisory.solesurvivor {
	background: linear-gradient(to right, #436C39, #40B13A);
	box-shadow: 0 0 .4vmin .3vmin rgba(13,255,0,.2);
}

#advisory.planting span, #advisory.defuse span, #advisory.solesurvivor span {
	color: #fff;
}

#unknownMap {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 100%;
	width: 100%;
	background: #000;
	display: none;
	justify-content: center;
	align-items: center;
}
