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

html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
html,
body {
  height: 100%;
  margin: 0;
  background-color: #000;
  color: #0f0;
  font-family: 'VT323', monospace;
  padding: 5px;
  display: flex;
  flex-direction: column;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-left: 10px;
  padding-right: 10px;
}

#title {
  margin: 0;
  font-weight: normal;
  font-size: 1.25rem;
}

.controls {
  margin-bottom: 0;
  text-align: right;
}

.controls button {
  background-color: transparent;
  border: 2px solid #0f0;
  color: #0f0;
  font-family: 'VT323', monospace;
  padding: 0.25rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
}

.controls button:hover {
  background-color: #0f0;
  color: #000;
}

#toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f4f4f4;
  border-bottom: 1px solid #d0d0d0;
}

#editor {
  flex-grow: 1;
  padding: 1rem;
  outline: none;
  white-space: pre-wrap;
  font-family: 'VT323', monospace;
  overflow: auto;
  border: 2px solid #0f0;
  border-radius: 10px;
  background-color: #0d0d0d;
}

/* Let's make the caret green too */
#editor:focus {
  caret-color: #0f0;
}

/* zero-width marker that tracks insert position */
span.marker {
  display: inline;
} 

/* --- Config Popup --- */
.controls {
  position: relative;
}

.popup-container {
  position: absolute;
  top: calc(100% + 15px); /* Position below the buttons */
  right: 0;
  z-index: 100;
  width: 300px;
  background-color: #0d0d0d;
  border: 2px solid #0f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 16px;
}

.popup-content h2 {
  margin-top: 0;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
  margin-bottom: 15px;
  text-align: center;
}

.popup-body label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-align: left;
}

.popup-body input {
  width: calc(100%);
  padding: 8px 10px;
  margin-bottom: 10px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #3a3a3c;
  color: #f2f2f7;
}

.popup-footer {
  margin-top: 5px;
  text-align: right;
}

.popup-footer button {
  margin-left: 10px;
} 