/* Estilos para la Terminal Interactiva */
.terminal-container {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.terminal-container:hover {
  transform: translateY(-5px);
}

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

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s ease;
}

.terminal-btn:hover {
  transform: scale(1.2);
}

.terminal-title {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 500;
}

.terminal-body {
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 400px;
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.terminal-line {
  margin-bottom: 4px;
  animation: fadeInUp 0.5s ease-out;
  padding: 2px 0;
}

.terminal-line:nth-child(odd) {
  animation-delay: 0.1s;
}

.terminal-line:nth-child(even) {
  animation-delay: 0.2s;
}

.blinking-cursor {
  animation: blink 1s infinite;
  color: #00ff00;
  font-weight: bold;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar personalizado para la terminal */
.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* Efecto de resplandor para comandos importantes */
.text-warning {
  text-shadow: 0 0 5px rgba(255, 193, 7, 0.3);
  transition: all 0.3s ease;
}

.text-warning:hover {
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}

.text-success {
  text-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
}

.text-info {
  text-shadow: 0 0 5px rgba(23, 162, 184, 0.3);
}

/* Efectos especiales para la terminal */
.terminal-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  position: relative;
  overflow: hidden;
}

.terminal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.1;
  pointer-events: none;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .terminal-container {
    margin: 0 15px;
  }
  
  .terminal-body {
    font-size: 12px;
    max-height: 300px;
  }
  
  .terminal-title {
    font-size: 12px;
  }
}

/* Habilitar selección de texto en la terminal */
.terminal-body {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.terminal-line {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  cursor: text;
}

.terminal-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Estilos para el input de comandos */
.terminal-input {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  transition: all 0.3s ease;
}

.terminal-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

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

/* Indicador de input activo */
.terminal-input.active {
  background: rgba(255, 255, 255, 0.15);
  border-left: 3px solid #00ff00;
  padding-left: 7px;
}

/* Cursor parpadeante para el input */
.terminal-input:focus::after {
  content: '|';
  color: #00ff00;
  animation: blink 1s infinite;
  margin-left: 2px;
}

/* Mejorar la legibilidad del texto seleccionado */
.terminal-body ::selection {
  background: rgba(0, 123, 255, 0.3);
  color: white;
}

.terminal-body ::-moz-selection {
  background: rgba(0, 123, 255, 0.3);
  color: white;
}

/* Indicador visual cuando se puede copiar texto */
.terminal-body.copyable {
  cursor: text;
}

/* Estilos para cuando se está seleccionando texto */
.terminal-body.selecting-text {
  cursor: crosshair;
}

.terminal-body.selecting-text::after {
  content: '🖱️ Selecting text... Release to finish selection';
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 10px;
  color: #ffc107;
  opacity: 0.9;
}

/* Mejorar la selección de texto */
.terminal-line::selection {
  background: rgba(0, 123, 255, 0.5);
  color: white;
}

.terminal-line::-moz-selection {
  background: rgba(0, 123, 255, 0.5);
  color: white;
}

/* Indicador de texto seleccionado */
.terminal-line.has-selection {
  background: rgba(0, 123, 255, 0.1);
  border-radius: 2px;
} 