body {
  background-color: #2e3440;
  color: #d8dee9;
  font-family: "Courier New", monospace;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  box-sizing: border-box;
}

#terminal {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 16px;
  padding: 10px;
  box-sizing: border-box;
  line-height: 1.3;
}

.prompt {
  color: #88c0d0;
  font-weight: bold;
}

.nano-status-bar {
  display: flex;
  justify-content: center;
  background-color: #3b4252;
  color: #a3be8c;
  padding: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  gap: 20px;
}


.input {
  color: #eceff4;
}

#editor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #2e3440;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  z-index: 100;
}

.nano-editor {
  display: flex;
  flex-direction: column;
}

.nano-header {
  background-color: #3b4252;
  color: #ffffff;
  text-align: center;
  padding: 3px 0;
  border-bottom: 1px solid #4c566a;
  font-weight: bold;
}

#editor-textarea {
  flex: 1;
  background-color: #3b4252;
  color: #eceff4;
  border: none;
  padding: 10px;
  font-family: "Courier New", monospace;
  font-size: 16px;
  resize: none;
  line-height: 1.3;
  margin: 0;
}

.nano-footer {
  background-color: #3b4252;
  color: #ffffff;
  border-top: 1px solid #4c566a;
  padding: 2px 0;
  font-size: 0.9rem;
}

.nano-shortcuts {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 2px 5px;
}

.nano-shortcuts span {
  color: #88c0d0;
  font-weight: bold;
}

.editor-controls {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  background-color: #3b4252;
}

button {
  background-color: #5e81ac;
  color: #eceff4;
  border: none;
  padding: 8px 16px;
  margin-left: 10px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  border-radius: 3px;
}

button:hover {
  background-color: #81a1c1;
}

.hidden {
  display: none !important;
}

/* Cursor animation for terminal */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: #d8dee9;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

/* Mobile Support Styles */
.virtual-keyboard-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(94, 129, 172, 0.8);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.virtual-keyboard {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #2e3440;
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  z-index: 200;
  border-top: 1px solid #4c566a;
  justify-content: center;
}

.virtual-key {
  margin: 4px;
  padding: 12px;
  font-size: 16px;
  background-color: #434c5e;
  border-radius: 5px;
  min-width: 40px;
  text-align: center;
}

.mobile-input {
  position: fixed;
  top: -100px;
  opacity: 0;
  height: 0;
}

/* Media queries for responsive design */
@media screen and (max-width: 768px) {
  #terminal {
    font-size: 14px;
    padding: 8px;
  }
  
  .nano-shortcuts {
    font-size: 12px;
  }
  
  .nano-shortcuts span {
    padding: 0 3px;
  }
}

@media screen and (max-width: 480px) {
  #terminal {
    font-size: 13px;
    padding: 6px;
  }
  
  .nano-shortcuts {
    font-size: 10px;
  }
  
  .nano-footer {
    padding: 1px 0;
  }
  
  button {
    padding: 6px 12px;
    font-size: 14px;
  }
  
  .cursor {
    width: 6px;
    height: 14px;
  }
}

/* Styles for the better nano editor UI */
.editor-controls {
  display: none; /* Hide default editor controls when in nano mode */
}

.nano-editor .editor-controls {
  display: flex;
  background-color: transparent;
  padding: 0;
}

/* When in nano mode, use the nano buttons instead */
.nano-editor #editor-save,
.nano-editor #editor-cancel {
  position: absolute;
  bottom: 10px;
  background-color: transparent;
  border: none;
  color: #eceff4;
  font-size: 1px;
  opacity: 0.01; /* Nearly invisible but still clickable */
}

.nano-editor #editor-save {
  right: 45px;
}

.nano-editor #editor-cancel {
  right: 10px;
}

.line-numbers {
  position: absolute;
  left: 0;
  top: 0;
  padding: 10px 5px;
  background-color: #3b4252;
  color: #4c566a;
  text-align: right;
  font-size: 16px;
  user-select: none;
}
.nano-titlebar {
  background-color: #434c5e;
  color: #d8dee9;
  padding: 5px 10px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  border-bottom: 1px solid #4c566a;
}

.nano-message {
  background-color: #3b4252;
  color: #ebcb8b;
  padding: 4px 10px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  height: 20px;
  display: flex;
  align-items: center;
  border-top: 1px solid #4c566a;
}

.nano-status-bar {
  display: flex;
  justify-content: center;
  background-color: #2e3440;
  color: #a3be8c;
  padding: 5px 10px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  border-top: 1px solid #4c566a;
  gap: 20px;
}