@font-face{
    font-family:"Pixelated MS Sans Serif";
    font-style:normal;
    font-weight:400;
    src:url(assets/fonts/ms_sans_serif_mono.woff) format("woff");
}
@font-face{
    font-family:"Pixelated MS Sans Serif";
    font-style:normal;
    font-weight:700;
    src:url(assets/fonts/ms_sans_serif_bold.woff) format("woff");
}

* {
    touch-action: manipulation;
    -webkit-touch-action: manipulation;
}

body {
	font-family: "Pixelated MS Sans Serif", Arial;
	background-color: #111;
	image-rendering: pixelated;
    user-select: none;
    -webkit-user-select: none;
	-webkit-tap-highlight-color: transparent; /*Hopefully removes the blue box over the images when you tap them*/
}

p {
	font-family: "Pixelated MS Sans Serif", Arial;
	color: white;
	text-align: center;
	font-size: 3vh;
	margin: 1vh;
	user-select: none;
}

div {
	-webkit-tap-highlight-color: transparent; /*Hopefully removes the blue box over the images when you tap them*/
}

img {
    display: inline-block;
  image-rendering: pixelated;
  pointer-events: none;
}

button {
	margin-left: 1vh;
	font-size: 2.5vh;
	color: #444;
}

button, button:not(:disabled):active {
	padding: 1vh 1.5vh;
}

button:hover {
	cursor: pointer;
}

#main {
	font-size: 3vh;
	position: fixed;
	top: 50dvh;
	left: 50dvw;
	transform: translate(-50%, -50%);
	background-color: #444;
	overflow: hidden;
}

#background {
	position: absolute;
	inset: 0;
	background-image: url('assets/icons/backgrounds/1.png');
	background-size: 100%;
}


#sectionLevel {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	background-color: #222;
}

#XPBar {
	position: absolute;
	display: block;
	top: 0;
	left: 0;
	height: 100%;
	width: 0;
	background-image: linear-gradient(to top, #088, #0dd);
	transition: width 200ms cubic-bezier(.2, .8, .2, .8);
}

#sectionMessages {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(0,0,0,0.5);
	z-index: 1;
}

#message {
	font-size: 3vh;
	text-shadow:0.2vh 0.2vh 0 #000, 0.2vh -0.2vh 0 #000, -0.2vh  0.2vh 0 #000, -0.2vh  -0.2vh 0 #000;
}

#sectionCash {
	position: absolute;
	top: 12%;
	left: 0;
	transform: translateY(-50%);
	width: 100%;
	text-shadow:0.2vh 0.2vh 0 #000, 0.2vh -0.2vh 0 #000, -0.2vh  0.2vh 0 #000, -0.2vh  -0.2vh 0 #000;
}

#currentHitPoints {
	color: #8ff;
}

#oreIcon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 28vh;
	height: 28vh;
	background-image: url('assets/icons/ores/1.png');
	background-size: 100% 100%;
	filter: drop-shadow(0 0 1vh #222);
}

#oreIcon:hover, .arrow:hover {
	cursor: pointer;
}

#oreIcon:active, .arrow:active{
	transform: translate(-50%, -50%) scale(0.95);
}

.arrow {
	position: absolute;
	transform: translate(-50%, -50%);
	width: 8vh;
	height: 8vh;
	background-size: 100% 100%;
}

#arrowLeft {
	top: 46%;
	left: 10%;
	background-image: url('arrowLeft.png');
}

#arrowRight {
	top: 46%;
	left: 90%;
	background-image: url('arrowRight.png');
}

#arrowSkipLeft {
	top: 56%;
	left: 10%;
	background-image: url('arrowSkipLeft.png');
}

#arrowSkipRight {
	top: 56%;
	left: 90%;
	background-image: url('arrowSkipRight.png');
}

#oreName {
	text-shadow: 0.2vh 0.2vh 0 #000, 0.2vh -0.2vh 0 #000, -0.2vh  0.2vh 0 #000, -0.2vh  -0.2vh 0 #000;
	position: absolute;
	top: 22%;
	left: 0;
	width: 100%;
	font-size: 7vh;
	line-height: 7vh;
	margin: 0;
	color: #ffb;
	white-space: nowrap;
}

#oreName small {
	font-size: 0.6em;
}

#oreHealth {
	text-shadow:0.2vh 0.2vh 0 #000, 0.2vh -0.2vh 0 #000, -0.2vh  0.2vh 0 #000, -0.2vh  -0.2vh 0 #000;
	position: absolute;
	top: 30%;
	left: 0;
	width: 100%;
	margin: 0;
	font-size: 3vh;
}

#oreInfo {
	text-shadow:
        0.2vh 0.2vh #000, 0.2vh -0.2vh #000, -0.2vh 0.2vh #000, -0.2vh -0.2vh #000,
        0.2vh 0 #000, -0.2vh 0 #000, 0 0.2vh #000, 0 -0.2vh #000;
	position: absolute;
	top: 67%;
	left: 7%;
	width: 86%;
	margin: 0;
	font-size: 2.25vh;
	line-height: 3.25vh;
	color: white;
	user-select: none;
	border-collapse: collapse;
}

#oreInfo td:last-child {
	text-align: right;
}

.bottomButtons {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	font-size: 0;
}

.bottomButton {
	border-image: url('button.png') 3 / 1.5vh;
	background: #c0c0c0;
	margin: 0;
	width: 25%;
	display: inline-block;
	background-size: 100% 100%;
	text-align: center;
	color: #444;
	font-size: 3vh;
	user-select: none;
}

.bottomButton:hover {
	cursor: pointer;
}

#toolIcon {
	position: absolute;
	right: 0;
	background-color: rgba(0,0,0,0.7);
	background-image: url('assets/icons/tools/1.png');
	background-size: 100% 100%;
}

#toolScreen {
	position: absolute;
	top: 0;
	left: 100%;
	width: 100%;
	height: 100%;
	background-color: #888;
	transition: left 400ms ease-out;
	z-index: 2;
}

#toolIconLarge {
	position: absolute;
	top: 40%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 22vh;
	height: 22vh;
	background-image: url('assets/icons/tools/1.png');
	background-size: 100% 100%;
	filter: drop-shadow(0 0 1vh #222);
}

#toolUpgradeButton {
	position: absolute;
	top: 63%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-image: url('button.png') 3 / 1.5vh;
	background: #c0c0c0;
	margin: 0;
	width: 84%;
	background-size: 100% 100%;
	text-align: center;
	color: #444;
	user-select: none;
	font-size: 3.5vh;
	padding-top: 3vh;
	white-space: nowrap;
}

#toolUpgradeButton:hover {
	cursor: pointer;
}

#toolScreenCashText {
	color: #333;
	position: absolute;
	top: 75%;
	left: 50%;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	margin: 0;
}

#artifactBottomButton {
	position: absolute;
	top: 80%;
	width: 84%; 
	margin-left: 8%; 
}

#artifactScreen {
	position: absolute;
	top: 0;
	left: 100%;
	width: 100%;
	height: 100%;
	background-color: #555;
	transition: left 400ms ease-out;
	z-index: 2;
}

#ascensionScreen {
	position: absolute;
	top: 0;
	left: 100%;
	width: 100%;
	height: 100%;
	background-color: #222;
	transition: left 400ms ease-out;
	z-index: 2;
}

#ascendButton {
	position: absolute;
	display: flex;
	flex-direction: column;
	place-content: center;
	top: 20%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-image: url('button.png') 3 / 1.5vh;
	background: #c0c0c0;
	margin: 0;
	width: 84%;
	background-size: 100% 100%;
	text-align: center;
	color: #444;
	font-size: 5vh;
	user-select: none;
	font-size: 3.5vh;
}

#ascendButton:hover {
	cursor: pointer;
}

#ascensionScreenCashText {
	font-size: 3vh;
	color: #bbb;
	position: absolute;
	top: 30%;
	left: 50%;
	transform: translate(-50%, 0);
	width: 100%;
	margin: 0;
}

#ascensionConfirmation, #reincarnationConfirmation {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 80%;
	transform: translate(-50%, -50%);
	background-color: #666;
	border: 0.5vh outset #777;
	text-align: center;
	z-index: 3;
	display: none;
}

#reincarnationScreen {
	position: absolute;
	top: 0;
	left: 100%;
	width: 100%;
	height: 100%;
	background-color: #000;
	transition: left 400ms ease-out;
	z-index: 2;
}

#reincarnationText {
	color: #bbb;
}


#reincarnationTabButton, #reincarnateButton {
	position: absolute;
	display: flex;
	flex-direction: column;
	place-content: center;
	top: 80%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-image: url('button.png') 3 / 1.5vh;
	aspect-ratio: 1 / 3;
	background: #c0c0c0;
	margin: 0;
	width: 84%;
	background-size: 100% 100%;
	text-align: center;
	color: #222;
	user-select: none;
	font-size: 3.5vh;
}

#minerSoulBreakdown {
	display: block;
	color: white;
	margin: 3em 1em 2.5em 1em;
	padding: 3em 1.5em 1em 1.5em;
	width: calc(100% - 2em);
	position: relative;
	background: #033;
    box-sizing: border-box;
}
#minerSoulBreakdown caption {
	position: absolute;
	top: 1em;
	left: 1em;
	right: 1em;
	font-weight: bold;
	padding-bottom: 0.3em;
	border-bottom: 0.1em solid white;
}
#minerSoulBreakdown :is(thead, tbody, tfoot) {
	display: flex;
	flex-flow: column;
}
#minerSoulBreakdown tr {
	display: flex;
	justify-content: space-between;
}
#minerSoulBreakdown tfoot {
	margin-top: 0.3em;
	padding-top: 0.3em;
	border-top: 0.1em dashed white;
}
#minerSoulBreakdown th {
	text-align: left;
	font-weight: normal;
}
#minerSoulBreakdown td {
	text-align: right;
	font-weight: bold;
}

#upgradeScreen {
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background-color: #888;
	z-index: 2;
	overflow: hidden;
	transition: left 400ms ease-out, background-color 400ms, color 400ms;
}
#upgradeScreen[style*="page: 1"] {
	background-color: black;
	color: white;
}

#upgradeHolder {
	position: absolute;
	inset: 0;
	transform: translate(calc(-100% * var(--page, 0)), 0);
	transition: transform 400ms;
}

#upgradeHolder > div {
	--page: 0;
	position: absolute;
	inset: 0;
	transform: translate(calc(100% * var(--page, 0)), 0);
	overflow: hidden;
}

.upgrade {
	position: absolute;
	width: 9vh;
	height: 9vh;
	margin: -4.5vh;
	background-size: 100% 100%;
}

.upgrade:hover {
	cursor: pointer;
}

.upgrade.selected {
	z-index: 1;
}
.upgrade.can-buy {
	filter: drop-shadow(0 0 1vh yellow);
}

#upgradeInfo {
	position: absolute;
	top: 65%;
	width: 100%;
	text-align: center;
	user-select: none;
	font-size: 3vh;
}

#upgradeButton {
	position: absolute;
	top: 84%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-image: url('button.png') 3 / 1.5vh;
	background: #c0c0c0;
	width: 84%;


	text-align: center;
	color: #444;
	font-size: 3vh;
	user-select: none;
	white-space: nowrap;
}

#upgradeButton:hover {
	cursor: pointer;
}

#statsScreen {
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background-color: #333;
	background-image: url('back.png');
	background-size: 16vh;
	transition: left 400ms ease-out;
	z-index: 2;
}

#settings {
	display: flex;
	flex-flow: column;
	align-items: start;
	gap: 0.3em;
}

#gameFinishScreen, #gameTrulyFinishScreen, #popupScreen {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 80%;
	transform: translate(-50%, -50%);
	background-color: #aaa;
	border: 0.5vh outset #bbb;
	text-align: center;
	z-index: 3;
	display: none;
}

#popupScreen {
	display: flex;
	flex-flow: column;
	gap: 1em;
	padding: 1em;
	font-size: 2vh;
}


#autoScreen {
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background-color: #333;
	background-image: url('back.png');
	background-size: 16vh;
	transition: left 400ms ease-out;
	z-index: 2;
}

#autoButtons {
	display: flex;
	padding: 1em 10%;
	gap: 0.5em;
	flex-flow: column;
	overflow-y: auto;
	position: absolute;
	inset: 0 0 10vh 0;
}

#autoButtons > h3 {
	color: white;
	text-align: center;
}

.thickButton {
	border-image: url('button.png') 3 / 1.5vh;
	background: #c0c0c0;
	margin: 0;
	width: 100%;
	height: 3em;
	line-height: 3em;
	color: #444;
	display: flex;
	align-items: center;
	justify-content: center;
}

.thickButton:hover {
	cursor: pointer;
}