@font-face {
    font-family: "Aller";
    src: url(Assets/fonts/Aller_Rg.ttf);
    font-family: "Montserrat";
    src: url(Assets/fonts/Montserrat-Regular.ttf);
    font-family: "Montserrat-Bold";
    src: url(Assets/fonts/Montserrat-Bold.ttf);
}
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
*{
    font-family: "Aller";
}
html{
    background: #b1e4e6;
    background: linear-gradient(223deg,rgb(143, 127, 166) 0%, rgb(180, 143, 166) 100%);
}
body, main{
    height: 100vh;
    overflow: hidden;
}
#game {
    max-height: max-content;
    height: 100%;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    height: calc(100vh - 60px);
}
#section-left,
#section-middle,
#section-right {
    height: calc(100vh - 100px);
    overflow-y: auto;
    margin-top: 1%;
    border-radius: 5px 5px 0px 0px;
}
#section-left {
    width: 25%;
    background-color: rgb(60, 60, 114);
    pointer-events: auto;
}

#section-middle {
    width: 50%;
    background-color: lightgray;
    pointer-events: auto;
}

#section-right {
    width: 25%;
    background-color: darkgray;
    pointer-events: auto;         
    overflow: visible;
    overflow-y: scroll;
}
#name{
    color: white;
    margin-top: 23px;
}
.namething{
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -20px;
    padding-bottom: -10px;
}
#namebox{
    margin-top: -10px;
    padding: 5px;
    border-radius: 10px;
    border: #11116d;
    animation-name: rainbow;
    animation-duration: 2s;
    animation-direction: alternate;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@keyframes rainbow{
 0%{ 
    color: #cb0e0e;
 }
 15%{ 
    color: #cb6c0e;
 }
 30%{ 
    color: #cbb50e;
 }
 50%{ 
    color: #21cb0e;
 }
 65%{ 
    color: #0ebecb;
 }
 80%{ 
    color: #cb0e6c;
 }
 95%{ 
    color: #cb0e3a;
 }
 100%{
    color: #cb0e0e;
 }
}
.rainbow-enabled * {
    animation: rainbow 10s linear infinite;
}
#namebox:hover{
    background-color: #b1e4e6;
}
#clickContainer{
    position: absolute;
     inset: 0;
     pointer-events: none;     
    overflow: visible;
}
#potion-button{
    user-select: none;
}
.click-float {
    position: absolute;
    transform: translateY(0);
    z-index: 1000;
    font-weight: 700;
    color: #dd20b7;       
    text-shadow: 1px 3px 0 #3a0b7266;
    font-size: 1.5rem;
    user-select: none;
    background-color: #971d7f49;
}

.menu{
    display: flex;
    padding: 5px;
    width: 75%;
    margin-right: 12.5%;
    background-color: darkslategrey;
    color: antiquewhite;
    border-radius: 0 0 5px 5px;
}
.menu ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin-right: 0.5rem;
    align-items: flex-start;
}
.menu li{
    margin-right: 2rem;
    display: flex;
    align-items: center;
}
.menu a{
    color: antiquewhite;
}
.menu li.title{
    margin-left: 1rem; 
    color: gold;
}
.potion-button{
    border: 0;
    background: none;
}
.logo{
    height: 1rem;
    margin-left: 5px;
}
#flavour-text{
    text-align: center;
    font-size: large;
    color: rgb(166, 100, 237);
    padding-top: 30px;
    padding-bottom: 30px;
    width: 60%;
    margin: auto;
    background-color: rgba(230, 230, 250, 0.464);
    transition: 0.2s linear;
    user-select: none;
}
cite.sigil{
    font-size: small;
    text-align: end;
}
#flavour-text:hover{
    color: rgb(95, 78, 176);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.507);
}

#button-containers {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: auto;
}
#info-button,
#stats-button,
#options-button,
#ach-button  {
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 0.6rem 1.2rem;
    background-color: #7a7aae;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid rgb(0, 0, 0);
    transition: background-color 0.25s ease;
}

#info-button:hover,
#stats-button:hover,
#options-button:hover,
#ach-button:hover {
    background-color: #6a6ab3;
}

#info-text,
#stats-text,
#options-text,
#ach-text{
    margin: auto;
    padding: 1rem;
    background: rgb(29, 29, 29);
    color: white;
    border-radius: 2px;
    border: 5px white ridge;
    width: 90%;
    overflow: hidden;
    z-index: 100;
}
#stats-text{
    margin-top: -10px;
}
#options-text{
    margin-top: -10px;
}
#ach-text{
    margin-top: -10px;
}
#info-text.untoggled,
#stats-text.untoggled, 
#options-text.untoggled,
#ach-text.untoggled{
    opacity: 0;
    max-height: 0;
    padding: 0;
    pointer-events: none;
}
#info-text.toggled,
#stats-text.toggled,
#options-text.toggled,
#ach-text.toggled {
    opacity: 1;
    max-height: fit-content;
    pointer-events: auto;
}

.page-title{
    font-size: x-large;
    color: rgb(255, 255, 255);
    text-align: center;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.507);
}
.major{
    color: cadetblue;
}
.major::before {
    content: "";
    display: block;
    height: 2px;
    width: 50%;
    background: linear-gradient(82deg,cadetblue 0%, rgba(102, 102, 102, 0.36) 74%);
    margin: 6px 0px 6px -16px;
}
.major::after {
    content: "";
    display: block;
    height: 2px;
    width: 50%;
    background: linear-gradient(82deg,cadetblue 0%, rgba(102, 102, 102, 0.36) 74%);
    margin: 6px 0px 6px -16px;
}
.minor{
    color: grey;
    font-size: large;
}
.minor::before {
    content: "";
    display: block;
    height: 1px;
    width: 50%;
    background: linear-gradient(82deg,gray 0%, rgba(102, 102, 102, 0.36) 74%);
    margin: 6px 0px 6px -16px;
}
.minor::after {
    content: "";
    display: block;
    height: 1px;
    width: 50%;
    background: linear-gradient(82deg,gray 0%, rgba(102, 102, 102, 0.36) 74%);
    margin: 6px 0px 6px -16px;
}

#score-container{
    text-align: center;
    color: gold;
    font-size: xx-large;
    font-family: "Montserrat-Bold", sans-serif;
    padding: -5px;
    text-shadow: 2px 2px 1px rgb(0, 0, 0);
    user-select: none;
    margin-top: 0;
}
#pps-container{
    text-align: center;
    color: rgb(255, 255, 255);
    font-family: "Montserrat-Bold", sans-serif;
    margin-top: -5px;
    text-shadow: 1px 1px 2px white;
    user-select: none;
}
#potion-button{
    display: flex;
    justify-content: center;
    align-items: center;
    place-items: center;
    margin-left: 25%;
    width: 40%;
    position: relative;
    transform-origin: center;
    z-index: 100;
}
.big-potion{
    transition: all 100ms ease-out;
    scale: 1.25;
    padding: 1rem;
    margin-top: 50px;
}
.big-potion:hover{
    transition: all 200ms cubic-bezier(.19,1.83,.86,.87);
    transform: scale(1.45);
    cursor: pointer;
}
.big-potion:active{
    transition: all 100ms cubic-bezier(.19,1.43,.86,.87);
    transform: scale(1.35);
}
.radial-glow{
    position: absolute;
    width: 20%;
    z-index: 2;
    opacity: 0.65;
    user-select: none;
    animation: rotate 10s linear infinite;
    margin-left: 2.5%;
    margin-top: 2.5%;
}
.radial-glow2{
    position: absolute;
    width: 25%;
    z-index: 1;
    opacity: 0.4;
    user-select: none;
    animation: rotate 20s linear infinite;
}
h2.center{
    text-align: center;
    color: white;
    padding: 1rem;
    padding-bottom: 0;
    user-select: none;
    font-size: xx-large;
    padding-top: 0;
}

.logo-img{
    align-self: flex-start;
    position: absolute;
    width: 124px;
    height: 64px;
    top: 0;
    right: 124px;
    padding: 5px 40px 0px 40px;
    margin-top: 5px;
    background-color: rgba(54, 90, 90, 0.456);
    border-radius: 5px 5px 10px 20px;
}
#upgrades{
    display: grid;
    grid-template-columns: repeat(auto-fill, 54px);
    grid-auto-rows: 54px;       
    width: calc(100% - 10px);
    position: relative;
    background-color: aquamarine;
    min-height: 128px;
    border: 5px solid darkgreen;
    height: auto;
}
.workers{
    position: relative;
    background-color: rgba(0, 255, 255, 0.477);
    width: 90%;
    height: 50px;
    border: 2px;
    padding: 3px;
    margin: 5px;
    margin-left: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: block;
    display: flex;
    align-items: center;     
    justify-content: center;
    flex-direction: column;  
    box-shadow: 3px 20px 0 0 rgba(55, 255, 225, 0.3) inset;
    border: 4px solid rgb(39, 62, 29); 
    outline: 3px solid rgb(255, 255, 255);
    user-select: none;
} 

.hitbox{
    position: absolute;
    background-color: rgba(255, 0, 0, 0);
    width: 100%;
    height: 100%; 
    top: 0;
    left: 0;
    padding: 3px;
    margin-left: 0;
}
.worker-title {
    font-size: 1.5rem;
    margin: 0;
    text-align: center;   
    width: 100%;    
}
.worker-png{
    position: absolute;
    height: 50px;
    width: 50px;
    left: 20px;
    top: 5px;
    user-select: none;
}
.counter {
    position: absolute;
    top: 0px;
    left: 80%;
    font-size: 50px;
    font-weight: bold;
    color: gold;
}
.potion-icon{
    height: 1rem;
}
.worker-desc {
  position: fixed;     
  left: calc(75% - 350px);         
  top: 0;            
  width: 300px;
  background-color: black;
  color: #fff;
  border-radius: 6px;
  padding: 8px;
  visibility: hidden;
  z-index: 2000;
  pointer-events: none; 
  border: 4px white solid;
}

.workers:hover .worker-desc {
  visibility: visible;
}

.upgrade {
    background-color: rgba(255, 215, 0, 0.2);
    border: 3px solid gold;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: 0.1s;
}
.upgrade-desc{
    position: fixed;     
    left: calc(75% - 350px);                
    width: 300px;
    background-color: black;
    color: #fff;
    border-radius: 6px;
    padding: 8px;
    visibility: hidden;
    z-index: 2000;
    pointer-events: none; 
    border: 4px white solid;
}
.upgrade-desc q,
.worker-desc q,
.ach q{
    color: khaki;
    font-size: small;
}
.upgrade:hover .upgrade-desc {
  visibility: visible;
}
.workers:hover .worker-desc {
  visibility: visible;
}
.ach:hover .ach-desc {
  visibility: visible;
}
.upgrade:hover {
    background-color: rgba(255, 215, 0, 0.6);
}

.upgrade-icon {
    width: 48px;
    height: 48px;
    display: block;
    margin: auto;
    pointer-events: none;
    transition: 0.2s;
    user-select: none;
}

.upgrade.locked{
    visibility: hidden;
    pointer-events: none;
    width: 0px;
    height: 0px;
    border-radius: 0px;
    border: 0px;
    position: absolute;
}

.upgrade.unlocked {
    visibility: visible;
    pointer-events: auto;
    position: relative;
}

.upgrade.bought {
    visibility: hidden;
    pointer-events: none;
    width: 0px;
    height: 0px;
    border-radius: 0px;
    position: absolute;
}

details {
  border: 2px solid #2b5ac8;
  border-radius: 4px;
  padding: 0.5rem;
  margin-top: 5px;
  background: radial-gradient(circle,rgba(63, 49, 92, 0.399) 0%, rgba(65, 91, 135, 0.212) 100%);
  outline: 2px solid rgb(255, 255, 255);
  user-select: none;
  cursor: pointer;
  margin-left: 1%;
  margin-right: 20%;
  margin-bottom: 10px;
}

details>summary{
    display: block;
  list-style-type: none;
}
summary::before {
  margin-right: 2rem;
  display: inline-block;
  content: '➡';
  transition: 0.2s;
}

details[open] > summary::before{
  transform: rotate(90deg);
}

details[open] {
  padding: 0.5em;
  font-size: small;
}

summary{
    font-weight: bold;
}

details[open] summary {
    font-size: 1rem;
  border-bottom: 1px solid #ffffff;
  margin-bottom: 1rem;
}

.misc-option{
    padding: 5px;
    background: #6a6ab3;
    color: white;
    width: 50%;
}
.misc-option:hover{
    background: #4a4a7c;
}
.misc-option:active{
   background: #3a3a5e; 
}

.save-buttons{
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-left: 3rem;
}
.save, 
.load,
.wipe{
    display: flex;
    flex-direction: column;
    margin: 20px;
    padding: 0.6rem 1.2rem;
    background-color: #7a7aae;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: 2px solid rgb(0, 0, 0);
    transition: background-color 0.25s ease;
}
.wipe{
    background-color: #e7450f;
}
.save:hover,
.load:hover{
    background-color: #6a6ab3;
}
#golden{
    position: absolute;
    transform-origin: center;
    z-index: 101;
    transition: transform 7.5s ease-in-out;
    cursor: pointer;
}

.hidden{
    transform: scale(0);
    visibility: 0;
    content: '';
}

.visible{
    visibility: 1;
    transform: scale(1.0); 
}

.animationvisible{
    visibility: 1;
    transform: scale(1.0);
    animation-name: enterIn;
    animation-duration: 1.5s;
    animation-direction: alternate;
    animation-iteration-count: 2;
    animation-timing-function: ease-in-out;
}

#golden-desc{
    user-select: none;
    position: absolute;
    color: white;
    background-color: rgb(45, 60, 47, 0.5);
    text-shadow: 2px 2px 3px rgba(255, 255, 255, 0.507);
    padding: 5px;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: 0.5s;
    margin-left: -50px;
    z-index: 102;
}
#lucky-potion-icon{
    position: absolute;
    margin-left: 25%;
    border: 5px black solid;
    border-radius: 2px;
    background: #6a6ab3;
    width: 64px;
    transition: 0.2s linear;
}

.ach-icon{
    background-color: rgba(255, 215, 0, 0.2);
    border: 3px solid gold;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}

.ach-desc{
    position: fixed;     
    width: 300px;
    background-color: rgb(58, 12, 48);
    color: #fff;
    border-radius: 6px;
    padding: 8px;
    visibility: hidden;
    z-index: 2000;
    pointer-events: none; 
    border: 4px white solid;
    order: 1; 
}

#ach-box{
    display: grid;
    grid-template-columns: repeat(auto-fill, 54px);
    grid-auto-rows: 52px;       
    position: relative;
    background: #252533;
    width: 90%;
    border: 4px white ridge;
    padding: 1rem;
}

@keyframes enterIn {
    0%   {bottom: -60px; background-color: #07073500; color: #ffffff00;}
  20%   {bottom: -30px; background-color: #0707357f; color: #ffffff50;}
  80% {bottom: 20px; background-color: #070735; color: #fff;}
  100% {bottom: 25px; background-color: #220735; color: #fff;}
}

#unlock{
    position: absolute;
    margin-left: 17%;
    background-color: #070735;
    color: #fff;
    width: 20%;
    user-select: none;
    border-radius: 5px 5px 10px 0;
    padding: 0.5rem;
    bottom: 20px
}

#worker-box{
    width: 95%;
    border-radius: 9px;
    margin: auto;
}

#worker-box > div{
    min-width: 100%;
    height:128px;
    border: 5px rgba(6, 5, 7, 0.466) solid;
    margin-bottom: 5px;
    border-radius: 20px 30px 20px 20px;
    overflow: auto;
    display: flex;
    flex-direction: right;
    scrollbar-gutter: stable;
    overflow-y: hidden;
    background-image: url("Assets/smiley.png");
    background-repeat: repeat-x;
    background-size: 128px 128px;
    user-select: none;
    background-blend-mode: multiply;
    box-shadow: 2px 64px 0 0 rgba(122, 122, 122, 0.3) inset;
    corner-shape: superellipse(1.5);
    scroll-behavior: smooth;
}
#mouse-box{
    background-color: rgb(149, 88, 88);   
}
#wizard-box{
    background-color: rgb(149, 126, 88);
}
#brewery-box{
    background-color: rgb(140, 149, 88);
}
#manufacturer-box{
    background-color: rgb(89, 149, 88);
}
#lab-box{
    background-color: rgb(88, 149, 129);
}

#forest-box{
    background-color: rgb(88, 116, 149);
}

@media (max-width: 1200px){
    .logo-img{
        right: 16px;
    }

    .worker-title {
        font-size: 1.2rem;
    }
    .counter {
        right: 10px;
    }
    #info-button,
    #stats-button,
    #options-button,
    #ach-button  {
        margin: 10px;
    }
    .counter {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    }

    #unlock{
        width: 25%;
    }
}
