/*
 * command-terminal.css — Interactive Command Terminal
 * ───────────────────────────────────────────────────
 * Discord-style command interface with typing animations.
 * Makes the product feel interactive and real.
 */

/* ══ COMMAND TERMINAL SECTION ═══════════════════════════════ */

.command-demos-section {
  padding: 5rem 0;
  margin: 5rem 0;
}

.command-demos-section h2 {
  margin-bottom: 2.5rem;
}

.terminals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ══ TERMINAL CARD ══════════════════════════════════════════ */

.command-terminal {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.command-terminal:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

/* Terminal header (optional) */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-dim);
  opacity: 0.6;
}

.terminal-dot:nth-child(1) { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Command text */
.terminal-command {
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.terminal-command::before {
  content: '>';
  margin-right: 0.5rem;
  color: var(--accent);
}

/* Cursor blink effect */
.terminal-command::after {
  content: '|';
  animation: blink 1s step-end infinite;
  margin-left: 2px;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Input field */
.terminal-input {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  height: 1.2rem;
  font-style: italic;
  opacity: 0.85;
  flex-shrink: 0;
}

/* Result */
.terminal-result {
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  background: rgba(212, 135, 159, 0.2);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  margin-bottom: 0.65rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  height: auto;
}

.terminal-result.show {
  opacity: 1;
  transform: translateY(0);
}

/* Description */
.terminal-description {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease 0.2s;
  flex-shrink: 0;
}

.terminal-description.show {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 680px) {
  .terminals-grid {
    grid-template-columns: 1fr;
  }

  .command-terminal {
    padding: 1.25rem;
  }

  .terminal-command {
    font-size: 0.85rem;
  }

  .terminal-input {
    font-size: 0.8rem;
  }
}
