/* ========================= LAYOUT ========================= */

body {
  margin: 0;
  background: url("images/fundo.webp") repeat;
  background-size: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.page {
  position: relative;
  width: 65vw;
  margin: auto;
  container-type: inline-size;
}

.main {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ========================= LEFT PANEL / CHART ========================= */

.left-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
  image-rendering: pixelated;
  width: 100%;
}

.chart-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.chart {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================= SLOTS ========================= */

#slots-container {
  position: absolute;
  inset: 0;
}

.slot {
  position: absolute;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slot img {
  width: 80%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  image-rendering: pixelated;
  transform: translateY(4%);
}

.cursor {
  position: absolute;
  pointer-events: none;
}

/* ========================= SOUND / LANG BUTTONS ========================= */

.sound-btn,
.lang-btn {
  position: absolute;
  top: 94%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999999;
  pointer-events: auto;
  outline: none;
  padding: 0;
}

.sound-btn {
  left: 100%;
}

.lang-btn {
  right: 100%;
}

.sound-btn img {
  width: 3.077cqw;
  image-rendering: pixelated;
}

.lang-btn img {
  width: 4cqw;
  image-rendering: pixelated;
}

/* ========================= TOP MENU ========================= */

.top-menu {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(3%, -91.4%);
  display: flex;
  z-index: 100;
  width: 100%;
}

.menu-btn {
  width: 18.46%;
  position: relative;
}

.menu-btn img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.menu-btn span {
  position: absolute;
  inset: 1% 12%;
  display: flex;
  align-items: center;
  justify-content: left;
  font-family: digimon, sans-serif;
  white-space: nowrap;
  text-shadow: 0.2cqw 0.2cqw 0 #000;
}

.menu-btn.active span {
  color: #D5D5D5;
}

.menu-btn:not(.active) span {
  color: #298DD5;
}

/* ========================= DETO CONTENT ========================= */

.texto {
  width: 80cqw;
  margin: 2.4cqw auto;
  text-align: left;
  font-size: 2cqw;
  font-family: 'Inter', sans-serif;
  color: #e6e6e6;
  text-shadow: 0.1cqw 0.1cqw 0 #000;
}

.titletxt {
  width: 80cqw;
  margin: 2cqw auto;
  text-align: center;
  word-wrap: break-word;
  font-size: 2cqw;
  font-family: 'Inter', sans-serif;
  color: #FFFF00;
  text-shadow: 0.1cqw 0.1cqw 0 #000;
}

.deto-content {
  position: absolute;
  inset: 3%;
  display: none;
  pointer-events: none;
}

.deto-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 3cqw;
  box-sizing: border-box;
  pointer-events: auto;
}

.deto-content a {
  color: #52DEF7;
  text-decoration: none;
}

.deto-content a:hover {
  text-decoration: underline;
}

/* ========================= SCROLLBAR ========================= */

.deto-scroll::-webkit-scrollbar {
  width: 3cqw;
}

.deto-scroll::-webkit-scrollbar-track {
  background: #314a5a;
  box-shadow: inset 0.3cqw 0.3cqw 0 #080808, inset -0.3cqw -0.3cqw 0 #6987a0;
}

.deto-scroll::-webkit-scrollbar-thumb {
  background: #5a7383;
  border: 0.4cqw solid transparent;
  background-clip: content-box;
  box-shadow: inset -0.3cqw -0.3cqw 0 #080808, inset 0.3cqw 0.3cqw 0 #6987a0;
}

/* ========================= SELECTABLE TEXT ========================= */

.deto-content,
.deto-content * {
  user-select: text;
  -webkit-user-select: text;
}

/* ========================= EXPAND RECT / CLOSE BUTTON ========================= */

#expand-rect {
  position: absolute;
  border: 4px solid #8a8a8a;
  background: transparent;
  width: 0;
  height: 0;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
  transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .2s;
  z-index: 10;
}

#close-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

#close-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  image-rendering: pixelated;
}

/* ========================= EVO UI ========================= */

#evo-ui {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}

.evo-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12%;
  width: 100%;
  height: 100%;
  margin-bottom: 8%;
  pointer-events: none;
}

.evo-box {
  position: relative;
  width: 27%;
  height: 75%;
  pointer-events: none;
}

.center-box {
  width: 12%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ui-panel {
  background: #3d5564;
  box-shadow: inset 0.3cqw 0.3cqw 0 #080808, inset -0.3cqw -0.3cqw 0 #6987a0;
  pointer-events: none;
}

.center-slot {
  width: 60%;
  height: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: pixelated;
  background: url("images/slot.webp") center / cover no-repeat;
  z-index: 30;
}

#center-digimon {
  width: 80%;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
}

#evo-slots-left,
#evo-slots-right {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

#evo-slots-left {
  align-items: flex-start;
}

#evo-slots-right {
  align-items: flex-end;
}

.evo-slot {
  pointer-events: none;
  width: 25%;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.evo-slot-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: pixelated;
  background: url("images/slot.webp") center / cover no-repeat;
}

/* ========================= NAME BAR ========================= */

#name-bar {
  position: absolute;
  height: 2cqw;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 25;
  pointer-events: none;
  padding: 0.3cqw 1.2cqw;
  box-sizing: border-box;
  background: #3d5564;
box-shadow: inset 0.3cqw 0.3cqw 0 #080808, inset -0.3cqw -0.3cqw 0 #6987a0;
}

#name-bar-text {
  position: absolute;
  font-family: digimon, sans-serif;
  font-size: 4.5cqw;
  bottom: 0.9cqw;
  color: #FFFA75;
  text-shadow: 0.25cqw 0.25cqw 0 #000;
  white-space: nowrap;
  line-height: 1;
}

/* ========================= STATUS BAR ========================= */

#status-bar {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  gap: 1.2vh;
  z-index: 25;
  pointer-events: none;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 1.538cqw;
}

.stat-left {
  display: flex;
  align-items: center;
  gap: 0.462cqw;
  width: 9.23cqw;
  justify-content: flex-start;
}

.stat-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.stat-num {
  position: absolute;
  right: 3.846cqw;
  z-index: 1;
  font-family: digimon, sans-serif;
  color: #d5d5d5;
  margin-bottom: 4cqw;
  font-size: 3.846cqw;
  line-height: 1;
  pointer-events: none;
}

.stat-num-lg {
  margin-bottom: 4cqw;
  right: 14.615cqw;
}

.stat-bar-outer {
  position: relative;
  padding: 0.6cqw;
  box-sizing: border-box;
  width: 21.538cqw;
}

.stat-bar-outer.stat-bar-sm {
  width: 10.769cqw;
}

.stat-bar {
  width: 100%;
  height: 0.9cqw;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 3.538cqw;
  height: auto;
  image-rendering: pixelated;
}

.stat-label {
  font-family: digimon, sans-serif;
  color: #fff974;
  font-size: 3.846cqw;
  text-shadow: 0.3cqw 0.3cqw 0 #000;
}

.stat-label-alt {
  font-family: DwFont2, sans-serif;
  font-size: 1.846cqw;
  color: #ffe673;
}

.stat-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #00c8c8;
  width: 0%;
}

/* ========================= INFO BAR ========================= */

#info-bar {
  position: absolute;
  display: none;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  column-gap: 0.923cqw;
  row-gap: 1.538cqw;
  z-index: 25;
  pointer-events: none;
  transform-origin: top left;
}

.info-label {
  font-family: DwFont2, sans-serif;
  font-size: 2.308cqw;
  font-weight: bold;
  color: #4A3AE6;
  -webkit-text-stroke: 0.3em #52DEF7;
  paint-order: stroke fill;
}

.info-val-box {
  padding: 0.3cqw 0.6cqw;
  width: 4.95cqw;
  height: 3cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.info-val {
  font-family: digimon, sans-serif;
  font-size: 4.615cqw;
  padding-bottom: 0.4cqw;
  color: #D5D5D5;
  line-height: 1;
  white-space: nowrap;
  position: absolute;
}

#info-bar.lang-en [data-i18n="info-lutas"],
#info-bar.lang-en [data-i18n="info-peso"],
#info-bar.lang-en [data-i18n="info-desc"] {
  font-size: 1.723cqw;
}

/* ========================= EVO INFO TEXT ========================= */

#evo-info-text {
  position: absolute;
  inset: 0;
  padding: 6%;
  box-sizing: border-box;
  font-family: digimon, sans-serif;
  font-size: 1.8cqw;
  color: #d5d5d5;
  word-wrap: break-word;
  overflow: hidden;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: left;
  z-index: 30;
  pointer-events: none;
}

/* ========================= MOOD BAR ========================= */

#mood-bar {
  position: absolute;
  display: none;
  flex-direction: column;
  gap: 0.462cqw;
  z-index: 25;
  pointer-events: none;
  transform-origin: top left;
}

.mood-icon {
  width: 27.077cqw;
  height: auto;
  image-rendering: pixelated;
  display: none;
}

/* ========================= RESPONSIVE ========================= */

@media (max-width: 900px) and (orientation: landscape) {
  .page {
    width: 50vw;
  }

  .ui-panel {
    box-shadow: inset 0.3cqw 0.3cqw 0 #080808, inset -0.3cqw -0.3cqw 0 #6987a0;
  }

  .stat-bar {
    height: 0.4vh;
  }

  .stat-bar-outer {
    padding: 4px;
  }
}

/* ========================= FONTS ========================= */

@font-face {
  font-family: "Digimon";
  src: url("DwFont.otf");
  font-display: swap;
}

@font-face {
  font-family: "DwFont2";
  src: url("Dwfont2-Regular.otf");
  font-display: swap;
}