@import url('https://fonts.googleapis.com/css?family=Lato');

:root {
    --font: "Lato";
    --sliderwidth: 53px;
    --sliderheight: 28px;
    --sliderpadding: 4px;
}

html, body {
    padding: 0px 0px;
    margin: 0px 0px;
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    overscroll-behavior: none;
}

body {
    position: relative;
    background: linear-gradient(180deg, #1678BE 0%, #010B35 100%);
}

p, h1, h2, h3, input, button {
    font-family: var(--font);
    color: white;
    text-shadow: 1px 1px 1px black;
    margin: 0px 0px;
    padding: 0px 0px;
}

p {
    font-size: 16px;
}

a {
    font-weight: bold;
    color: white !important;
    transition-duration: 0.1s;
}

a:hover, a:focus, a:focus-visible {
    color: cyan !important;
}

.med {
    font-size: 16px;
}

.smol {
    font-size: 15px;
}

.small {
    font-size: 13px;
}

h2 {
    font-size: 40px;
}

h3 {
    font-size: 20px;
}

input[type=text] {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 5px 1px;
    border-radius: 10px;
}

input[type=text]:focus, input[type=text]:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
}

button {
    font-weight: bold;
    text-shadow: none;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    border-radius: 5px;
    transition-duration: 0.1s;
    border: 2px solid white;
    background-color: rgba(0, 200, 200, 0.75);
    --hoverColor: rgba(0, 200, 200, 0.85);
    --activeColor: rgba(0, 200, 200, 0.9);
}

.greenButton {
    background-color: rgba(0, 200, 160, 0.75);
    --hoverColor: rgba(0, 200, 160, 0.85);
    --activeColor: rgba(0, 200, 140, 0.9);
}

.redButton {
    background-color: rgba(255, 100, 100, 0.75);
    --hoverColor: rgba(255, 90, 90, 0.85);
    --activeColor: rgba(255, 80, 80, 0.9);
}

button:hover, button:focus, button:focus-visible { background-color: var(--hoverColor) !important; outline: none; scale: 1.02 }
button:active { background-color: var(--activeColor) !important; scale: 1.05; }

button:disabled {
    border-color: rgb(180, 180, 180);
    pointer-events: none;
    filter: saturate(0.5);
    opacity: 50%;
}

.slider {
    position: relative;
    display: inline-block;
    width: var(--sliderwidth);
    height: var(--sliderheight);
}

.slider input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider:focus-within {
    outline: 2px solid white;
    border-radius: 420px;
}

.sliderspan {
    position: absolute;
    cursor: pointer;
    margin: 0px 0px !important;
    top: 0; left: 0; right: 0; bottom: 0; 
    background-color: rgba(255, 255, 255, 0.25);
    transition-duration: 0.1s;
    transition-timing-function: ease-in-out;
    border-radius: 420px;
}
  
.sliderspan:before {
    position: absolute;
    content: "";
    height: calc(var(--sliderheight) - var(--sliderpadding) );
    width: calc(var(--sliderheight) - var(--sliderpadding) );
    left: var(--sliderpadding);
    bottom: calc(var(--sliderpadding) * 0.5);
    background-color: white;
    transition-duration: 0.1s;
    transition-timing-function: ease-in-out;
    border-radius: 420px;
}
  
input:checked + .sliderspan {
    background-color: rgb(150, 150, 255);
}
  
input:checked + .sliderspan:before {
    transform: translateX(calc(var(--sliderwidth) - var(--sliderheight) - (var(--sliderpadding))));
}

.unloaded {
    display: none !important;
}

.flexCenter {
    display: flex;
    align-items: center;
    justify-content: center;
}

.oldCenter {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.icon {
    height: 0.9em !important;
    width: 0.9em !important;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
    flex: 1;
    user-select: none;
}

.inactive {
    opacity: 50%;
    text-decoration: line-through;
}

.noHit {
    pointer-events: none;
    user-select: none;
}

#game_box {
    width: 100%;
    height: 100%;
    overflow-y: hidden;
    overflow-x: hidden;
    text-align: center;
}

#game_box canvas {
    height: 100%;
}

#upgrade_menu {
    position: absolute;
    right: 0px;
    top: 0px;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    pointer-events: none; 
}

#upgrade_menu:not(.active) {
    right: -500px;
    pointer-events: none;
    user-select: none;
    animation: slideOut 0.2s forwards;
    animation-timing-function: ease-in;
}

#upgrade_menu:not(.active) #upgrade_box {
    user-select: none;
    pointer-events: none;
}

#upgrade_menu.active {
    animation: slideIn 0.35s forwards;
    animation-timing-function: cubic-bezier(0.25, 1.28, 0.64, 1);
}

#upgrade_box {
    width: 280px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 3px solid var(--col1);
    border-radius: 20px;
    pointer-events: auto; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    margin-top: 8px;
    margin-right: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
}

#upgrade_menu::-webkit-scrollbar {
    display: none;
}

#upgrade_menu p {
    margin-top: 9px;
    width: 87%;
    text-align: center;
}

#upgrade_menu hr {
    width: 88%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.4);
    /* background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255, 255, 255, 0.5) 30%, rgba(255, 255, 255, 0.5) 70%, rgba(255,255,255,0) 100%); */
    border: none;
}

#upgrade_photo_border {
    width: 100px;
    height: 100px;
    min-height: 100px;
    background: linear-gradient(135deg, var(--col1) 0%, var(--col2) 100%);
    border-radius: 10px;
    margin-top: 16px;
}

#upgrade_photo {
    width: 90px;
    height: 90px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    user-select: none;
}

#upgrade_photo img {
    width: 95%;
    object-fit: contain;
}

#upgrade_name {
    font-weight: bold;
    font-size: 22px;
    width: 200px;
    margin-top: 10px;
}

#upgrade_button {
    margin-top: 10px;
    width: 180px;
    height: 60px;
}

#upgrade_button:hover, #upgrade_button:focus, #upgrade_button:focus-visible { background-color: rgba(0, 255, 255, 0.6); outline: none; scale: 1.02 }
#upgrade_button:active { background-color: rgba(0, 200, 255, 0.75); scale: 1.05; }

.upgrade_stats {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.upgrade_stats .icon {
    margin-right: 12px;
    cursor: help;
}

.upgrade_squares div {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

.upgrade_squares div.upg {
    background-color: var(--col1);
}

#upgrade_special_buttons {
    width: 100%;
    gap: 10px;
    margin-top: 12px;
}

#upgrade_special_buttons button {
    font-size: 16px;
    text-shadow: none;
    width: 40%;
    height: 55px;
}

.upgrade_footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100px;
}

.sell_options button {
    width: 85px;
    height: 35px;
}

#trait_container {
    height: 75px;
    width: 95%;
    flex-direction: column;
}

#sell_button {
    font-size: 16px;
    margin-top: 9px;
    width: 83%;
    height: 35px;
}

#coin_counter, #top_right {
    position: absolute;
    display: flex;
    user-select: none;
    gap: 15px;
    left: 15px;
    top: 15px;
}

#coin_counter img {
    height: 50px;
}

#top_right {
    left: unset;
    right: 15px;
    gap: 10px;
}

#top_right:not(.covered) {
    opacity: 100%;
    animation: fadeIn 0.3s forwards;
}

#top_right.covered {
    opacity: 0%;
    pointer-events: none;
    user-select: none;
    animation: fadeOut 0.3s forwards;
}

#top_right button {
    position: relative;
    flex-direction: column;
    width: 90px;
    height: 90px;
    background-color: rgba(140, 255, 255, 0.5);
    --hoverColor: rgba(140, 220, 220, 0.6);
    --activeColor: rgba(120, 200, 200, 0.75);
}

#top_right button img {
    width: 55%;
}

#top_right .smallButtons {
    height: 90px;
    flex-direction: column;
    justify-content: space-between;

}

#top_right .smallButtons button {
    background-color: rgba(140, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
}

#top_right #buy_button img {
    width: 62%;
}

#top_right  #buy_button span {
    margin-top: 3px;
}

#top_right  #buy_button .buy_plus {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 15px;
}

.popupbox {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.popupcontainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 3px solid white;
    border-radius: 10px;
    padding: 15px 10px;
    width: 370px;
}

.popupcontainer p {
    line-height: 30px;
}
.popupcontainer h3 {
    font-size: 25px;
    margin-bottom: 10px;
}

#settings_menu {
    margin-top: 20px;
    display: flex;
    gap: 40px
}

#settings_menu .setting {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reset_everything {
    text-decoration: underline;
    cursor: pointer;
    width: auto;
    transition-duration: 0.1s;
    user-select: none;
    color: rgba(255, 255, 255, 0.6);
}

#reset_everything:hover, #reset_everything:focus, #reset_everything:focus-visible {
    color: rgb(255, 180, 180);
}

#reset_container button {
    width: 100px;
    height: 40px;
}

#version_number {
    opacity: 50%;
    position: absolute;
    left: 10px;
    bottom: 0px;
}

#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loading img {
    padding-right: 15px;
    margin-bottom: 15px;
    width: 100px;
}


@keyframes slideIn {
    0% { right: -500px; }
    100% { right: 0px; }
}

@keyframes slideOut {
    0% { right: 0px; }
    100% { right: -500px }
}

@keyframes fadeIn {
    0% { opacity: 0%; }
    100% { opacity: 100%; }
}

@keyframes fadeOut {
    0% { opacity: 100%; }
    100% { opacity: 0%; }
}