@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

@import url("./tabs/modules.css");
@import url("./tabs/prestige.css");

* {
  margin: 0;
  padding: 0;

  color: #fff;
  font-family: 'Share Tech Mono', monospace;
  user-select: none;
}
*::-webkit-scrollbar {
  width: 0.7vmin;
  height: 0.7vmin;
}
*::-webkit-scrollbar-thumb {
  background-color: #fff;
  border-radius: 1vmin;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track {
  background-color: grey;
  border-radius: 10px;
}

body {
  width: 100vw;
  height: 100vh;

  font-size: min(1.6vh, 1.2vw);
  background-color: #222;
  overflow-x: hidden;

  --transition: all 0.2s;
  --col-gold: #fcf581;
  --col-prestige: #81b4fc;
  --col-upgrade: #f06cf0;
}

#container {
  width: 100vw;
  height: 100vh;
}

#resources {
  margin-bottom: 1vh;
  padding-left: 2vw;

  height: 6vh;

  display: flex;
  justify-content: space-evenly;
  align-items: center;

  background-color: #111;
}
#upgrade-modules {
  height: 4vh;
  
  display: flex;
  flex-wrap: wrap;

  background-color: #111;
}
#upgrade-list {
  width: 100vw;
  height: 30vh;
  
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  
  background-color: #111;
}
#contents {
  margin: 1vh auto 0 auto;
  width: 95%;
  
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  
  height: 56vh;
  
  background-color: #1e1e1e;
  border-radius: 1vmin;
}
#contents > * {
  height: 90%;
}

#resources > * {
  width: 40%;

  text-align: center;
  font-size: 2.5em;
}
#resources__gold {
  color: var(--col-gold);
}
#resources__prestige {
  color: var(--col-prestige);
}

.upgrade-modules__item {
  width: 10vw;
  
  white-space: nowrap;
  font-size: 0.8em;

  display: flex;
  justify-content: center;
  align-items: center;
}

.upgrade {
  margin: auto;
  padding: 1vmin;
  width: 16%;
  height: 40%;

  background-color: #333;
  border-radius: 1vmin;

  cursor: pointer;
  transition: var(--transition);
}
.upgrade:hover {
  background-color: #222;
}
.upgrade__name {
  white-space: nowrap;
  font-size: 1.3em;
  text-align: center;
  text-shadow: 0 0 0.3vmin #222, 0 0 0.3vmin #222;
}
.upgrade__effect-list {
  height: 65%;

  overflow-x: hidden;
  overflow-y: auto;
}
.upgrade__cost {
  --progress: 100%;

  text-align: center;
  color: var(--col-gold);

  background: linear-gradient(
    to right,
    #fff0 0%,
    #fff0 var(--progress),
    #fff1 var(--progress),
    #fff1 100%
  );
}
.upgrade__effect-list__item {
  transition: var(--transition);
}
.upgrade__effect-list__item > * {
  transition: var(--transition);
}
.upgrade__effect-list__item:hover {
  background-color: #444;
}
.upgrade__effect-list__item__name {
  display: inline-block;

  width: 50%;

  white-space: nowrap;
  font-size: 0.8em;
  text-align: center;
}
.upgrade__effect-list__item__value {
  font-size: 0.8em;
}
.upgrade__effect-list__item:hover > .upgrade__effect-list__item__name {
  width: 30%;
  font-size: 0.3em;
}
.upgrade__effect-list__item:hover > .upgrade__effect-list__item__value {
  font-size: 1.3em;
  font-weight: bold;
}

#effect-list {
  width: 27%;

  background-color: #333;
  box-shadow: 0 0 2vmin #000;
  border-radius: 1.5vmin;
  overflow-y: auto;
}
#tabs-wrapper {
  width: 68%;
}
@media screen and (orientation: portrait) {
  #contents {
    flex-direction: column;
  }

  #contents > * {
    width: 95%;
    height: 48%;
  }
}

.effect-list__item {
  margin: 0 auto;
  padding: 0.4vmin 0.4vmin;

  display: flex;
  align-items: flex-end;

  width: 85%;

  transition: var(--transition);
}
.effect-list__item:first-child {
  margin-top: 1.2vmin;
}
.effect-list__item > * {
  transition: inherit;
}
.effect-list__item__name {
  flex: 2;

  white-space: nowrap;
}
.effect-list__item__value {
  flex: 3;
}
.effect-list__item:hover {
  background-color: #fff2;
}
.effect-list__item:hover > .effect-list__item__name {
  font-size: 0.6em;
}
.effect-list__item:hover > .effect-list__item__value {
  flex: 6;
  font-size: 1.5em;
  font-weight: bold;
  text-shadow: 0 0 0.2vmin #fff;
}

#tab-buttons {
  margin: 0 auto;

  width: 95%;
  height: 6%;
}
#tabs {
  position: relative; /** To make this element highter than #tab-buttons */

  height: 94%;

  background-color: #333;
  box-shadow: 0 0 2vmin #000;
  border-radius: 1.5vmin;
}

.tab-button > svg {
  margin-right: 0.7vmin;
}
.tab-button {
  display: inline-flex;
  justify-content: center;
  align-items: flex-start;
  
  padding-top: 0.3vmin;

  height: 150%;
  min-width: 15%;

  font-size: 1.2em;

  background-color: #444;
  border-radius: 0.7vmin 0.7vmin 0 0;
  
  cursor: pointer;
  transition: var(--transition);
}
.tab-button:hover, .tab-button.active {
  transform: translateY(-20%);
  filter: invert(1);
}

#tabs > div {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
