/* Terminal styling */
:root {
  --console-bg: #1a1a20; 
  --console-text: #00f5c4;
  --console-text-dim: #00c49d;
  --console-text-muted: #767686;
  --console-prompt-user: #84deff;
  --console-prompt-path: #ffcc66;
  --console-prompt-symbol: #00f5c4;
  --console-error: #ff3355;
  --console-success: #00db9d;
  --console-warning: #ffcc66;
  --console-link: #84deff;
  --ls-item-color: #add8e6;
  --scrollbar-thumb: #00c49d;
  --scrollbar-thumb-hover: #00f5c4;
  --input-busy-text: #ffa500;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Source Code Pro', monospace;
  background-color: var(--console-bg);
  color: var(--console-text);
}

#terminal-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

#terminal-output {
  height: 100%;
  overflow-y: auto;
  padding: 15px 20px;
  line-height: 1.5;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

#terminal-output::-webkit-scrollbar {
  width: 8px;
}

#terminal-output::-webkit-scrollbar-track {
  background: transparent;
}

#terminal-output::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 4px;
}

#terminal-output::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

.command-prompt {
  display: flex;
  color: var(--console-text);
  padding: 0;
  margin-bottom: 5px;
}

.prompt-user {
  color: var(--console-prompt-user);
  font-weight: 600;
}

.prompt-at {
  color: var(--console-text);
  margin: 0 2px;
}

.prompt-path {
  color: var(--console-prompt-path);
  font-weight: 600;
}

.prompt-symbol {
  color: var(--console-prompt-symbol);
  margin-right: 8px;
}

.command-input {
  color: var(--console-text);
  background: none;
  border: none;
  width: 100%;
  outline: none;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.9rem;
  caret-color: var(--console-text);
}

.command-input::placeholder {
  color: var(--console-text-muted);
  opacity: 0.5;
}

.input-container {
  display: flex;
  align-items: baseline;
  width: 100%;
}

#command-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.visible-input {
  background: none;
  border: none;
  color: var(--console-text);
  flex: 1;
  outline: none;
  font-family: 'Source Code Pro', monospace;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background-color: var(--console-text);
  animation: blink 1.2s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.output-text {
  margin: 4px 0 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  letter-spacing: 0.03em;
}

.error-text {
  color: var(--console-error);
  margin: 4px 0 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.success-text {
  color: var(--console-success);
  margin: 4px 0 12px;
}

.warning-text {
  color: var(--console-warning);
  margin: 4px 0 12px;
}

.info-text {
  color: var(--console-text-dim);
  margin: 4px 0 12px;
}

.boot-header {
  color: var(--console-text);
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 245, 196, 0.5);
}

.boot-line {
  color: var(--console-text-dim);
  margin-bottom: 5px;
}

.boot-success {
  color: var(--console-success);
  margin: 10px 0;
}

/* LS command styling */
.ls-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 5px 0 15px;
}

.ls-item {
  color: var(--ls-item-color);
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.ls-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.ls-item-icon {
  margin-right: 6px;
  font-size: 0.9em;
}

.ls-item-file {
  color: var(--console-text);
}

.ls-item-dir {
  color: var(--console-prompt-path);
  font-weight: 600;
}

.ls-item-hidden {
  opacity: 0.5;
}

/* Table output styling */
.table-container {
  margin: 5px 0 15px;
  overflow-x: auto;
  max-width: 100%;
}

.term-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

.term-table th {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid var(--console-text-dim);
  color: var(--console-text);
  font-weight: 600;
}

.term-table td {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--console-text-muted);
}

.term-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--console-text);
}

/* Link styling */
.terminal-link {
  color: var(--console-link);
  text-decoration: none;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.terminal-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--console-link);
  transition: width 0.3s;
}

.terminal-link:hover:after {
  width: 100%;
}

.terminal-link:hover {
  text-shadow: 0 0 8px rgba(132, 222, 255, 0.5);
}

/* Skills display */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin: 10px 0 20px;
}

.skill-category {
  margin-bottom: 20px;
}

.skill-category-name {
  color: var(--console-text);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--console-text-dim);
}

.skill-item-terminal {
  margin-bottom: 8px;
}

.skill-name-terminal {
  color: var(--console-text-muted);
  display: inline-block;
  width: 100px;
}

.skill-level-terminal {
  color: var(--console-text);
  display: inline-block;
}

.skill-bar-terminal {
  display: inline-block;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  width: 100px;
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-left: 10px;
}

.skill-value-terminal {
  height: 100%;
  background-color: var(--console-text);
  border-radius: 3px;
}

/* Command input styling */
.busy-indicator {
  color: var(--input-busy-text);
  margin-left: 10px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Animation effects */
.terminal-fade-in {
  animation: terminalFadeIn 0.3s ease-in;
}

@keyframes terminalFadeIn {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.terminal-typing {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 1.5s steps(30, end);
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #terminal-output {
    padding: 10px 15px;
    font-size: 0.85rem;
  }
  
  .ls-container {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .table-container {
    max-width: calc(100vw - 30px);
  }
}
