/* ========================================================================
   CYBER TERMINAL STYLES
   Styles for the interactive terminal section
   ======================================================================== */

/* Terminal Container */
.terminal-cyber-container {
  background: linear-gradient(135deg, #0a0a0a 0%, #000000 50%, #0a0a0a 100%);
  border: 2px solid #ef4444;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 
    0 0 30px rgba(239, 68, 68, 0.4),
    0 0 60px rgba(239, 68, 68, 0.2),
    inset 0 0 40px rgba(239, 68, 68, 0.05);
  clip-path: polygon(
    0 0,
    calc(100% - 30px) 0,
    100% 30px,
    100% 100%,
    30px 100%,
    0 calc(100% - 30px)
  );
}

/* Scanline effect overlay */
.terminal-cyber-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    transparent 1px,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 3px
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.3;
}

/* Animated glow effect */
.terminal-cyber-container::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(239, 68, 68, 0.3) 50%,
    transparent 100%
  );
  animation: terminal-glow 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes terminal-glow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Terminal Header */
.terminal-cyber-header {
  background: linear-gradient(135deg, #1a0000 0%, #0a0000 100%);
  border-bottom: 2px solid #ef4444;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

/* Copy Button */
.terminal-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.terminal-copy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(239, 68, 68, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.terminal-copy-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
}

.terminal-copy-btn:hover::before {
  transform: translateX(0);
}

.terminal-copy-btn.copied-success {
  border-color: #22c55e;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.terminal-copy-btn.copied-error {
  border-color: #ff4444;
  color: #ff4444;
  background: rgba(255, 68, 68, 0.2);
}

/* Terminal Body */
.terminal-cyber-body {
  background: #000000;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Terminal Output Area */
.terminal-output {
  flex: 1;
  overflow-y: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #00ff00;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #050505;
  border: 1px solid #1a1a1a;
  border-left: 3px solid #ef4444;
  border-radius: 0.25rem;
  min-height: 300px;
  max-height: 500px;
}

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

.terminal-output::-webkit-scrollbar-track {
  background: #0a0a0a;
  border-radius: 4px;
}

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

.terminal-output::-webkit-scrollbar-thumb:hover {
  background: #ff6b6b;
}

/* Terminal Lines */
.terminal-line {
  margin-bottom: 0.5rem;
  word-break: break-all;
  font-family: 'Roboto Mono', monospace;
}

/* Code Block */
.terminal-code-block {
  margin-top: 1rem;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-left: 3px solid #ef4444;
  border-radius: 0.25rem;
  overflow: hidden;
}

.code-header {
  background: #050505;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-lang {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: #ef4444;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

.code-content {
  padding: 1rem;
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #e5e5e5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.code-content code {
  color: inherit;
  font-family: inherit;
}

/* Terminal Input */
.terminal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #0a0a0a;
  border: 1px solid #ef4444;
  border-radius: 0.25rem;
  max-width: 100%;
  box-sizing: border-box;
}

.terminal-prompt {
  color: #ef4444;
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 0;
  color: #00ff00;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.875rem;
  outline: none;
  caret-color: #00ff00;
  width: 100%;
}

.terminal-input::placeholder {
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-input:focus {
  outline: none;
}

/* Terminal Footer */
.terminal-cyber-footer {
  background: linear-gradient(135deg, #0a0000 0%, #000000 100%);
  border-top: 2px solid #ef4444;
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Keyboard Key Style */
.terminal-cyber-footer kbd {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .terminal-cyber-container {
    clip-path: polygon(
      0 0,
      calc(100% - 15px) 0,
      100% 15px,
      100% 100%,
      15px 100%,
      0 calc(100% - 15px)
    );
  }

  .terminal-cyber-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .terminal-cyber-body {
    padding: 1rem;
    min-height: 300px;
  }

  .terminal-output {
    font-size: 0.75rem;
    min-height: 200px;
    max-height: 350px;
  }

  .code-content {
    font-size: 0.75rem;
    padding: 0.75rem;
  }

  .terminal-input {
    font-size: 0.75rem;
  }

  .terminal-input-wrapper {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .terminal-prompt {
    font-size: 0.75rem;
    min-width: fit-content;
  }

  .terminal-cyber-footer {
    padding: 0.75rem 1rem;
  }

  .terminal-cyber-footer .flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Text Selection */
.terminal-output ::selection,
.code-content ::selection {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* Blinking Cursor Effect for Input */
.terminal-input-wrapper::after {
  content: '▊';
  color: #00ff00;
  animation: terminal-cursor-blink 1s infinite;
  margin-left: -0.5rem;
  opacity: 0;
}

.terminal-input:focus + .terminal-input-wrapper::after {
  opacity: 1;
}

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

