/* ==========================================
   pawsh - terminal emulator styling
   ascii art, neofetch, & phosphor glow :3
   ========================================== */

.terminal-window {
  background: #090610;
  border: 2px solid var(--purple-primary);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  margin-top: 20px;
}

.terminal-window .window-header {
  background: linear-gradient(90deg, #3b0764, #581c87);
}

.terminal-body {
  height: 380px;
  overflow-y: auto;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e9d5ff;
  background: radial-gradient(circle at center, #120b22 0%, #08050e 100%);
  position: relative;
}

.term-line {
  margin-bottom: 6px;
  word-break: break-word;
}

.term-cmd-echo {
  color: var(--yellow-light);
  margin-bottom: 6px;
}

.term-prompt {
  color: var(--yellow-primary);
  font-weight: bold;
  user-select: none;
}

.term-cmd-text {
  color: #ffffff;
  font-weight: bold;
}

.term-highlight {
  color: var(--yellow-primary);
  font-weight: bold;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  margin: 6px 0;
}

.term-yellow {
  color: var(--yellow-primary);
}

.term-purple {
  color: var(--purple-light);
}

.term-dim {
  color: #8b7ca6;
}

.term-err {
  color: #f87171;
  font-weight: bold;
}

.term-link {
  color: var(--yellow-primary);
  text-decoration: underline;
}

.term-link:hover {
  color: #ffffff;
}

.term-divider {
  color: var(--purple-dark);
  user-select: none;
}

/* ASCII Art Formatting */
.term-ascii-logo {
  font-family: monospace;
  font-size: 11px;
  line-height: 12px;
  color: var(--purple-light);
  text-shadow: 0 0 6px var(--purple-glow);
  margin-bottom: 8px;
  white-space: pre;
  overflow-x: auto;
}

.term-ascii-dog {
  font-family: monospace;
  font-size: 13px;
  line-height: 15px;
  color: var(--yellow-primary);
  text-shadow: 0 0 8px var(--yellow-glow);
  margin: 10px 0;
  white-space: pre;
  animation: dog-wiggle 1s ease;
}

@keyframes dog-wiggle {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.term-train {
  font-family: monospace;
  font-size: 12px;
  line-height: 14px;
  color: var(--yellow-primary);
  white-space: pre;
  overflow-x: auto;
  animation: train-slide 3s ease;
}

@keyframes train-slide {
  from { transform: translateX(60px); opacity: 0.5; }
  to { transform: translateX(0); opacity: 1; }
}

/* Neofetch Styling */
.neofetch-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  background: rgba(88, 28, 135, 0.15);
  border: 1px solid var(--purple-dark);
}

.neofetch-art {
  font-family: monospace;
  font-size: 13px;
  line-height: 14px;
  color: var(--purple-light);
  white-space: pre;
  text-shadow: 0 0 6px var(--purple-glow);
}

.neofetch-info {
  font-size: 0.9rem;
  line-height: 1.5;
}

.neo-title {
  font-weight: bold;
  font-size: 1rem;
}

.neo-key {
  color: var(--yellow-primary);
  font-weight: bold;
  display: inline-block;
  min-width: 85px;
}

.neo-palette {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.swatch {
  width: 16px;
  height: 12px;
  display: inline-block;
}
.sw-black { background: #101010; }
.sw-purple-dark { background: #581c87; }
.sw-purple { background: #8b5cf6; }
.sw-purple-light { background: #c084fc; }
.sw-yellow { background: #facc15; }
.sw-yellow-light { background: #fef08a; }
.sw-white { background: #ffffff; }

/* Matrix Rain line */
.term-matrix-line {
  color: #4ade80;
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 2px;
  text-shadow: 0 0 4px #22c55e;
}

/* Help Grid */
.term-help-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.term-help-row {
  font-size: 0.9rem;
}

/* Terminal Input Line */
.terminal-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #050308;
  border-top: 2px solid var(--purple-primary);
}

.terminal-prompt-label {
  color: var(--yellow-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: bold;
  user-select: none;
  white-space: nowrap;
}

.terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  caret-color: var(--yellow-primary);
}

/* Quick Command Chips Toolbar */
.terminal-chips-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-alt);
  border-top: 1px dashed var(--purple-primary);
}

.chips-label {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-right: 4px;
}

.cmd-chip {
  background: var(--purple-deep);
  color: var(--yellow-primary);
  border: 1px solid var(--purple-primary);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s ease;
  user-select: none;
}

.cmd-chip:hover {
  background: var(--yellow-primary);
  color: #000;
  border-color: var(--yellow-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   TERMINAL LIGHT MODE (RETRO DESKTOP PAPER CONSOLE)
   ========================================================================== */
body.light-mode .terminal-window {
  background: #fbf9f4;
  border: 2px solid #581c87;
  box-shadow: 4px 4px 0px rgba(88, 28, 135, 0.3);
}

body.light-mode .terminal-window .window-header {
  background: linear-gradient(90deg, #9333ea, #7e22ce);
  color: #ffd84d;
}

body.light-mode .terminal-window .window-header .window-title {
  color: #ffd84d;
}

body.light-mode .terminal-window .win-btn {
  background: #4c1d95;
  color: #ffd84d;
  border-color: #ffd84d;
}

body.light-mode .terminal-window .win-btn:hover {
  background: #ffd84d;
  color: #1e1035;
  border-color: #ffd84d;
}

body.light-mode .terminal-body {
  background: #faf6ee;
  color: #1a0f2e;
}

body.light-mode .terminal-input-bar {
  background: #e6dcce;
  border-top: 2px solid #581c87;
}

body.light-mode .terminal-prompt-label {
  color: #581c87;
  font-weight: bold;
}

body.light-mode .terminal-input-field {
  color: #0f0720;
  font-weight: bold;
  caret-color: #581c87;
}

body.light-mode .term-prompt {
  color: #581c87;
  font-weight: bold;
}

body.light-mode .term-cmd-text {
  color: #000000;
  font-weight: bold;
}

body.light-mode .term-cmd-echo {
  color: #581c87;
  font-weight: bold;
}

body.light-mode .term-dim {
  color: #5c4e70;
}

body.light-mode .term-yellow {
  color: #854d0e;
  font-weight: bold;
}

body.light-mode .term-purple {
  color: #7e22ce;
  font-weight: bold;
}

body.light-mode .term-highlight {
  color: #78350f;
  background: #fef08a;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid #ca8a04;
  display: inline-block;
  font-weight: bold;
}

body.light-mode .term-err {
  color: #b91c1c;
  font-weight: bold;
}

body.light-mode .term-link {
  color: #6b21a8;
  font-weight: bold;
  text-decoration: underline;
}

body.light-mode .term-link:hover {
  color: #854d0e;
}

body.light-mode .term-divider {
  color: #c4b5d6;
}

body.light-mode .term-ascii-logo {
  color: #581c87;
  font-weight: bold;
  text-shadow: none;
}

body.light-mode .term-ascii-dog {
  color: #854d0e;
  font-weight: bold;
  text-shadow: none;
}

body.light-mode pre.term-yellow {
  color: #854d0e;
  font-weight: bold;
}

body.light-mode .neofetch-container {
  background: #f1e9f8;
  border: 1px solid #9333ea;
}

body.light-mode .neofetch-art {
  color: #581c87;
  text-shadow: none;
}

body.light-mode .neo-title {
  color: #1a0f2e;
}

body.light-mode .neo-key {
  color: #854d0e;
  font-weight: bold;
}

body.light-mode .terminal-chips-bar {
  background: #e6dcce;
  border-top: 1px dashed #7e22ce;
}

body.light-mode .chips-label {
  color: #5c4e70;
  font-weight: bold;
}

body.light-mode .cmd-chip {
  background: #ded2f3;
  color: #4c1d95;
  border-color: #7e22ce;
}

body.light-mode .cmd-chip:hover {
  background: #7e22ce;
  color: #ffffff;
  border-color: #7e22ce;
}

/* ==========================================================================
   TERMINAL MOBILE RESPONSIVENESS
   ========================================================================== */
.terminal-body pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
  .terminal-body {
    height: 320px;
    padding: 10px;
    font-size: 0.85rem;
  }

  .terminal-input-bar {
    padding: 8px 10px;
    gap: 6px;
  }

  .terminal-prompt-label {
    font-size: 0.82rem;
  }

  .terminal-input-field {
    min-width: 0;
    font-size: 0.85rem;
  }

  .terminal-chips-bar {
    padding: 6px 10px;
    gap: 4px;
  }

  .cmd-chip {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .neofetch-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
