.terminal {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 20, 147, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 255, 255, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(191, 0, 255, 0.25) 0%, transparent 60%),
    linear-gradient(160deg, rgba(255, 20, 147, 0.3) 0%, rgba(191, 0, 255, 0.3) 25%, rgba(0, 255, 255, 0.3) 50%, rgba(255, 0, 255, 0.3) 75%, rgba(255, 20, 147, 0.3) 100%),
    linear-gradient(160deg, #1a0020 0%, #2a0035 40%, #15001a 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 400% 400%, 100% 100%;
  border-radius: 20px;
  padding: 20px;
  font-family: Menlo, Monaco, 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  height: 500px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 3px #FF69B4,
    0 0 0 6px #00FFFF,
    0 0 0 9px #FF00FF,
    0 0 60px rgba(255, 20, 147, 0.6),
    0 0 100px rgba(0, 255, 255, 0.4),
    0 0 150px rgba(191, 0, 255, 0.3),
    inset 0 0 100px rgba(255, 0, 255, 0.2);
  animation: terminalGlow 3s ease-in-out infinite, backgroundRave 8s ease infinite;
  overflow: hidden;
}

.terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: lightSweep 4s linear infinite;
  pointer-events: none;
  border-radius: 20px;
}

@keyframes lightSweep {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes backgroundRave {
  0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 50%; }
  25% { background-position: 0% 0%, 0% 0%, 0% 0%, 50% 100%; }
  50% { background-position: 0% 0%, 0% 0%, 0% 0%, 100% 50%; }
  75% { background-position: 0% 0%, 0% 0%, 0% 0%, 50% 0%; }
}

@keyframes terminalGlow {
  0%, 100% {
    box-shadow:
      0 0 0 3px #FF69B4,
      0 0 0 6px #00FFFF,
      0 0 0 9px #FF00FF,
      0 0 60px rgba(255, 20, 147, 0.6),
      0 0 100px rgba(0, 255, 255, 0.4),
      0 0 150px rgba(191, 0, 255, 0.3),
      inset 0 0 100px rgba(255, 0, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 3px #00FFFF,
      0 0 0 6px #FF00FF,
      0 0 0 9px #FF69B4,
      0 0 60px rgba(0, 255, 255, 0.6),
      0 0 100px rgba(255, 0, 255, 0.4),
      0 0 150px rgba(255, 20, 147, 0.3),
      inset 0 0 100px rgba(191, 0, 255, 0.3);
  }
}

.terminal-output {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  text-shadow: 0 0 10px rgba(255, 105, 180, 0.6), 0 0 20px rgba(255, 20, 147, 0.3);
}

.terminal-output::-webkit-scrollbar {
  width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.terminal-output::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF1493, #FF69B4, #00FFFF);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 20, 147, 0.5);
}

.terminal-output::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00FFFF, #FF00FF, #FF1493);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.pager-status {
  display: block;
  background: rgba(0, 0, 0, 0.6);
  color: #FF69B4;
  padding: 4px 8px;
  margin-top: 8px;
  font-size: 12px;
  text-shadow: 0 0 8px #FF1493;
  cursor: pointer;
}
