/* ZION TERMINAL v7.0 — Professional Terminal Styles */

/* ═══ SECTION ═══ */
.terminal-showcase {
  padding: 80px 0;
  background: transparent;
}
.terminal-showcase .section-title,
.terminal-showcase .section-subtitle {
  text-align: center;
}
.terminal-showcase .section-subtitle {
  color: #8b949e;
  margin-bottom: 32px;
}
.terminal-showcase .section-subtitle code {
  background: rgba(0,255,65,0.08);
  color: #58a6ff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ═══ WRAPPER ═══ */
.terminal-wrapper {
  max-width: 940px;
  margin: 0 auto;
  transition: all 0.25s ease;
}
.terminal-wrapper.fullscreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  max-width: none;
  z-index: 10000;
  margin: 0;
  padding: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.terminal-wrapper.fullscreen .terminal-container {
  border-radius: 0;
  border: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.terminal-wrapper.fullscreen #zion-terminal {
  height: auto;
  max-height: none;
  flex: 1;
}
.terminal-wrapper.fullscreen .terminal-body {
  flex: 1;
  max-height: none;
}
.terminal-wrapper.fullscreen .term-output {
  max-height: none;
  height: auto;
  flex: 1;
}
.terminal-wrapper.fullscreen .terminal-hints {
  display: none;
}

/* ═══ CONTAINER ═══ */
.terminal-container {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}

/* ═══ HEADER ═══ */
.terminal-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 1px solid #21262d;
  gap: 12px;
  user-select: none;
  min-height: 38px;
  flex-shrink: 0;
}

/* Traffic lights */
.terminal-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.terminal-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s;
}
.terminal-buttons span:hover { opacity: 0.8; }
.terminal-btn-close { background: #f85149; }
.terminal-btn-minimize { background: #d29922; }
.terminal-btn-maximize { background: #3fb950; }

/* Title */
.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terminal-title i {
  color: #8b949e;
  font-size: 10px;
  margin-right: 6px;
}

/* Controls */
.terminal-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.terminal-status-dot {
  width: 6px;
  height: 6px;
  background: #3fb950;
  border-radius: 50%;
  animation: blink 3s ease-in-out infinite;
}
.terminal-status-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #484f58;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══ BODY ═══ */
#zion-terminal {
  height: 480px;
  display: flex;
  flex-direction: column;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13.5px;
  line-height: 1.6;
  background: #0d1117;
  position: relative;
}

/* Scanline effect — subtle */
#zion-terminal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Output */
#zion-terminal .term-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  position: relative;
  z-index: 2;
}
#zion-terminal .term-output::-webkit-scrollbar { width: 5px; }
#zion-terminal .term-output::-webkit-scrollbar-track { background: transparent; }
#zion-terminal .term-output::-webkit-scrollbar-thumb { background: #21262d; border-radius: 3px; }
#zion-terminal .term-output::-webkit-scrollbar-thumb:hover { background: #30363d; }

/* Lines */
#zion-terminal .term-line {
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 1.4em;
}

/* Input */
#zion-terminal .term-input-line {
  display: flex;
  align-items: center;
  padding: 8px 20px 12px;
  border-top: 1px solid #21262d;
  background: #0d1117;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
#zion-terminal .term-prompt {
  color: #3fb950;
  font-weight: 600;
  margin-right: 8px;
  white-space: nowrap;
  font-size: 13px;
}
#zion-terminal .term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e6edf3;
  font-family: inherit;
  font-size: inherit;
  caret-color: #58a6ff;
}
#zion-terminal .term-input::placeholder {
  color: #30363d;
  font-style: normal;
}

/* Loading spinner */
.term-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid #21262d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.term-loading { opacity: 0.7; }

/* ═══ STATUSBAR ═══ */
.terminal-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  background: #161b22;
  border-top: 1px solid #21262d;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #484f58;
  flex-shrink: 0;
}
.terminal-statusbar-left,
.terminal-statusbar-right {
  display: flex;
  gap: 16px;
  align-items: center;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-item i {
  font-size: 0.55rem;
  opacity: 0.5;
}

/* ═══ HINT CHIPS ═══ */
.terminal-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  justify-content: center;
  border-top: 1px solid #21262d;
}
.hint-chip {
  display: inline-block;
  padding: 4px 10px;
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #8b949e;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.hint-chip:hover {
  border-color: #388bfd;
  color: #58a6ff;
}
.hint-chip code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .terminal-wrapper { max-width: 100%; margin: 0 10px; }
  .terminal-showcase { padding: 40px 0; }
  .terminal-container { border-radius: 8px; }
  #zion-terminal { height: 400px; font-size: 12px; }
  .terminal-header { padding: 8px 12px; }
  .terminal-title span { display: none; }
  .terminal-statusbar { font-size: 0.55rem; padding: 4px 12px; }
  .terminal-hints { gap: 4px; padding: 8px 12px; }
  .hint-chip { font-size: 0.62rem; padding: 3px 8px; }
}
@media (max-width: 480px) {
  #zion-terminal { height: 340px; font-size: 11.5px; }
  .terminal-controls .terminal-status-text { display: none; }
  .hint-chip { font-size: 0.58rem; }
}