/* Z-INDEX TRACKER:
  - 999: sidebar
  - 1000: menu bar overlay
  - 1001: menu bar
  - 2000: version selector overlay
  - 2001: version selector
  - 3000: chart
  - 4000: calculator overlay
  - 4001: calculator
  - 9999: tooltip text
*/

/* main page initial styling */
html, body {
  margin: 0px;
  padding: 0px;
  background-color: #111111;
  color: #ffffff;
  font-family: "Inconsolata", monospace;
  text-align: center;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body:after {
  z-index: -1;
  position: absolute;
  width: 0px;
  height: 0px;
  overflow: hidden;
  content: url(../../assets/misc/home-hover.webp) url(../../assets/misc/top-hover.webp) url(../../assets/misc/calc-hover.webp) url(../../assets/misc/chart-hover.webp) url(../../assets/misc/download-hover.webp);
}
li {
  margin-left: 15px;
}

/* ----------------------------------------------------------------------- PAGE ELEMENTS ----------------------------------------------------------------------- */

#sidebar {
  z-index: 999;
  top: 0px;
  left: 0px;
  position: fixed;
  width: 45px;
  height: 100vh;
  background-color: #222222;
  border-right: 2.5px solid #444444;
}
#page {
  margin-left: 47.5px;
  position: relative;
}

/* ------------------------------------------------------------------------ TITLE ------------------------------------------------------------------------ */

/* main page header */
#title {
  font-size: 24px;
  font-weight: bold;
  user-select: none;
  padding: 1em 0em;
}

/* ----------------------------------------------------------------------- VERSION ----------------------------------------------------------------------- */

/* version display */
#v {
  gap: 15px;
  display: flex;
  justify-content: center;
}
#v-text {
  width: 260px;
  padding: 15px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  cursor: pointer;
}
#v-text:hover {
  border: 2px solid #b2cee7;
  background-color: #b2cee7;
  color: #000000;
  transition: all 0.1s ease-in-out;
}
/* version changer buttons */
#v-l, #v-r {
  margin-top: -7.5px;
  font-size: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
}
#v-l:hover, #v-r:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}
/* version name/time */
#v-name {
  font-weight: bold;
}
#v-time {
  margin-top: 5px;
  font-size: 12px;
  font-style: italic;
}
#v-id {
  margin-top: 5px;
  color: #aaaaaa;
  font-size: 12px;
  font-style: italic;
}

/* ------------------------------------------------------------------------ NODE ------------------------------------------------------------------------ */

/* node display */
#n {
  gap: 15px;
  display: flex;
  justify-content: center;
}
#n-text {
  margin: 10px 0px;
  font-size: 24px;
}
/* node changer buttons */
#n-l, #n-r {
  margin-top: -2.5px;
  font-size: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
}
#n-l:hover, #n-r:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}

/* ------------------------------------------------------------------------ BUFF ------------------------------------------------------------------------ */

/* buff display */
#b1 {
  margin: 0px 15px;
  padding: 15px;
  border-radius: 4px;
  background-color: #27363e;
  text-align: left;
  display: flex;
  flex-direction: column;
}
#b2 {
  margin: 15px;
  padding: 15px;
  gap: 15px;
  border-radius: 4px;
  background-color: #27363e;
  text-align: left;
  display: flex;
  flex-direction: column;
}
#b-conc {
  margin-top: 15px;
  min-height: 65px;
  gap: 15px;
  align-items: center;
}
#b-surg {
  margin-top: 15px;
  min-height: 87.5px;
  gap: 15px;
  align-items: center;
}

/* buff image/text */
.b-option {
  gap: 15px;
  display: flex;
  align-items: center;
}
.b-img {
  width: 37.5px;
  user-select: none;
}
.b-title {
  margin-bottom: -15px;
  color: #f29e38;
  font-weight: bold;
  text-decoration: underline;
  text-align: right;
}
.b-text {
  width: 100%;
}
.b-name {
  font-weight: bold;
  text-decoration: underline;
  user-select: all;
}
.b-desc {
  margin-top: 7.5px;
  font-size: 12px;
  line-height: 1.75;
}

/* ------------------------------------------------------------------------- HP ------------------------------------------------------------------------- */

/* hp display */
#v-hp {
  margin-top: auto;
  line-height: 1.5;
}

/* enemy hp display */
#v-hp-raw {
  color: #e06666;
  font-weight: bold;
  user-select: all;
}
#v-hp-aoe {
  color: #6d9eeb;
  font-weight: bold;
  user-select: all;
}
#v-hp-alt {
  color: #f6b26b;
  font-weight: bold;
  user-select: all;
}

/* ------------------------------------------------------------------------ SIDE ------------------------------------------------------------------------ */

/* side display */
#s {
  margin: 15px;
  gap: 15px;
  display: flex;
  justify-content: center;
}
#s1, #s2, #s3 {
  margin-top: 15px;
  min-height: 814.5px;
  gap: 30px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

/* side header */
.s-header {
  color: #f29e38;
  font-size: 16px;
  font-weight: bold;
}
.s-hp-atk-mult {
  margin-top: 7.5px;
  color: #ffffff;
  font-size: 12px;
  user-select: none;
}

/* ------------------------------------------------------------------------ WAVE ------------------------------------------------------------------------ */

/* wave display */
.w-e {
  margin-top: 7.5px;
  gap: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------------ ENEMY ------------------------------------------------------------------------ */

/* enemy display */
.e {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* enemy image */
.e-hover {
  height: 96px;
  position: relative;
}
.e-img {
  height: 96px;
  transition: opacity 0.1s ease-in-out;
  user-select: none;
}
.e-hover:hover .e-img {
  opacity: 0.2;
}

/* enemy name */
.e-name {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.1s ease-in-out;
}
.e-hover:hover .e-name {
  opacity: 1;
  user-select: all;
}

/* enemy count */
.e-count {
  bottom: 0px;
  right: 0px;
  position: absolute;
  padding: 2.5px 5px;
  background: #dddddd;
  color: #000000;
  font-weight: bold;
  border-radius: 4px;
}

/* enemy weaknesses/resistances/toughness */
.ele {
  height: 20px;
  user-select: none;
}
/* enemy weakness */
.wk {
  margin-top: 7.5px;
  height: 20px;
  gap: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* enemy 40%+ resistances */
.res-40plus {
  margin-top: 15px;
  gap: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.e-res-title {
  font-weight: bold;
}
.e-res-ele {
  gap: 10px;
  display: flex;
}
.e-res {
  gap: 5px;
  display: flex;
  flex-direction: column;
}
.e-res-mult {
  font-size: 12px;
  font-weight: bold;
}
/* enemy toughness */
.e-tough {
  font-size: 14px;
  font-weight: bold;
  user-select: all;
}

/* enemy stats */
.hp {
  margin-top: 5px;
  gap: 5px;
  display: flex;
  align-items: center;
}
.e-hp {
  color: #ff5555;
  font-size: 12px;
  font-weight: bold;
  user-select: all;
}
.e-hp-mult {
  color: #888888;
  font-size: 10px;
}
.e-phase {
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
}
.e-spd {
  margin-top: 2.5px;
  color: #5555ff;
  font-size: 12px;
  font-weight: bold;
  user-select: all;
}
.e-adv {
  margin-top: 15px;
  font-weight: bold;
}

/* ---------------------------------------------------------------------- GO TO TOP ----------------------------------------------------------------------- */

#top-btn {
  bottom: 10px;
  left: 10px;
  position: absolute;
  width: 27.5px;
  height: 27.5px;
  cursor: pointer;
  user-select: none;
  background-size: 27.5px;
  background-repeat: no-repeat;
  background-position: center;
}
#top-btn {
  background-image: url(../../assets/misc/top.webp);
}
#top-btn:hover {
  background-image: url(../../assets/misc/top-hover.webp);
}

/* ----------------------------------------------------------------------- MENU BAR ----------------------------------------------------------------------- */

/* menu bar toggle buttons */
#mb-btn, #mb-btn-open {
  top: 7.5px;
  left: 10px;
  position: absolute;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
}
#mb-btn:hover, #mb-btn-open:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}

/* menu bar outside overlay */
#mb-o {
  z-index: 1000;
  top: 0px;
  left: 0px;
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  opacity: 0.5;
  display: none;
}

/* menu bar */
#mb {
  z-index: 1001;
  top: 0px;
  left: 0px;
  position: fixed;
  width: 250px;
  height: 100vh;
  background-color: #222222;
  border-right: 2.5px solid #444444;
  user-select: none;
  display: none;
  flex-direction: column;
}
#mb-bar {
  height: 50px;
  border-bottom: 2.5px solid #444444;
}
#mb-c {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* menu bar home/about buttons */
#mb-bar-misc {
  right: 0px;
  position: absolute;
  height: 50px;
  display: flex;
}
#mb-bar a {
  width: 20px;
  height: 20px;
  padding: 15px;
  color: #ffffff;
  text-decoration: none;
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}
#mb-bar a:hover {
  color: #b2cee7;
}
#mb-home-btn {
  background-image: url(../../assets/misc/home.webp);
}
#mb-home-btn:hover {
  background-image: url(../../assets/misc/home-hover.webp);
}
#mb-about-btn {
  font-size: 20px;
}

/* menu bar section splitter */
#mb-sec {
  margin: 5px;
  margin-top: 25px;
  width: calc(100% - 10px);
  color: #f29e38;
  font-size: 14px;
  font-weight: bold;
  text-decoration: underline;
}

/* menu bar navigation buttons to other pages */
#mb-c a {
  padding: 10px;
  width: calc(100% - 20px);
  color: #ffffff;
  text-decoration: none;
}
#mb-c a:hover {
  color: #b2cee7;
}

/* menu bar number format changer */
#mb-nf {
  margin-top: auto;
  padding: 15px;
  gap: 10px;
  width: calc(100% - 30px);
  font-size: 16px;
  display: flex;
  flex-direction: column;
}
#mb-nfb {
  gap: 10px;
  display: flex;
}
/* number format buttons */
.nfb {
  padding: 5px;
  border: 1px solid #b2cee7;
  border-radius: 4px;
  background-color: #222222;
  color: #ffffff;
  font-family: "Inconsolata", monospace;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  flex: 1;
}
.nfb:hover {
  border-color: #ffffff;
  background-color: #ffffff;
  color: #000000;
  transition: all 0.1s ease-in-out;
}
.nfb.selected {
  background-color: #b2cee7;
  color: #000000;
  font-weight: bold;
  text-decoration: underline;
  transition: all 0.1s ease-in-out;
}
/* example number */
#mb-ex-num {
  color: #ff5555;
  font-weight: bold;
}

/* menu bar toggles */
#mb-t {
  margin-bottom: 15px;
  width: 100%;
  gap: 10px;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}
/* menu bar setting */
#mb-stg {
  margin: 0px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* leaks/spoilers toggle */
#mb-lt, #mb-st {
  width: 45px;
  height: 22.5px;
  position: relative;
}
#lt, #st {
  inset: 0px;
  position: absolute;
  border-radius: 25px;
  background-color: #444444;
  cursor: pointer;
}
#lt:before, #st:before {
  left: 2.5px;
  bottom: 2.5px;
  position: absolute;
  width: 17.5px;
  height: 17.5px;
  border-radius: 12.5px;
  background-color: #ffffff;
  content: "";
  transition: all 0.1s ease-in-out;
}
input:checked + #lt:before, input:checked + #st:before {
  transform: translateX(22.5px);
}
input:checked + #lt, input:checked + #st {
  background-color: #b2cee7;
}

/* ------------------------------------------------------------------ VERSION SELECTOR ------------------------------------------------------------------ */

/* version-selector outside overlay */
#vs-o {
  z-index: 2000;
  top: 0px;
  left: 0px;
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  opacity: 0.5;
  display: none;
}

/* version selector menu */
#vs {
  z-index: 2001;
  inset: 5vh 2.5vw 5vh calc(47.5px + 2.5vw);
  position: fixed;
  border-radius: 4px;
  background-color: #222222;
  user-select: none;
  display: none;
  flex-direction: column;
}

/* version selector toggle button */
#vs-x-bar {
  padding: 10px 10px;
  border-bottom: 2.5px solid #444444;
  display: flex;
}
#vs-x {
  font-size: 28px;
  cursor: pointer;
}
#vs-x:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}

/* version selector grid */
#vg {
  padding: 15px;
  gap: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
/* grid option */
.vg-c {
  gap: 5px;
  padding: 15px;
  width: 260px;
  border: 2px solid #888888;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vg-c-name {
  font-weight: bold;
}
.vg-c-time {
  font-size: 12px;
  font-style: italic;
}
.vg-c-id {
  color: #888888;
  font-size: 12px;
  font-style: italic;
}
.vg-c:hover {
  border: 2px solid #b2cee7;
  background-color: #b2cee7;
  color: #222222;
}

/* ----------------------------------------------------------------------- CHART ----------------------------------------------------------------------- */

/* chart menu */
#c {
  z-index: 3000;
  top: 0px;
  left: 0px;
  position: fixed;
  width: 100vw;
  height: 100vh;
  background-color: #222222;
  user-select: none;
  display: none;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: auto;
}

/* chart toggle buttons */
#c-btn {
  top: 55px;
  left: 8.5px;
  position: absolute;
  width: 28px;
  height: 28px;
  cursor: pointer;
  user-select: none;
  background-size: 28px;
  background-repeat: no-repeat;
  background-position: center;
}
#c-btn-open {
  width: 28px;
  height: 28px;
  cursor: pointer;
  user-select: none;
  background-size: 28px;
  background-repeat: no-repeat;
  background-position: center;
}
#c-btn, #c-btn-open {
  background-image: url(../../assets/misc/chart.webp);
}
#c-btn:hover, #c-btn-open:hover {
  background-image: url(../../assets/misc/chart-hover.webp);
}
#c-bar {
  padding: 10px;
  border-bottom: 2.5px solid #444444;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#c-x {
  font-size: 28px;
  cursor: pointer;
}
#c-x:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}

/* chart node switcher */
#c-l, #c-r {
  margin-top: -7.5px;
  font-size: 28px;
  cursor: pointer;
}
#c-l:hover, #c-r:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}
/* chart point switcher */
.c-k {
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}
.c-k:hover {
  color: #b2cee7;
  transition: all 0.1s ease-in-out;
}
.c-k.selected {
  color: #b2cee7;
  text-decoration: underline;
  transition: all 0.1s ease-in-out;
}

/* chart download button */
#c-download-btn {
  width: 28px;
  height: 28px;
  cursor: pointer;
  background-size: 28px;
  background-repeat: no-repeat;
  background-position: center;
}
#c-download-btn {
  background-image: url(../../assets/misc/download.webp);
}
#c-download-btn:hover {
  background-image: url(../../assets/misc/download-hover.webp);
}

/* chart gamemode/revamp dropdown */
#c-dd {
  top: 15px;
  left: 15px;
  position: absolute;
  font-family: "Inconsolata", monospace;
  font-size: 14px;
  cursor: pointer;
}

/* chart */
#c-g {
  width: 100vw;
  height: 90vh;
  position: relative;
}

/* ----------------------------------------------------------------------- TOOLTIPS ----------------------------------------------------------------------- */

/* menu bar/enemy tooltips */
.tt-menu, .tt-v-hp {
  margin-left: 7.5px;
  position: relative;
  font-family: "Arial";
  font-size: 14px;
  display: inline-block;
  user-select: none;
}
.tt-e-hp {
  bottom: 92.5%;
  right: 77.5%;
  position: absolute;
  font-family: "Arial";
  font-size: 24px;
  user-select: none;
}
.tt-e-stat {
  width: 25px;
  margin-top: 2.5px;
  color: #888888;
  font-size: 16px;
  user-select: none;
}
.tt-menu:hover, .tt-v-hp:hover, .tt-e-stat:hover {
  color: #b2cee7;
}

/* tooltip text */
.tt-text {
  z-index: 9999;
  padding: 5px;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
  border-radius: 4px;
  background-color: #444444;
  color: #ffffff;
  font-family: "Inconsolata", monospace;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  user-select: text;
}
.tt-menu .tt-text {
  bottom: 25px;
  width: 120px;
}
.tt-v-hp .tt-text {
  bottom: 27.5px;
  width: 225px;
}
.tt-e-hp .tt-text {
  bottom: 37.5px;
  white-space: nowrap;
}
.tt-e-stat .tt-text {
  top: 190px;
  white-space: nowrap;
}
.tt-menu:hover .tt-text, .tt-v-hp:hover .tt-text, .tt-e-hp:hover .tt-text, .tt-e-stat:hover .tt-text {
  opacity: 1;
  visibility: visible;
}

/* tooltip arrow */
.tt-menu .tt-text::after, .tt-v-hp .tt-text::after, .tt-e-hp .tt-text::after, .tt-e-stat .tt-text::after {
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
  border: 5px solid;
  content: "";
}
.tt-menu .tt-text::after, .tt-v-hp .tt-text::after, .tt-e-hp .tt-text::after {
  top: 100%;
  border-color: #444444 transparent transparent transparent;
}
.tt-e-stat .tt-text::after {
  bottom: 100%;
  border-color: transparent transparent #444444 transparent;
}

/* ---------------------------------------------------------------------- VERY MISC ---------------------------------------------------------------------- */

@font-face {
  font-family: "Inconsolata";
  src: url(../../assets/Inconsolata-Regular.woff2) format("woff2");
}
@media (max-width: 1080px) {
  #b1, #b2, #b-conc, #b-surg, .b-option { min-height: 0px; }
  #b-surg { margin-bottom: 15px; }
  #s { gap: 75px; flex-direction: column; }
  #s1, #s2, #s3 { margin-bottom: 15px; min-height: 0px; }
  .vg-c { width: 250px; }
}
@media (max-width: 480px) {
  #sidebar { width: 100vw; height: 50px; border-right: 0px; border-bottom: 2.5px solid #444444; }
  #c-btn { top: 10px; left: 60px; }
  #top-btn { left: auto; right: 10px; }
  #page { margin-left: 0px; margin-top: 52.5px; }
  #b-surg { margin-bottom: 0px; }
  #v-hp { margin-top: 15px; }
  #v-text { width: 215px; }
  #vs { inset: calc(5vh + 52.5px) 5vw 5vh 5vw; }
  .vg-c { width: 100%; }
  .b-title { margin-bottom: 0px; }
  #c-g { width: 250vw; height: 1000vh; }
  #c-bar { width: 250vw; }
  .tt-v-hp .tt-text { width: 120px; }
}
@media (max-width: 360px) {
  .tt-v-hp .tt-text { width: 75px; }
}