@font-face {
	font-family: MainFont;
	src: url('UbuntuSansMono-VariableFont_wght.ttf');
}

* {
	font-family: MainFont;
    table-align: center;
	text-align: center;
    user-select: none;
}

body {
    margin: 10px 10px;
    font-size: 16px;
    background-color: white;
    text-shadow: 1px 1px 1px #0004;
    overflow-x: hidden;
    transition: opacity 2s linear;
}

.table {
	width: 100%;
}

.table td {
	vertical-align: top;
}

h1 {
    display: inline;
	font-weight: normal;
    font-size: 32px;
}

h2 {
	display: inline;
	font-weight: normal;
    font-size: 28px;
}

h3 {
	display: inline;
	font-weight: bold;
    font-size: 24px;
}

h4 {
	display: inline;
	font-weight: bold;
    font-size: 20px;
}

.free-select {
	user-select: text;
}

.table-center {
    display: flex;
    justify-content: center;
    flex-flow: row wrap;
}

.table-left {
    display: flex;
    justify-content: start;
    flex-flow: row wrap;
}

.item-left {
	width: 100%;
	text-align: left;
}

.line {
	content: '';
	display: block;
	width: 100%;
	margin-top: 6px;
	height: 6px;
	border-top: solid 2px black;
}

.small-text {
    font-size: 12px;
}

.main-line {
	width: 100%;
	border-bottom: solid 2px #666;
	height: 5px;
	margin-bottom: 5px;
}

*::-webkit-scrollbar {
    width: 10px;
	height: 10px;
}

*::-webkit-scrollbar-track {
    background-color: #0000;
}

*::-webkit-scrollbar-thumb {
	border: solid 1px black;
    background-color: #888;
    border-radius: 10px;
}

button {
    padding: 1px 5px;
    margin: 2px;
    border: outset 2px #888;
    border-radius: 5px;
    cursor: pointer;
    background: #fff;
    font-size: 12px;
}

button * {
    pointer-events: none;
}

button:not(.locked,.bought,#achievements > button):active {
    border-style: inset;
}

button:not(.bought,#achievements > button):hover, .tab-button.selected {
    background: #ccc;
}

button.locked {
    cursor: not-allowed;
    border-color: red;
}

button.bought {
    cursor: default;
    background: #0f0;
    border-color: #0f0;
}

button.big-btn {
	width: 150px;
	height: 50px;
}

button.huge-btn {
	width: 250px;
	height: 100px;
}

button.half-huge-btn {
	width: 250px;
	height: 50px;
}

.upgrades-table {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    grid-auto-rows: 200px;
    justify-content: center;
}

.upgrades-table > button {
    position: relative;
    padding: 10px 5px;
}

.upgrade-ID {
    position: absolute;
    top: 0px;
    left: 2px;
    font-weight: bold;
    color: #0008;
}

.tab-button {
	font-size: 20px;
	min-width: 200px;
}

.tab-button.stab {
	font-size: 16px;
	min-width: 150px;
}

.tab-button.notify {
	box-shadow: 0px 0px 3px 3px #f44;
}

#tabs {
	margin: 5px 0px;
}

#tooltip-div {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;

    background-color: #f0f0f0;
    min-width: 20px;
    max-width: 300px;
    min-height: 10px;
	font-size: 12px;
	padding: 5px 10px;

	border: outset 2px #888;
    border-radius: 5px;

    color: black;
    text-align: center;

    pointer-events: none;
}

#achievements {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(6, 120px);
    grid-auto-rows: 120px;
    gap: 2px;
}
#achievements > button {
    cursor: default;
    font-size: 12px;
}
.ach-title {
    font-size: 14px;
}

#notify {
    position: fixed;
    top: 0px; right: 0px;
    z-index: 1;
    display: flex;
    justify-content: start;
    align-items: end;
    flex-direction: column-reverse;
    height: 100%;
    overflow-y: hidden;
    pointer-events: none;
}

.notify-ctn {
    position: relative;
    max-width: 360px;
    margin: 3px;
    padding: 3px;
    background-color: #f0f0f0;
    border: outset 2px #888;
    border-radius: 5px;
    font-size: 14px;
    text-align: justify;
    transition: opacity 1s;
    flex: 0 0 auto;
}

.notify-ctn > img.notify {
    float: right;
    width: 64px; height: 64px;
    margin-left: 3px;
    background-color: #888;
    border: outset 2px #888;
    border-radius: 5px;
}

.auto-div {
    width: 300px;
    margin: 5px;
}

.auto-upgs-grid {
    display: grid;
    grid-template-columns: repeat(4, 50px);
    grid-auto-rows: 50px;
    justify-content: center;
    margin-top: 2px;
}
.auto-upgs-grid > button {
    margin: 0px;
    cursor: pointer;
}

#dark-penalties {
    display: grid;
    grid-template-columns: repeat(2, 300px);
    grid-auto-rows: 160px;
    justify-content: center;
    gap: 10px;
    margin: 5px;
}

.dark-penalty {
    border-radius: 20px;
    padding: 5px;
    background: linear-gradient(0deg, #080 0%, #404 40%, #404 60%, #800 100%);
    box-shadow: 0px 0px 10px black;
}
.dark-penalty-base {
    position: relative;
    border-radius: 15px;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #040 0%, #202 25%, #202 75%, #400 100%);
}

.dark-penalty-base > div {
    position: absolute;
    left: 5px;
    width: calc(100% - 10px);
    color: white;
    font-size: 12px;
}

.dark-penalty-base > div:nth-child(1) {
    top: 5px;
}
.dark-penalty-base > div:nth-child(2) {
    bottom: 5px;
}

#upg-DM9-div, #upg-O9-div {
    grid-area: 3 / 1 / 4 / 5;
}

img {
    vertical-align: middle;
}

#upg-MM5-div {
    grid-area: 2 / 1 / 3 / 3;
}

#upg-MM6-div {
    grid-area: 2 / 3 / 3 / 5;
}

#the-end {
    transition: opacity 1s;

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}