/*
  terminal.css
  Author: The Consul @ Gluteus Maximus

  - Pinned input row ~100px from bottom
  - Semi-transparent background
  - Hover: clickable commands get orange background + glow
  - 500ms highlight after output with .cmd-highlight-flash
*/

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: #000;
  font-family: "Fira Code", "Courier New", monospace;
  overflow: hidden;
}

#bgCanvas {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

#terminalContainer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}

#terminalOutput {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: 100px;
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.5);

  color: #FFD700;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;

  text-shadow: 0 0 7px rgba(255, 215, 0, 1),
               0 0 15px rgba(255, 215, 0, 0.8);
}

#terminalInputRow {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 100px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: rgba(0,0,0,0.6);
  box-sizing: border-box;
}

#promptLabel {
  margin-right: 0.5rem;
  user-select: none;
  color: #FFD700;
}

#inputWrapper {
  position: relative;
  flex: 1;
}

#terminalInput {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #FFD700;
  font-size: 1rem;
}

.blink-cursor::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: #FFD700;
  margin-left: 2px;
  animation: blink 1s infinite step-end;
  vertical-align: bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

#suggestionBox {
  position: absolute;
  top: 1.6em; left: 0; width: 100%;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid #777;
  z-index: 999;
  display: none;
  color: #FFD700;
}

.suggestion-item {
  padding: 4px 8px;
  cursor: pointer;
}
.suggestion-item:hover {
  background: rgba(255,255,255,0.2);
}
.suggestion-item.highlight {
  background: rgba(255,255,255,0.3);
  outline: 1px solid #FFD700;
}

.spark {
  position: relative;
  display: inline-block;
  width: 3px;
  height: 3px;
  background: #FFD700;
  animation: sparkFade 0.3s ease-out forwards;
  pointer-events: none;
}

@keyframes sparkFade {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(0,-10px) scale(0.1); opacity: 0; }
}

.msg-error {
  color: #FF5555;
}
.msg-success {
  color: #50FA7B;
}
.msg-info {
  color: #8BE9FD;
}
.msg-command {
  color: #FFB300;
}

/* Clickable commands => bolder, orange color, background & glow on hover */
.clickable-command {
  cursor: pointer;
  font-weight: bold;
  color: #FFA500; /* base text color is orange */
  margin: 0 3px;
  border-radius: 3px;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.clickable-command:hover {
  background-color: #FFA500; /* orange background */
  color: #000; /* black text for contrast */
  box-shadow: 0 0 8px #FFA500; /* orange glow */
}

/* We'll define a highlight class for commands after output to show they're clickable */
.cmd-highlight-flash {
  box-shadow: 0 0 8px #FFA500 !important;
}

/* ASCII container if needed */
#asciiLogoContainer {
  text-align: center;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
}
#asciiLogoContainer pre {
  display: inline-block;
  text-align: left;
  margin: 0;
  white-space: pre;
  line-height: 1;
}

/* Splash screen full cover */
#splashScreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.5);
}

.splash-text {
  font-size: 1.5rem;
  color: #ff0;
  text-shadow: 0 0 10px #ff0;
  animation: splashBlink 1.5s infinite;
  padding: 20px;
  text-align: center;
}

@keyframes splashBlink {
  0% { opacity: 1; }
  50% { opacity: 0.25; }
  100% { opacity: 1; }
}

/* /CONNECT 'button' => orange + glow */
#connectFakeButton {
  display: none;
  margin: 2rem auto;
  text-align: center;
  font-weight: bold;
  background: #FFA500;
  color: #000;
  padding: 12px 24px;
  cursor: pointer;
  width: fit-content;
  border: 2px solid #FFA500;
  border-radius: 4px;
  box-shadow: 0 0 10px #FFA500;
  transition: box-shadow 0.2s ease;
}
#connectFakeButton:hover {
  box-shadow: 0 0 20px #FFA500;
  border-color: #FFA500;
}
  