body {
    background-color: greenyellow;

    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12px;

    user-select: none;
    overflow: hidden;
    max-width: 100vw;
    max-height: 100vh;

    touch-action: none;
}

.fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
}
.center {
    position: absolute;
    top: 50%;
    left: calc(50% - 215px);
    width: 400px;
    transform: translateY(-50%);
}

.window, button, ::-webkit-scrollbar-thumb {
    background: #373a3ddf;
    color: #ffffff;
    border: 1px solid #848a91;
    border-radius: 5px;
    box-shadow: 0 0 10px #0000007f;
    padding: 10px;
    margin: 5px;
    text-align: center;
    transition: opacity .3s linear;
}

button:hover, ::-webkit-scrollbar-thumb:hover {
    background: #626669df;
}
button:active, ::-webkit-scrollbar-thumb:active {
    background: #222325df;
}
button:disabled {
    background: #222325df;
    border: 1px solid #848a9100;
    box-shadow: inset 0 0 10px #0000007f;
}

button {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 12px;
    padding: 5px 6px;
}

a {
    color: #0baf26;
}
a:hover {
    color: #17d136;
}
a:active {
    color: #0b8d21;
}

::-webkit-scrollbar {
    width: 10px;
    padding: 2px;
    background: #222325;
}
::-webkit-scrollbar:disabled {
    background: #22232500;
}
::-webkit-scrollbar-thumb {
    margin: 2px;
    border-radius: 3px;
    border: 2px solid #222325;
    box-shadow: inset 0 0 0 1px #848a91;
}
::-webkit-scrollbar-thumb:disabled {
    background: #22232500;
    border: none;
    box-shadow: none;
}

#curbox {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 3px;
}

#curbox > * {
    display: inline-block;
    width: 180px;
    padding: 5px 6px;
    margin: 2px;
    text-align: right;
    position: relative;
}

#curbox > *::after {
    position: absolute;
    right: 6px;
    top: 15px;
    font-size: 11px;
    content: attr(diff);
}

#curbox > *.addEffect::after {
    top: 25px;
    opacity: 0;
    transition: top  1s linear, opacity 1s linear;
}

#famebox {
    background: #1f1f7fdf;
    border-color: #7f7fff;
}
#famebox::before {
    position: absolute;
    left: 5px;
    content: "Fame";
}

#lootbox {
    background: #5f5f0fdf;
    border-color: #afaf1f;
}
#lootbox::before {
    position: absolute;
    left: 5px;
    content: "Loot";
}

#brickbox {
    background: #5a322ddf;
    border-color: #ae766e;
}
#brickbox::before {
    position: absolute;
    left: 5px;
    content: "Bricks";
}

#manabox {
    background: #5f1f5fdf;
    border-color: #af7faf;
}
#manabox::before {
    position: absolute;
    left: 5px;
    content: "Mana";
}

#karmabox {
    background: #5f1f4fdf;
    border-color: #af4f8f;
}
#karmabox::before {
    position: absolute;
    left: 5px;
    content: "Karma";
}

#elemitebox {
    background: #7f1f1fdf;
    border-color: #af5f5f;
    animation: rainbow 20s linear infinite;
}
#elemitebox::before {
    position: absolute;
    left: 5px;
    content: "Elemite";
}

@keyframes rainbow {
    from { 
        filter: hue-rotate(0);
    }
    to { 
        filter: hue-rotate(360deg);
    }
}


.hidden {
    opacity: 0;
}

#tipbox {
    position: absolute;
    top: 50px;
    left: calc(50% - 215px);
    width: 400px;
}

#tipbox > :first-child {
    font-size: 16px;
}
#tipbox > :nth-child(3) {
    margin-top: 8px;
    opacity: .5;
    font-size: 11px;
}

#menu {
    position: absolute;
    width: max(80%, 400px);
    height: 50%;
    bottom: calc(-50% - 10px);
    left: calc(50% - max(40%, 200px));
    transition: bottom .4s ease-out, opacity .3s linear;
}
#menu.expanded {
    bottom: 5px;
    transition: bottom .6s ease-out;
}

#tablist {
    position: absolute;
    top: -44px; left: 0; right: 0;
    padding: 2px 2px 2px 5px;
    transition: top .4s;
}
#menu.expanded #tablist {
    top: -25px;
}

#subtablist {
    padding: 10px 10px 0 10px;
    margin: 0 0 0 0;
    max-height: 23px;
    min-height: 23px;
    border-bottom: 2px solid #0baf26;
    box-shadow: inset 0 -15px 10px -10px #0000003f;
    overflow: hidden;
    text-align: left;
    z-index: 2;
}

.tabbtn {
    position: relative;
    padding: 5px 6px;
    margin: 0 3px 0 0;
}
#subtablist > .tabbtn {
    margin: 0 3px -3px 0;
}
#tablist > .tabbtn:last-child {
    position: absolute;
    right: 3px;
}
#menu.expanded .tabbtn {
    border-radius: 4px 4px 0 0;
}

.tabbtn.active {
    top: -2px;
    background: #0baf26;
    border-color: #0baf26;
    box-shadow: 0 0 20px #000000af, 0 0 10px #000000af, 0 0 10px #17d136;
    z-index: 1;
    border-bottom: none;
}
#tablist > .tabbtn.active:last-child {
    transform: translateY(2px);
}
.tabbtn.active:hover {
    background: #17d136;
    border-color: #17d136;
}
.tabbtn.active:active {
    background: #0b8d21;
    border-color: #0b8d21;
}

#tabbox {
    position: absolute;
    display: flex;
    flex-flow: column;
    flex: 1 1;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: 0;
    padding: 0;
    z-index: 1;
    overflow: hidden;

    border-top: 3px solid #0b8d21;
    box-shadow: 0 0px 10px #0000007f;
}

#tabcontent {
    padding: 10px;
    overflow-x: hidden;
    touch-action: pan-y;
}

#upgbox {
    width: 100%;
}

.upgcategory {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    padding: 28px 0 5px 0;
    font-size: 12px;
    transition: padding .3s;
}

.upgcategory.collapsed {
    padding: 28px 0 0 0;
}

.upgcategory > :first-child {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    padding-bottom: 5px;

    text-align: left;
    border-bottom: 1px solid #848a91;
    transition: padding .3s;
}
.upgcategory.collapsed > :first-child {
    padding-left: 20px;
}

.upgcategory.collapsed > .upgbtn {
    height: 0;
    margin: 0 5px;
    padding: 0 8px;
    border: 0 solid transparent;
    opacity: 0;
}


.upgbtn {
    position: relative;
    padding: 10px;
    overflow: hidden;
    transition: height .3s, margin .3s, padding .3s, border .3s, opacity .3s;
}

[tab="upgrades"] .upgbtn  {
    height: 100px;
    padding-bottom: 30px;
}

[tab="grimoire"][subtab="elem"] .upgbtn {
    height: 180px;
    padding-bottom: 46px;
}

.upgbtn > :first-child {
    font-weight: bold;
}
.upgbtn > :nth-child(3), .upgbtn > :nth-child(4) > div {
    font-size: 11px;
}
.upgbtn > :nth-child(4) {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 5px;
    background-color: #1f1f7fdf;
    border-radius: 0 0 4px 4px;
}

.big {
    font-size: 16px;
}
.title {
    margin-top: 25px;
    font-size: 16px;
}
.subtitle {
    font-size: 11px;
}

#keybindings > :not(:first-child) {
    text-align: left;
    margin: 0px 5px;
}

.key {
    background: #373a3ddf;
    color: #ffffff;
    border: 1px solid #848a91;
    border-radius: 5px;
    box-shadow: 0 0 5px #0000007f;
    padding: 2px;
    margin: 2px;
    height: 21px;
    min-width: 21px;
    font-size: 11px;
    text-align: center;
}
.key:hover {
    background: #623334df;
}
.key:active {
    background: #221111df;
}
.key:last-child {
    background: #163a17df;
}
.key:last-child:hover {
    background: #316634df;
}
.key:last-child:active {    
    background: #112211df;
}

#riftbar {
    letter-spacing: -.2em;
    line-height: 1.1em;
    position: relative;
    
    background: #373a3ddf;
    color: #ffffff;
    border: 1px solid #848a91;
    border-radius: 5px;
    box-shadow: 0 0 10px #0000007f;
    padding: 2px 4px 4px 2px;
    margin: 20px auto 0 auto;
    width: fit-content;
    text-align: center;
}
#riftbar:before {
    content: "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\A⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\A⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\A⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿";
    opacity: .1;
    white-space: pre;
    position: absolute;
    left: 2px; top: 2px;
}