
body {
    max-width: 100%;
    overflow: hidden;
}

/* Top Bar CSS */
#topBar {
    position: absolute;
    left: 50%;
    top: 0px;
    transform: translate(-50%, 0px);
    width: calc(10px + 100%);
    height: 32px;
    background-color: #222;
    box-shadow: 0px 0px 10px 1px #000;
    z-index: 100000;
}

#topBarInner {
    position: absolute;
    left: 5px;
    right: 5px;
    height: 100%;
    z-index: inherit;
}

#topBar_money_wrapper {
    position: absolute;
    left: 50%;
    top: calc(46px);
    transform: translate(-50%, -50%);
    width: calc(20% + 30px);
    padding-left: 10px;
    padding-right: 10px;
    height: 28px;
    background-color: #222;
    box-shadow: 0px 0px 10px 1px #000;
    z-index: 99999;
}

#topBar_money {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    color: #FFF;
}

.topBar_button {
    float: left;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: calc(100% - 2px);
    width: 80px;
    margin-bottom: 2px;
    padding-left: 6px;
    padding-right: 6px;
    background-color: #222;
    box-shadow: 0px 0px 3px 1px #555 inset;
    text-shadow: 0px 1px 4px #FFF;
    user-select: none;
    text-align: center;
    font-size: 100%;
    color: #FFF;
    z-index: inherit;
}

/* View CSS */
#view_wrapper {
    position: absolute;
    left: 0px;
    top: 32px;
    right: 0px;
    bottom: 0px;
    overflow: hidden;
}

#middle_wrapper {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translate(-50%, 0px);
    width: calc(100px + 20%);
    aspect-ratio: 0.95;
}

#versionText {
    position: absolute;
    left: 5px;
    bottom: 2px;
    width: 80px;
    height: 18px;
    font-size: 110%;
    user-select: none;
    color: #FFF;
    text-shadow: 0px 1px 4px #000;
}

.view_grayed {
    position: absolute;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    background-color: #222;
    /*box-shadow: 0px 0px 10px 3px #AAA inset;*/
    overflow-x: hidden;
    overflow-y: auto;
}

.view_inner {
    position: absolute;
    left: 20px;
    top: 34px;
    right: 20px;
    bottom: 20px;
}

/* Main View */

#mainView_backgroundImage {
    position: absolute;
    background-image: url("./Images/The\ Perfect\ Scene\ Phase\ 0.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    filter: blur(8px);
    left: -10px;
    top: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -10000;
}

#mainButton {
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    aspect-ratio: 1;
    background-image: url("./Images/The\ Imperfect\ Tool\ 1.png");
    background-repeat: no-repeat;
    background-size: 100%;
    image-rendering: pixelated;
    user-select: none;
    -webkit-filter: drop-shadow(0px 5px 5px #222);
    filter: drop-shadow(0px 5px 5px #222);
}

#selectedRecipe {
    position: absolute;
    right: 75px;
    bottom: 2px;
    width: 60px;
    height: 56px;
    font-size: 100%;
}

#selectRecipe {
    position: absolute;
    right: 5px;
    bottom: 2px;
    width: 64px;
    height: 36px;
}

/* Technology View */

#techView {
    cursor: grab;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100000%;
    height: 100000%;
}

#techView_inner {
    left: 100px;
    top: 100px;
    right: 100px;
    bottom: 100px;
    width: 0.1%;
    height: 0.1%;
    pointer-events: none;
    z-index: inherit;
}

.technology {
    float: left;
    position: absolute;
    width: calc(140px);
    padding: 8px;
    margin: 8px;
    aspect-ratio: 1;
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
    border-radius: 5%;
    line-height: 100%;
}

/* Market View */

#marketView {
    cursor: grab;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100000%;
    height: 100000%;
    background-color: #222;
    overflow: hidden;
}

#marketView_inner {
    left: 100px;
    top: 100px;
    right: 100px;
    bottom: 100px;
    width: 0.1%;
    height: 0.1%;
    pointer-events: none;
    z-index: inherit;
}

#market_empty {
    position: absolute;
    left: 0.05%;
    top: 0.05%;
    width: 0.08%;
    height: 0.02%;
    transform: translate(-50%, -50%);
    color: #FFF;
    text-shadow: 0px 1px 4px #FFF;
    font-size: 34px;
    user-select: none;
    pointer-events: none;
}

.marketSplit {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    float: left;
    position: relative;
    width: 100%;
    height: 220px;
    margin: 16px;
}

.marketSplit_section {
    position: absolute;
    left: 0px;
    top: 36px;
    bottom: 0px;
    width: max-content;
}

.market {
    float: left;
    position: relative;
    height: 100%;
    margin-right: 8px;
    aspect-ratio: 1.5;
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
}

/* Extractors View */

.extractorView {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
}

.extractorView_inner {
    position: absolute;
    width: max-content;
    height: 100%;
}

.extractorSplit {
    float: left;
    position: relative;
    background-image: url("./Images/The\ Perfect\ Scene\ Phase\ 0.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    image-rendering: pixelated;
    width: 300px;
    height: 100%;
    padding: 40px;
    border-right: solid #555;
    box-shadow: 0px 0px 3px 2px #555 inset;
}

.extractor {
    position: absolute;
    left: 60px;
    right: 60px;
    aspect-ratio: 1;
    background-image: url("./Images/The\ Perfect\ Extractor.gif");
    background-size: 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    filter: drop-shadow(0px 5px 5px #00000080);
}

/* Factories View */

#factoryView {
    cursor: grab;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100000%;
    height: 100000%;
}

#factoryView_inner {
    width: max-content;
    height: max-content;
    pointer-events: none;
    z-index: inherit;
}

.factory {
    position: absolute;
    width: 352px;
    aspect-ratio: 0.75;
}

.factory_input {
    position: absolute;
    left: 50%;
    top: 0px;
    padding: 5px;
    width: 100%;
    height: 100px;
    transform: translate(-50%, 0px);
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
    text-shadow: 0px 1px 4px #FFF;
    border-radius: 5px;
    color: #FFF;
    z-index: +1;
}

.factory_main {
    position: absolute;
    left: 0px;
    top: 100px;
    right: 0px;
    bottom: 100px;
    background-image: url("./Images/The\ Perfect\ Factorie.png");
    background-size: 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    filter: drop-shadow(0px 5px 5px #00000080);
}

.factory_output {
    position: absolute;
    left: 50%;
    bottom: 0px;
    padding: 5px;
    width: 100%;
    height: 50px;
    transform: translate(-50%, 0px);
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
    text-shadow: 0px 1px 4px #FFF;
    border-radius: 5px;
    color: #FFF;
    z-index: +1;
}

#factoryView_upgrade {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background-color: #00000080;
    pointer-events: none;
    z-index: +10;
}

#factoryView_upgradeInner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50%;
    height: 50%;
    aspect-ratio: 1.5;
    transform: translate(-50%, -50%);
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
    border-radius: 5px;
    z-index: +1;
}

/* Stats View */

#statsView_inner {
    position: absolute;
    top: 40px;
    bottom: 0px;
    width: 100%;
}

.statsView_stat {
    float: left;
    display: flex;
    align-items: center;
    position: relative;
    width: calc(100% - 40px);
    padding-left: 20px;
    padding-top: 6px;
    padding-right: 20px;
    padding-bottom: 6px;
    box-shadow: 0px 0px 3px 2px #555 inset;
    text-align: left;
    font-size: 100%;
    color: #AAA;
}

/* Credits View */

.creditSplit {
    float: left;
    position: relative;
    width: calc(100% - 72px);
    height: fit-content;
    margin: 24px;
    padding: 12px;
    background-color: #00000044;
    box-shadow: 0px 0px 3px 2px #555 inset;
}

.creditSplit_section {
    position: absolute;
    left: 6px;
    top: 42px;
    right: 6px;
    bottom: 6px;
    overflow: hidden;
}

.credit {
    text-align: left;
    position: relative;
    float: left;
    left: 6px;
    width: 100%;
    height: 20px;
    color: #FFF;
    text-shadow: 0px 1px 4px #FFF;
    user-select: none;
}

/* Misc */

.buyButton_wrapper1 {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    height: 20px;
    background-color: hsl(101, 100%, 38%);
    filter: drop-shadow(0px 0px 2px #FFF);
}

.buyButton1 {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    left: 1px;
    top: 1px;
    right: 1px;
    bottom: 3px;
    background-color: hsl(101, 100%, 27%);
    user-select: none;
    color: #FFF;
    text-shadow: 0px 1px 4px #000;
    pointer-events: all;
}

.exitButton_wrapper1 {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 36px;
    height: 20px;
    background-color: hsl(1, 100%, 38%);
    filter: drop-shadow(0px 0px 2px hsl(1, 100%, 27%));
}

.exitButton1 {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    left: 1px;
    top: 1px;
    right: 1px;
    bottom: 3px;
    background-color: hsl(1, 100%, 27%);
    user-select: none;
    color: #FFF;
    text-shadow: 0px 1px 4px #000;
    pointer-events: all;
}

.text1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    left: 0px;
    top: 0px;
    right: 0px;
    height: 20px;
    color: #FFF;
    text-shadow: 0px 1px 4px #FFF;
    user-select: none;
}

.text1_transparent {
    display: flex;
    text-align: center;
    position: absolute;
    left: 4px;
    top: 20px;
    right: 4px;
    height: 20px;
    color: #FFFFFF88;
    text-shadow: 0px 1px 4px #FFFFFF88;
    font-size: 12px;
    user-select: none;
}

.text2 {
    text-align: left;
    position: absolute;
    left: 26px;
    top: 0px;
    right: 26px;
    height: 36px;
    color: #FFF;
    text-shadow: 0px 1px 4px #FFF;
    user-select: none;
    font-size: 28px;
}

/* Ads */

#wrapper_ad {
    position: absolute;
    width: calc(5% + 120px);
    top: 0px;
    right: 0px;
    height: 100%;
    background-color: #222;
    box-shadow: 0px 0px 3px 2px #555 inset;
    text-shadow: 0px 1px 4px #FFF;
    color: #FFF;
    z-index: 1000000;
}
