/* Enhanced Modern Terminal UI Styles */

:root {
  --bg-color: #0c0c0c;
  --text-color: #cccccc;
  --prompt-color: #3ed400;
  --link-color: #3ed400;
  --selection-color: #264f78;
  --font-size: 14px;
  --link-font-size: 13px;  /* New variable for link size */
  --line-height: 1.6;
  --input-bg-color: rgba(255, 255, 255, 0.05);
}

::selection {
  background: var(--selection-color);
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Fira Code', 'Cascadia Code', 'Inconsolata', monospace;
  font-size: var(--font-size);
  line-height: var(--line-height);
}

#container {
  padding: 1em;
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#container output {
  display: block;
  width: 100%;
  margin-bottom: 0.5em;
}

#container output h3 {
  margin: 0.5em 0;
  color: #569cd6;
}

#container output pre {
  margin: 0;
  white-space: pre-wrap;
}

.input-line {
  display: flex;
  align-items: center;
  margin-bottom: 0.5em;
  background-color: var(--input-bg-color);
  border-radius: 4px;
  padding: 0.25em 0.5em;
}

.prompt {
  color: var(--prompt-color);
  margin-right: 0.5em;
  user-select: none;
  font-weight: bold;
}

.cmdline {
  flex-grow: 1;
  background-color: transparent;
  border: none;
  color: inherit;
  font: inherit;
  outline: none;
  padding: 0;
}

.ls-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5em;
  margin-top: 1em;
}

/* Link styles */
a {
  color: var(--link-color);
  text-decoration: none;
  position: relative;
  font-size: var(--link-font-size);  /* Smaller font size for links */
}

a:hover {
  text-decoration: underline;
}

a::before {
  position: absolute;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

a:hover::before {
  opacity: 1;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Blinking cursor effect */
@keyframes blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.cmdline::after {
  content: '▋';
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* Optional: Command suggestions */
.suggestions {
  list-style-type: none;
  padding: 0;
  margin: 0.5em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.suggestions li {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 0.2em 0.5em;
  border-radius: 3px;
  cursor: pointer;
}

.suggestions li:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
