/* Fuentes */
@font-face {
  font-family: "TrebuchetCustom";
  src: url("../assets/fonts/trebuc.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "TrebuchetCustomItalic";
  src: url("../assets/fonts/Trebuchet-MS-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Verdana";
  src: url("../assets/fonts/Verdana.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Verdana-Bold";
  src: url("../assets/fonts/Verdana-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: bold;
}

@font-face {
  font-family: "Verdana-BoldItalic";
  src: url("../assets/fonts/Verdana-BoldItalic.ttf") format("truetype");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "Verdana-Italic";
  src: url("../assets/fonts/Verdana-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "ProggyClean";
  src: url("../assets/fonts/ProggyClean.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "ProggyClean";
  src: url("../assets/fonts/ProggyClean.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
}

/***********/

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;

  font-family: "TrebuchetCustom", monospace;
  background-image: url("../assets/images/background.jpeg");
  /* background: blue; */
  background-repeat: no-repeat;
  background-size: cover;
  color: #f0f0f0;

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.phase {
  display: block;
}

.phase.hidden {
  display: none;
}

#phase-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* background: #c03c3c; */
  justify-content: flex-end;
  padding: 0 9% 1% 9%;
  box-sizing: border-box;
}

.main-menu {
  /* background: #831f83; */
  width: 100%;
  height: 58%;
  margin: 0 0 4% 0;
  box-sizing: border-box;
}

#pause-menu .main-menu {
  height: 40%;
}

.menu-table {
  /* background: violet; */
}

header {
  width: 100%;
  padding: 0 0 0 0;
  margin: 0 0 0rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-table td {
  padding: 8px;
}

.menu-table td:first-child {
  width: 30vh;
}

.option {
  font-size: larger;
  font-weight: 700;
  color: #efaf00;
  text-shadow: 0 1px 1px #0000007c;
  cursor: pointer;
  transition: color 0s, text-shadow 0s;
}

.option:hover {
  /* color: #fff443; */
  color: #feff1c;
  text-shadow: 0px 0px 7px #fff443;
  transition: none;
}

.option:not(:hover) {
  transition: color 0.2s ease-in, text-shadow 0.8s ease-out;
}

.desc {
  font-size: larger;
  color: #686868;
  text-shadow: 0 1px 1px #0000007c;
}

label {
  margin-bottom: 0rem;
  font-weight: bold;
}

button#runBtn {
  grid-column: span 2;
  margin-top: 1rem;
  padding: 0.7rem;
  background-color: #ff6f00;
  color: #0b0b0b;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

button#runBtn:hover {
  background-color: #ffa000;
}

.editor-container {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 1rem;
  max-width: 1200px;
  box-sizing: border-box;
}

.editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  box-sizing: border-box;
  background: #4c5844;
}

.editor label {
  all: unset;
  padding: 0.4rem 0.4rem;
  background: #4c5844;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "ProggyClean", monospace !important;
  font-size: large;
}

.lang-logo {
  width: 15px;
  height: 15px;
}

.editor,
.output-editor {
  /* min-width: 0; */
  /* Arregla la expansión infinita del editor */
}

/* .output-editor iframe { */
/* .editor iframe { */
.command-console-container iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid #889180;
  border-right: 1px solid #889180;
  border-left: 1px solid #282e22;
  border-top: 1px solid #282e22;
  background-color: #000;
}

.command-console-container {
  flex: 1;
  width: 100%;
  /* height: 100%; */
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.monaco-editor {
  /* Esto quedó a la perfección, bello */
  /* height: 95%; */
  flex: 1;
  width: 100%;
  height: 100%;
  /* min-width: 0%; */
  min-height: 0;
  box-sizing: border-box;
  background: transparent;
  border-bottom: 1px solid #889180;
  border-right: 1px solid #889180;
  border-left: 1px solid #282e22;
  border-top: 1px solid #282e22;
  z-index: 0;
  /* margin: 0.5rem 0.5rem 0.5rem 0.5rem; Espacio entre el borde y el editor */
}

.scroll-btn {
  box-sizing: border-box;
  position: absolute;
  right: 0px;
  width: 15px;
  height: 15px;

  font-size: 9px;
  color: #b0aeae;
  line-height: 1;

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

  padding: 0;
  margin: 0;
}

button {
  font-family: "ProggyClean", monospace !important;
  font-size: large;
  padding: 6px 6px;
  color: #ffffff;
  background: #4c5844;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;

  /* Por si se le añaden iconos */
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

button:active {
  border-bottom: 1px solid #889180;
  border-right: 1px solid #889180;
  border-left: 1px solid #282e22;
  border-top: 1px solid #282e22;
}

.vital-menu-button {
  padding-inline-end: 20px;
}

.scroll-btn.scroll-up {
  top: 0px;
}

.scroll-btn.scroll-down {
  bottom: 0px;
}

@keyframes instantBlur {
  0% {
    filter: blur(calc(var(--extra-blur, 0px) + 4px)) brightness(2);
  }

  5% {
    filter: blur(var(--extra-blur, 0px));
  }

  100% {
    filter: blur(var(--extra-blur, 0px));
  }
}

@keyframes moveLogoBG {
  0% {
    transform: translateX(0);
  }

  5% {
    transform: translateX(30px);
  }

  10% {
    transform: translateX(-20px);
  }

  15% {
    transform: translateX(80px);
  }

  20% {
    transform: translateX(-60px);
  }

  25% {
    transform: translateX(40px);
  }

  30% {
    transform: translateX(-10px);
  }

  35% {
    transform: translateX(120px);
  }

  40% {
    transform: translateX(-90px);
  }

  45% {
    transform: translateX(60px);
  }

  50% {
    transform: translateX(-30px);
  }

  55% {
    transform: translateX(100px);
  }

  60% {
    transform: translateX(-50px);
  }

  65% {
    transform: translateX(20px);
  }

  70% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(50px);
  }

  80% {
    transform: translateX(-40px);
  }

  85% {
    transform: translateX(10px);
  }

  90% {
    transform: translateX(-15px);
  }

  95% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes moveLogoFG {
  0% {
    transform: translateX(0);
  }

  5% {
    transform: translateX(60px);
  }

  10% {
    transform: translateX(-40px);
  }

  15% {
    transform: translateX(160px);
  }

  20% {
    transform: translateX(-120px);
  }

  25% {
    transform: translateX(80px);
  }

  30% {
    transform: translateX(-20px);
  }

  35% {
    transform: translateX(240px);
  }

  40% {
    transform: translateX(-180px);
  }

  45% {
    transform: translateX(120px);
  }

  50% {
    transform: translateX(-60px);
  }

  55% {
    transform: translateX(200px);
  }

  60% {
    transform: translateX(-100px);
  }

  65% {
    transform: translateX(40px);
  }

  70% {
    transform: translateX(-10px);
  }

  75% {
    transform: translateX(100px);
  }

  80% {
    transform: translateX(-80px);
  }

  85% {
    transform: translateX(20px);
  }

  90% {
    transform: translateX(-30px);
  }

  95% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(0);
  }
}

.hl-logo {
  position: relative;
  display: inline-block;
}

.bg-logo {
  z-index: 2;
  width: 80%;
  animation: instantBlur 2s steps(1, end) infinite,
    moveLogoBG 30s linear infinite;
}

.fg-logo {
  position: absolute;
  z-index: 3;
  width: 150%;
  top: -30px;
  --extra-blur: 13px;
  filter: blur(var(--extra-blur));
  opacity: 90%;
  animation: instantBlur 2s steps(1, end) infinite,
    moveLogoFG 30s linear infinite;
}

.floating-menu {
  position: absolute;
  /* width: 300px; */
  color: white;
  /* z-index: 9999; */

  display: flex;
  flex-direction: column;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  background: #4c5844;
  box-sizing: border-box;

  font-family: "ProggyClean", monospace !important;
  font-size: larger;
}

.floating-menu.minimized {
  min-height: 35px !important;
  height: 35px !important;
  overflow: hidden;
}

.floating-menu.hidden {
  display: none;
}

.menu-header {
  all: unset;
  padding: 0.5rem 0.5rem;
  background: #4c5844;
  display: flex;
  align-items: center;
  gap: 0.3rem;

  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-header span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.header-btn,
.close-menu {
  padding: 0px 0px;

  width: 18px;
  height: 18px;
  color: #b0aeae;

  font-size: 15px;

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

.header-buttons {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.menu-content {
  height: 100%;
  padding: 5% 13%;
  display: flex;
  flex-direction: column;
}

.menu-content:has(.command-console-container) {
  /* height: 100%;
  width: 100%; */
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0px 5px 5px 5px;
  box-sizing: border-box;
  overflow: hidden;
}

.contentBtn {
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading-bar .menu-content {
  padding: 2% 5% 5% 5%;
}

#loading-bar.floating-menu {
  /* width: 380px; */
}

.bar-block {
  flex: 0 0 12px;
  height: 100%;
  background: transparent;
  /* transition: background 0.3s; */
}

.bar-block.active {
  background: #c5b550;
}

.resizer {
  position: absolute;
  background: transparent;
  z-index: 10000;
}

/* Lados */
.resizer.top,
.resizer.bottom {
  height: 5px;
  left: 0;
  right: 0;
}

.resizer.top {
  top: -2px;
  cursor: ns-resize;
}
.resizer.bottom {
  bottom: -2px;
  cursor: ns-resize;
}

.resizer.left,
.resizer.right {
  width: 5px;
  top: 0;
  bottom: 0;
}

.resizer.left {
  left: -2px;
  cursor: ew-resize;
}
.resizer.right {
  right: -2px;
  cursor: ew-resize;
}

/* Esquinas */
.resizer.top-left,
.resizer.top-right,
.resizer.bottom-left,
.resizer.bottom-right {
  width: 10px;
  height: 10px;
}

.resizer.top-left {
  top: -2px;
  left: -2px;
  cursor: nwse-resize;
}
.resizer.top-right {
  top: -2px;
  right: -2px;
  cursor: nesw-resize;
}
.resizer.bottom-left {
  bottom: -2px;
  left: -2px;
  cursor: nesw-resize;
}
.resizer.bottom-right {
  bottom: -2px;
  right: -2px;
  cursor: nwse-resize;
}

#pause-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  flex: 1;
  display: flex;
  flex-direction: column;
  /* background: #c03c3c; */
  justify-content: flex-end;
  padding: 0 9% 1% 9%;
  box-sizing: border-box;
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
}

#pause-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.pause-content {
  background: rgba(25, 25, 25, 0.9);
  border: 2px solid #ff6600;
  padding: 2rem 3rem;
  text-align: center;
  border-radius: 12px;
  color: #f2f2f2;
  font-family: monospace;
  box-shadow: 0 0 40px rgba(255, 120, 0, 0.5);
}

.pause-content h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
  letter-spacing: 2px;
}

.pause-content button {
  background: #ff6600;
  border: none;
  color: black;
  padding: 0.8rem 1.5rem;
  margin: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.pause-content button:hover {
  background: #ffaa33;
}

.hidden {
  display: none;
}

.tab-container {
  display: flex;
  gap: 1px;
  position: relative;
  z-index: 2;
  align-items: flex-end; /*clave*/
}

.tab {
  font-family: "ProggyClean", monospace !important;
  font-size: large;
  padding: 6px 10px;
  color: #ffffff;
  background: #4c5844;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  cursor: pointer;
  /* transition: all 0.15s ease; */
  position: relative;
  z-index: 2;
}

/* .tab:not(.active):hover {
  background: #55614c;
} */

#menu-options .menu-content {
  padding: 0% 1% 1% 1%;
}

.tab.active {
  color: #c5b550;
  height: calc(100% + 4px);
  margin-bottom: -2px;
  border-bottom-color: transparent;
  z-index: 3;
}

.options-content {
  /* flex: 1; */
  height: 100%;
  /* padding: 1rem; */
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  box-sizing: border-box;
  background: #4c5844;
}

.general-options,
.audio-options,
.editor-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 3rem;
}

.option-row {
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  gap: 1rem;
}

.option-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-column label {
  font-weight: normal;
  text-align: start;
  color: #ffffff;
  font-family: "ProggyClean", monospace !important;
  white-space: nowrap;
}

.option-row label {
  font-weight: normal;
  flex: 0 0 110px;
  text-align: right;
  color: #ffffff;
  font-family: "ProggyClean", monospace !important;
  white-space: nowrap;
}

.option-row input[type="number"],
.option-row select {
  flex: 1;
  max-width: 150px;
  background: #3e4637;
  border-bottom: 1px solid #889180;
  border-right: 1px solid #889180;
  border-left: 1px solid #282e22;
  border-top: 1px solid #282e22;

  color: #ffffff;
  font-family: "ProggyClean", monospace !important;
  padding: 5px 4px;
  box-sizing: border-box;
}

.option-row select option {
  background: #4c5944;
}

.option-row select option:hover {
  background: #958930;
}

.range-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.slider {
  appearance: none;
  width: 100%;
  height: 4px;
  background: #1f1f1e;
  border-top: 1px solid #282e22;
  border-left: 1px solid #282e22;
  border-right: 1px solid #889180;
  border-bottom: 1px solid #889180;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 15px;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  background: #4c5844;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  appearance: none;
  width: 8px;
  height: 15px;
  border-top: 1px solid #889180;
  border-left: 1px solid #889180;
  border-right: 1px solid #282e22;
  border-bottom: 1px solid #282e22;
  background: #4c5844;
  cursor: pointer;
}

.ticks {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  width: 100%;
  margin-top: 2px;
  height: 6px;
  pointer-events: none;
}

.tick {
  width: 1px;
  height: 6px;
  background-color: #a9b29b;
  justify-self: center;
}

#weapon-container {
  position: fixed;
  height: 15rem;
  width: 20rem;
  top: 2%;
  left: 1%;
  transform-origin: top left;
  /* background: #958930; */
}

#weapon-selector {
  display: flex;
  gap: 0.25rem;
  /* background: #c5b550; */
}

.selector {
  background: #b86d0a8a;
  width: 1.5rem;
  height: 1.5rem; 
  padding: 0 2px 0px;
  display: flex;
  align-items: end;
  justify-content: end;
  color: #ffbb00;
  font-family: "ProggyClean", monospace !important;
  font-weight: bold;
  font-size: smaller;
  transition: 0.2s;
  box-sizing: border-box;
}
