* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #e8e8e6;
  --output-height: 150px;
}

body {
  background-color: var(--bg-primary);
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  font-family: "Poppins", sans-serif;
  width: 100%;
  max-height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  padding: 5px 10px;
  height: 4vh;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
  display: flex;
  gap: 1em;
}
.navbar > button {
  background-color: transparent;
  border: none;
  outline: none;
  font-size: small;
  font-weight: bolder;
  opacity: 0.6;
  cursor: pointer;
}
.navbar > button:hover {
  opacity: 1;
}

.main {
  display: flex;
  width: 100%;
  height: 92vh;
}

/* left  -------------------------------------------------------*/

.internal_memory {
  min-width: 280px;
  max-width: 280px;
  font-size: small;
}

.inner p {
  width: 50px;
  /* border: 2px solid red; */
}

#A,
#Int {
  margin-right: 25px;
  /* border: 2px solid red; */
}

.inner {
  display: flex;
  gap: 0.5em;
  margin: 0.5em;
}

fieldset {
  border: 1px solid rgba(0, 0, 0, 0.3);
}

legend {
  font-family: "Rubik", sans-serif;
}
.reg {
  width: 100%;
  text-align: center;
}

.flag {
  min-width: 80px;
  max-width: 80px;
  text-align: right;
}

.reg,
.flag {
  padding: 0.5em;
  display: flex;
  gap: 5px;
  flex-direction: column;
}

.reg div,
.flag div {
  font-family: "Rubik", sans-serif;
  display: flex;
  justify-content: space-between;
  padding: 2px;
}

.reg span {
  /* width: 3rem; */
  justify-content: space-around;
  display: flex;
}

/* Conversions  */
.outer {
  margin-top: 1rem;
}

.conv {
  font-size: small;
  font-size: 14px;
  margin: 5px;
  padding: 5px;
}

#conv1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
#conv2 {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.conv > * {
  text-align: center;
}

.conv input,
.conv button,
.conv select {
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 0.25em;
  width: 100%;
  font-size: 0.8em;
  padding: 10px 5px;
  outline: none;
  font-family: "Rubik", sans-serif;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.8);
}

/* mid  --------------------------------------------------------*/

.mid {
  flex-grow: 1;
  position: relative;
  min-height: 100%;
}

.editor-setting {
  user-select: none;
  position: absolute;
  right: 0;
  z-index: 99;
  margin: 5px;
  margin-right: 20px;
}

.material-symbols-outlined {
  color: #ccc;
  font-size: 20px;
  font-weight: 200;
  transition: all 0.2s ease-in;
  padding: 4px;
  font-variation-settings: "FILL" 0, "wght" 100, "GRAD" 100, "opsz" 16;
}

.material-symbols-outlined:hover {
  background-color: rgb(255, 255, 255, 0.2);
  border-radius: 100%;
  box-shadow: 0 0 12px rgb(255, 255, 255, 0.6);
}

.CodeMirror {
  height: calc(100% - var(--output-height));
}

.Output {
  height: calc(var(--output-height) - 10px);
  border: 1px solid rgba(0, 0, 0, 0.4);
  background-color: white;
  margin: 5px 0px;
  padding: 1em;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  overflow-y: scroll;
  font-size: 14px;
  letter-spacing: 0.5px;
  font-family: monospace;
}

/* right  ------------------------------------------------------*/
.external_memory {
  min-width: 340px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
}

.memory_controler {
  padding: 0.5em;
  background: rgba(0, 0, 0, 0.2);
}
.memory_controler button {
  border: none;
  outline: none;
  background: transparent;
  font-weight: bolder;
  color: grey;
  margin: 0 1em;
  cursor: pointer;
}
.memoryin,
.ioin {
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background-color: white;
  font-family: "Poppins", sans-serif;
  font-size: small;
  border: 1px solid rgba(0, 0, 0, 0.4);
  margin: 2px;
  padding: 8px;
}
.memoryin {
  height: 400px;
}

.addr {
  display: flex;
  width: 100%;
}

.addr p {
  /* border: 2px solid red; */
  width: 100px;
  text-align: center;
}

.cont {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  overflow: auto;
}
/* footer --------------------------------------------------------------------------------------------- */

.footer {
  height: 4vh;
  background: whitesmoke;
  text-align: center;
  font-size: 12px;
  padding-top: 5px;
  font-weight: bold;
}
.footer a {
  color: black;
}

/* ...................................................................................................  */
.hide {
  display: none;
}

button.focus {
  color: black;
}

#name{
  grid-column: 1 / span 2;
}

/* Model ----------------------------------------------------------------------------------------------- */
.model {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 999;
  backdrop-filter: blur(6px);
}

.model > div {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Poppins", sans-serif;
}
.model > div > h1 {
  margin: 2rem;
  color: white;
  text-shadow: 0 0 12px black;
}

.model iframe {
  background-color: rgba(255, 255, 255, 0.9);
  width: 80%;
  height: 80%;
  padding: 1em;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  border-radius: 0.5em;
}

.close_model {
  font-size: 2rem;
  color: white;
  position: absolute;
  top: 10px;
  right: 10px;
  transition: all 0.3s ease-in;
  cursor: pointer;
}

.close_model:hover {
  transform: rotate(360deg);
}
