/* Terminal-specific styles for the portfolio terminal interface */

/* Terminal Container */
.terminal {
  background-color: #1a1a1a;
  color: #00ff00;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  padding: 20px;
  height: calc(100% - 60px);
  overflow-y: auto;
  position: relative;
  border-radius: 0 0 12px 12px;
}

/* Terminal Output */
.terminal-output {
  margin-bottom: 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.terminal-line {
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
}

.terminal-prompt {
  color: #00ff00;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Terminal Input Container */
.terminal-input-container {
  display: flex;
  align-items: center;
  position: sticky;
  bottom: 0;
  background: #1a1a1a;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #00ff00;
  font-family: inherit;
  font-size: inherit;
  flex: 1;
  padding: 0;
  margin: 0;
}

.terminal-input::placeholder {
  color: rgba(0, 255, 0, 0.5);
}

/* Terminal Cursor */
.terminal-cursor {
  width: 8px;
  height: 20px;
  background: #00ff00;
  margin-left: 2px;
  animation: blink-cursor 1s infinite;
}

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

/* Output Styling */
.terminal-success {
  color: #51cf66;
}

.terminal-error {
  color: #ff6b6b;
}

.terminal-warning {
  color: #ffd43b;
}

.terminal-info {
  color: #74c0fc;
}

.terminal-response {
  color: #ffffff;
}

/* Links in terminal */
.terminal-output a {
  color: #74c0fc;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.terminal-output a:hover {
  color: #51cf66;
}

/* Custom scrollbar */
.terminal::-webkit-scrollbar {
  width: 8px;
}

.terminal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 0, 0.3);
  border-radius: 4px;
}

.terminal::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 0, 0.5);
}

/* Terminal states */
.terminal-wrapper.minimized {
  height: 60px;
  overflow: hidden;
}

.terminal-wrapper.minimized .terminal {
  display: none;
}

.terminal-wrapper.maximized {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #1a1a1a;
  border-radius: 0;
}

/* Terminal header improvements */
.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #2d2d2d, #3a3a3a);
  border-bottom: 1px solid #333;
  border-radius: 12px 12px 0 0;
}

.terminal-controls {
  display: flex;
  gap: 8px;
}

.terminal-control {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.terminal-control:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.terminal-control:active {
  transform: scale(0.9);
}

.terminal-control.close { 
  background: linear-gradient(135deg, #ff5f56, #ff3b30); 
}

.terminal-control.minimize { 
  background: linear-gradient(135deg, #ffbd2e, #ff9500); 
}

.terminal-control.maximize { 
  background: linear-gradient(135deg, #27ca3f, #30d158); 
}

.terminal-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

.terminal-connection {
  display: flex;
  align-items: center;
  gap: 6px;
}

.connection-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #51cf66;
  animation: pulse 2s infinite;
}

.connection-text {
  font-size: 12px;
  color: #51cf66;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Responsive terminal */
@media (max-width: 768px) {
  .terminal {
    font-size: 12px;
    padding: 15px;
    line-height: 1.4;
  }
  
  .terminal-header {
    padding: 10px 15px;
  }
  
  .terminal-title {
    font-size: 12px;
  }
  
  .terminal-control {
    width: 12px;
    height: 12px;
  }
}

/* Auto-completion dropdown */
.command-suggestions {
  background: #2d2d2d;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.command-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  color: #00ff00;
  font-family: 'JetBrains Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.command-suggestion:hover,
.command-suggestion.selected {
  background: rgba(0, 255, 0, 0.1);
}

.command-suggestion:last-child {
  border-bottom: none;
}
.terminal-output {
  min-height: 300px;
  margin-bottom: 20px;
}

.terminal-line {
  margin-bottom: 4px;
  word-wrap: break-word;
}

.terminal-prompt {
  color: #00ff00;
  font-weight: bold;
}

.terminal-command {
  color: #ffffff;
}

.terminal-response {
  color: #00ff00;
  margin-left: 0;
  white-space: pre-wrap;
}

/* Terminal Input */
.terminal-input-container {
  display: flex;
  align-items: center;
  position: relative;
}

.terminal-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  flex: 1;
  caret-color: #00ff00;
}

/* Cursor Animation */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: #00ff00;
  animation: blink 1s infinite;
}

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

/* Command suggestions */
.terminal-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.terminal-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  color: #00ff00;
}

.terminal-suggestion:hover,
.terminal-suggestion.selected {
  background-color: #444;
}

/* Error messages */
.terminal-error {
  color: #ff6b6b;
}

/* Success messages */
.terminal-success {
  color: #51cf66;
}

/* Warning messages */
.terminal-warning {
  color: #ffd43b;
}

/* Info messages */
.terminal-info {
  color: #74c0fc;
}

/* Responsive design */
@media (max-width: 768px) {
  .terminal {
    font-size: 12px;
    padding: 15px;
  }
  
  .terminal-header {
    padding: 6px 12px;
    margin: -15px -15px 15px -15px;
  }
}
