/* Base styles */
body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #C6F700;
  font-family: "Inconsolata", monospace;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

.terminal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(800px, calc(100vw - 40px));
  height: min(600px, calc(100vh - 40px));
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid #C6F700;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 0 20px rgba(198, 247, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.terminal {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.button-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: calc(100vw - 24px);
  z-index: 2001;
}

/* Top navigation buttons */
.top-button {
  background: #000;
  border: 1px solid #C6F700;
  border-radius: 4px;
  color: #C6F700;
  display: inline-block;
  padding: 8px 16px;
  font-family: "Inconsolata", monospace;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.top-button:hover,
.top-button:focus-visible {
  background: #C6F700;
  color: #000;
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(198, 247, 0, 0.35);
}

.top-button:active {
  transform: translateY(0);
}

/* Button Styles */
.icon-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.icon-button:hover img {
  transform: scale(1.1); /* Zoom effect on hover */
}

.terminal-content {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.output {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.output div {
  flex-shrink: 0;
  min-height: min-content;
}

.input-line {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 5px 10px;
  background: transparent;
  margin-top: -2px; /* Tighten the space between content and input */
}

.prompt {
  color: #C6F700;
  margin-right: 8px;
  font-size: 16px;
  font-family: "Inconsolata", monospace;
  user-select: none;
}

#input {
  flex: 1;
  background: transparent;
  border: none;
  color: #C6F700;
  font-size: 16px;
  font-family: "Inconsolata", monospace;
  padding: 0;
  margin: 0;
  outline: none;
  min-width: 0;
  caret-color: #C6F700; /* Use the native cursor */
  caret-shape: block;   /* Make it a block cursor like in terminals */
}

/* Remove the border animation since we're using native cursor */
#input {
  animation: none; /* Remove the previous animation */
}

/* Remove the previous blink-caret animation */
@keyframes blink-caret {
  from, to { border-right: none }
  50% { border-right: none }
}
/* Disable text selection highlighting or modify its color */
#input::selection {
  background: rgba(198, 247, 0, 0.3);
  color: #C6F700;
}

.output::-webkit-scrollbar {
  width: 10px;
  height: 100%;
}

.output::-webkit-scrollbar-track {
  background: #000000;
  border-right: 1px solid #C6F700;
}

.output::-webkit-scrollbar-thumb {
  background: #C6F700;
  border: 1px solid #C6F700;
}

.output::-webkit-scrollbar-corner {
  display: none;
}

.output::-webkit-scrollbar-button {
  height: 0;
  display: none;
}

::-webkit-scrollbar-thumb:hover {
  background: #00cc00;
}
/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #C6F700 #000000;
}

/* Media queries */
@media (max-width: 768px) {
  .terminal-container {
      width: calc(100vw - 40px);
      height: calc(100vh - 40px);
  }

  .top-button {
      padding: 7px 11px;
      font-size: 14px;
  }
}

/* Ensure hidden elements are truly hidden */
.hidden {
  display: none !important;
}

/* Terminal text effect */
.terminal-content div {
  text-shadow: 0 0 5px rgba(198, 247, 0, 0.5);
}
