/* Phantom CLI Style */
.phantom-terminal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 450px; /* Un poco más espacioso */
  height: 320px;
  background: rgba(11, 15, 26, 0.95);
  border: 1px solid #d4a63a;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  font-family:
    "Roboto Mono",
    "Courier New",
    monospace;
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.terminal-header {
  background: #d4a63a;
  color: #0b0f1a;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
}

.terminal-controls {
  display: flex;
  gap: 10px;
}

.t-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.t-close {
  background: #ff5f56;
}
.t-min {
  background: #ffbd2e;
}

.terminal-content {
  flex: 1;
  padding: 15px;
  color: #fff; /* Texto blanco para mejor contraste sobre fondo animado */
  font-size: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4a63a transparent;
  position: relative;
  background: transparent; /* Permitir ver el canvas */
}

/* Canvas de fondo Matrix */
#t-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Detrás del texto */
  opacity: 0.25; /* Sencillo pero efectivo */
  pointer-events: none; /* No interferir con el click/drag */
}

.terminal-line, .terminal-input-line {
  position: relative;
  z-index: 10; /* Encima del canvas */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Custom scrollbar for terminal */
.terminal-content::-webkit-scrollbar {
  width: 6px;
}
.terminal-content::-webkit-scrollbar-thumb {
  background: #d4a63a;
}

.terminal-line {
  margin-bottom: 5px;
}

.terminal-input-line {
  display: flex;
  gap: 8px;
}

.t-prompt {
  color: #d4a63a;
}

#t-input {
  background: transparent;
  border: none;
  color: #eee;
  font-family: inherit;
  font-size: inherit;
  flex: 1;
  outline: none;
}

/* Floating Toggle Button */
.terminal-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #d4a63a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0f1a;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(212, 166, 58, 0.4);
  z-index: 9998;
  transition: all 0.3s ease;
}

.terminal-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  background: #fff;
}

@media (max-width: 500px) {
  .phantom-terminal {
    width: 90%;
    right: 5%;
    bottom: 100px;
  }
}
