/* gameUI.css */

#gameUI {
	--upgrade-hidden-offset: calc(-100vh - 180px);
	--upgrade-slide-ms: 340ms;
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20;
}

#pingDisplay {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: white;
}

#captureScoreBar {
	position: fixed;
	top: 18px;
	left: 22px;
	width: 280px;
	z-index: 100;
	pointer-events: none;
	animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

#captureScorePanel {
	display: block;
}

#captureTugBar {
	width: 100%;
	height: 14px;
	border-radius: 7px;
	background: rgba(0,0,0,0.4);
	overflow: hidden;
	display: flex;
	align-items: stretch;
}

#captureTugRed {
	background: rgba(231,76,60,0.9);
	width: 50%;
	transition: width 0.6s ease;
	border-radius: 7px 0 0 7px;
}

#captureTugDivider {
	width: 2px;
	background: #fff;
	flex-shrink: 0;
}

#captureTugBlue {
	background: rgba(52,152,219,0.9);
	flex: 1;
	transition: flex 0.6s ease;
	border-radius: 0 7px 7px 0;
}

#captureScoreLabels {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 5px;
	font-size: 16px;
	color: #fff;
}

#captureScoreLabelRed { color: #e74c3c; font-weight: 700; }
#captureScoreLabelBlue { color: #3498db; font-weight: 700; }
#captureScoreStatus {
	font-size: 13px;
	color: #ccc;
	text-align: center;
	flex: 1;
	padding: 0 4px;
}

#captureLockPanel {
	display: block;
	padding: 10px 12px 11px;
	border-radius: 12px;
	background: linear-gradient(145deg, rgba(40, 20, 20, 0.94), rgba(18, 18, 28, 0.94));
	border: 2px solid rgba(255, 108, 108, 0.7);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 30px rgba(255, 90, 90, 0.12);
	text-align: center;
}

#captureLockTitle {
	color: #ffb3b3;
	font-size: 11px;
	letter-spacing: 1.8px;
}

#captureLockTimer {
	color: #fff;
	font-size: 33px;
	line-height: 1.1;
	margin-top: 3px;
	text-shadow: 0 2px 10px rgba(255, 94, 94, 0.45);
}

#captureLockHint {
	color: #ffd1d1;
	font-size: 13px;
	margin-top: 4px;
}

#bossHealthBar {
	position: fixed;
	top: 18px;
	left: 18px;
	width: 260px;
	text-align: left;
	pointer-events: none;
	z-index: 50;
	opacity: 1;
	transition: opacity 0.8s ease;
}

#bossHealthLabel {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0,0,0,0.6);
	margin-bottom: 4px;
	letter-spacing: 1.5px;
}

#bossHealthTrack {
	position: relative;
	width: 100%;
	height: 16px;
	background: rgba(20,20,30,0.85);
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,0.15);
}

#bossHealthFill {
	position: absolute;
	top: 0; left: 0;
	height: 100%;
	width: 100%;
	background: #c0392b;
	border-radius: 8px;
	transition: width 0.3s ease, background 0.4s ease;
}

#bossHealthFillPhase {
	position: absolute;
	top: 0; left: 0;
	height: 100%;
	width: 100%;
	background: rgba(255,255,255,0.12);
	border-radius: 8px;
	transition: width 0.9s ease;
}

#bossHealthText {
	font-size: 11px;
	color: rgba(255,255,255,0.7);
	margin-top: 3px;
}

#chatHolder {
	position: absolute;
	bottom: 200px;
	width: 100%;
	text-align: center;
}

#chatBox {
	padding: 6px;
	font-size: 20px;
	color: #fff;
	background-color: rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	pointer-events: all;
	border: 0;
}

#chatBox:focus {
	outline: none;
}

#upgradeHolder {
	width: 100%;
	position: absolute;
	text-align: center;
	top: 10px;
	opacity: 0;
	transform: translateY(var(--upgrade-hidden-offset));
	transition: transform var(--upgrade-slide-ms) ease-out, opacity 0.2s ease-out;
	pointer-events: none;
}

#upgradeCounter {
	width: 100%;
	position: absolute;
	top: 95px;
	text-align: center;
	font-size: 24px;
	color: #fff;
	opacity: 0;
	transform: translateY(var(--upgrade-hidden-offset));
	transition: transform var(--upgrade-slide-ms) ease-out, opacity 0.2s ease-out;
	pointer-events: none;
}

#announcementHolder {
	width: 100%;
	position: absolute;
	top: 55px;
	text-align: center;
	z-index: 45;
	pointer-events: none;
}

#announcementStack {
	position: relative;
	width: 100%;
	height: 0px;
	overflow: visible;
}

.announcementItemWrap {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	transition: top 220ms ease-out;
}

.announcementMessageInner {
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	padding: 10px 16px;
	max-width: 90%;
	word-break: break-word;
	opacity: 0;
	transform-origin: top center;
	transform: scale(1.8);
	transition: opacity 220ms ease-out, transform 220ms ease-out;
	pointer-events: none;
}

.announcementMessageInner.is-visible {
	opacity: 1;
	transform: scale(1);
}

.announcementMessageInner.is-fading {
	opacity: 0;
	transition: opacity 220ms ease-out;
}

#gameUI.hasUpgrades #upgradeHolder {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

#gameUI.hasUpgrades #upgradeCounter {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

#gameUI.upgradesExiting #upgradeHolder {
	opacity: 1;
	transform: translateY(var(--upgrade-hidden-offset));
	pointer-events: none;
	transition: transform var(--upgrade-slide-ms) ease-in, opacity 0s linear;
}

#gameUI.upgradesExiting #upgradeCounter {
	opacity: 1;
	transform: translateY(var(--upgrade-hidden-offset));
	pointer-events: none;
	transition: transform var(--upgrade-slide-ms) ease-in, opacity 0s linear;
}

#topInfoHolder {
	position: absolute;
	right: 20px;
	top: 20px;
}

#leaderboard {
	color: #fff;
	font-size: 31px;
	text-align: left;
	padding: 10px;
	padding-top: 7px;
	padding-bottom: 5px;
	width: 260px;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
}

.leaderHolder {
	overflow: hidden;
	white-space: nowrap;
}

.leaderScores {
	text-align: right;
	float: right;
	margin-left: 10px;
	display: inline-block;
	font-size: 18px;
	color: #7ee559;
}

.leaderScore {
	text-align: right;
	float: right;
	margin-left: 10px;
	display: inline-block;
	font-size: 22px;
	transition: all 0.2s ease;
}

.leaderboardItem {
	float: left;
	display: inline-block;
	max-width: none;
	white-space: nowrap;
	overflow: visible;
	font-size: 22px;
}

.leaderboardItem.is-self {
	color: #fff;
}

.leaderboardItem.is-other {
	color: rgba(255, 255, 255, 0.6);
}

#killCounter {
	right: 0px;
	margin-top: 10px;
	color: #fff;
	font-size: 28px;
	background-color: rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	background-image: url(../img/icons/skull.png);
}

/* Kill Feed */
#killFeedContainer {
	position: absolute;
	top: 105px;
	right: 20px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
	pointer-events: none;
	z-index: 1;
}

.killFeedEntry {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	background: rgba(0, 0, 0, 0.4);
	border-radius: 5px;
	font-size: 18px;
	white-space: nowrap;
	transition: opacity 0.3s ease;
	height: 40px;
}

.kfName {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.kfKiller {
	color: #ff6b6b;
}

.kfVictim {
	color: #fff;
}

.kfCause {
	color: #ffd27a;
}

.kfSprite {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
}

.kfSprite canvas {
	width: 36px;
	height: 36px;
	image-rendering: auto;
}

.kfAiSprite {
	width: 40px;
	height: 40px;
}

.kfAiSprite canvas {
	width: 40px;
	height: 40px;
}

.kfPoison {
	filter: hue-rotate(80deg) brightness(1.1);
}

.kfPoison canvas {
	filter: drop-shadow(0 0 3px #7b935d);
}

#itemInfoHolder {
	max-width: 250px;
	display: none;
	position: fixed;
	pointer-events: none;
	z-index: 100000;
	background-color: rgba(0, 0, 0, 0.75);
	padding: 8px 10px;
}

#itemInfoHolder.visible {
	display: block;
}

#itemInfoName {
	font-size: 30px;
}

#itemInfoDesc {
	font-size: 22px;
	color: rgba(255, 255, 255, 0.6);
}

.itemInfoReq {
	font-size: 22px;
}

.itemInfoReqVal {
	font-size: 22px;
	color: rgba(255, 255, 255, 0.6);
}

.itemInfoLmt {
	font-size: 22px;
	position: absolute;
	right: 10px;
	bottom: 6px;
}

#resDisplay {
    /* No specific style in main.css but it holds resource displays */
}

#foodDisplay {
	background-image: url(../img/resources/food_ico.png);
	bottom: 130px;
}

#woodDisplay {
	background-image: url(../img/resources/wood_ico.png);
	bottom: 75px;
}

#stoneDisplay {
	background-image: url(../img/resources/stone_ico.png);
	bottom: 20px;
}

#scoreDisplay {
	right: inherit;
	left: 20px;
	bottom: 160px;
	text-align: left;
	padding-left: 40px;
	padding-right: 10px;
	background-position: left 6px center;
	background-image: url(../img/resources/gold_ico.png);
}

#bottomContainer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
}

#ageText {
	width: 100%;
	bottom: 118px;
	text-align: center;
	color: #fff;
	font-size: 24px;
}

#ageBarContainer {
	width: 100%;
	bottom: 93px;
	text-align: center;
}

#ageBar {
	background-color: rgba(0, 0, 0, 0.25);
	border-radius: 5px;
	padding: 5px;
	width: 314px;
	height: 10px;
	display: inline-block;
}

#ageBarBody {
	background-color: rgba(255, 255, 255, 1);
	border-radius: 3px;
	width: 0px;
	height: 100%;
}

#actionBar {
	bottom: 17px;
	width: 100%;
	text-align: center;
}

#notificationDisplay {
	vertical-align: top;
	position: absolute;
	right: 310px;
	top: 80px;
	text-align: right;
}

#allianceButton {
	right: 310px;
}

#leaderboardButton {
	display: none;
}

#storeButton {
	right: 370px;
}

#chatButton {
	right: 430px;
}

#allianceButton i,
#leaderboardButton i,
#storeButton i,
#chatButton i {
	font-size: 40px;
	vertical-align: middle;
}

#mapDisplay {
	position: absolute;
	bottom: 20px;
	left: 20px;
	display: inline-block;
	width: 130px;
	height: 130px;
	pointer-events: all;
	border: 2px solid black;
	background-color: rgba(0, 0, 0, 0.25);
	border-radius: 4px;
}

#performanceDisplay {
	position: absolute;
	bottom: 20px;
	left: 160px;
	width: 120px;
	height: 114px;
	background-color: rgba(0, 0, 0, 0.20);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	pointer-events: none;
	color: #fff;
	font-size: 14px;
}

.performanceItem {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2px 0;
}

.performanceLabel {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
}

.performanceValue {
	font-size: 14px;
	color: #ffffff;
}

#storeMenu {
	display: block;
	width: 100%;
	position: absolute;
	text-align: center;
	top: 50%;
	transform: translateY(-50%);
	-ms-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	-o-transform: translateY(-50%);
}

#storeHolder {
	pointer-events: all;
	width: 400px;
	display: inline-block;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	color: #fff;
	padding: 10px;
	height: 200px;
	max-height: calc(100vh - 200px);
	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
}

#storeMenuTabsContainer {
    padding-bottom: 15px;
}

#storeTabHats {
    margin-right: 10px;
}

.storeTab {
	width: 183px;
	font-size: 26px;
	display: inline-block;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	color: #fff;
	padding: 10px;
	pointer-events: all;
	cursor: pointer;
}

.storeTab:hover {
	background-color: rgba(50, 50, 50, 0.25);
}

#allianceMenu {
	display: block;
	width: 100%;
	position: absolute;
	text-align: center;
	top: 50%;
	transform: translateY(-50%);
	-ms-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	-o-transform: translateY(-50%);
}

#allianceHolder {
	pointer-events: all;
	height: 200px;
	max-height: calc(100vh - 260px);
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	width: 350px;
	display: inline-block;
	text-align: left;
	padding: 10px;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
}

.allianceItem {
	font-size: 24px;
	color: #fff;
	padding: 5px;
}

.joinAlBtn {
	float: right;
	font-size: 24px;
	text-align: right;
	cursor: pointer;
	color: #80eefc;
}

.joinAlBtn:hover {
	color: #72d3e0;
}

.allianceButtonM {
	pointer-events: all;
	cursor: pointer;
	margin-top: 10px;
	font-size: 24px;
	color: #fff;
	padding: 5px;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 5px;
	text-align: center;
	display: inline-block;
}

.allianceButtonM:hover {
	background-color: rgba(50, 50, 50, 0.25);
}

#allianceInput {
	pointer-events: all;
	font-size: 24px;
	color: #fff;
	padding: 5px;
	background-color: rgba(0, 0, 0, 0.25);
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	padding: 5px;
	display: inline-block;
	outline: none;
	border-color: none;
	border: 0;
	-webkit-box-shadow: none;
	box-shadow: none;
	width: 200px;
	margin-right: 10px;
}

.storeItem {
	color: #fff;
	padding: 5px;
	font-size: 24px;
	text-align: left;
	cursor: pointer;
}

.hatPreview {
	margin-top: -5px;
	width: 45px;
	height: 45px;
	display: inline-block;
	vertical-align: middle;
	padding-right: 10px;
}

.itemPrice {
	margin-top: 5px;
	float: right;
	display: inline-block;
	color: rgba(255, 255, 255, 0.5);
	font-size: 24px;
	padding-right: 5px;
}

@media only screen and (max-width: 896px) {
	#pingDisplay {
		right: 10px;
		left: auto;
		top: 50px;
		text-align: right;
		transform: none;
	}

	#actionBar {
		max-width: calc(100% - 340px);
		margin-left: 170px;
	}

	#itemInfoHolder {
		max-width: 128px;
	}

	#itemInfoName {
		font-size: 22px;
	}

	#itemInfoDesc,
	.itemInfoReq,
	.itemInfoLmt,
	.itemInfoReqVal {
		font-size: 12px;
	}

	#mapDisplay {
		width: 66px;
		height: 66px;
		bottom: unset;
		top: 8px;
		left: 8px;
	}

	#performanceDisplay {
		width: 90px;
		height: 66px;
		bottom: unset;
		top: 8px;
		left: 82px;
		padding: 4px;
		font-size: 10px;
	}

	.performanceLabel {
		font-size: 9px;
	}

	.performanceValue {
		font-size: 10px;
	}

	#notificationDisplay {
		top: inherit;
		right: inherit;
		left: 50%;
		bottom: 96px;
		transform: translateX(-50%);
		text-align: center;
	}

	#allianceButton {
		top: inherit;
		right: 8px;
	}

	#storeButton {
		top: inherit;
		right: 60px;
	}

	#chatButton {
		top: inherit;
		left: 8px;
		display: none;
	}

	#chatButton.hide {
		display: none;
	}

	#leaderboardButton {
		display: block;
		right: 8px;
		bottom: 60px;
		top: initial;
	}

	#leaderboardData,
	.leaderHolder,
	.leaderboardItem,
	.leaderScore {
		font-size: 18px;
	}

	.leaderScore {
		margin-left: 0;
	}

	.allianceItem,
	#allianceInput,
	.allianceButtonM {
		font-size: 18px;
	}

	.storeItem {
		font-size: 18px;
	}

	.hatPreview {
		width: 35px;
		height: 35px;
	}

	.joinAlBtn,
	.itemPrice {
		font-size: 18px;
	}
}

@media only screen and (max-width: 480px) {
	#storeButton {
		top: 8px;
		left: 78px;
	}

	#allianceButton {
		top: 8px;
		left: 126px;
	}

	#leaderboardButton {
		top: 8px;
		left: 174px;
	}

	.storeTab {
		width: 153px;
		font-size: 24px;
	}

	#storeHolder {
		width: 340px;
	}

	#upgradeHolder {
		width: 80%;
		top: 50%;
		left: 10%;
		margin-top: -40px;
	}

	#upgradeCounter {
		top: 50%;
		margin-top: -70px;
		background-color: rgba(50, 50, 50, 0.5);
	}
}
