header {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0) !important;
  margin-top: 50px;
}

  .terminal {
    width: 700px;
    height: 350px;
    background: black;
    color: #66ff66; /* Lighter neon green */
    font-family: "Courier New", Courier, monospace;
    font-size: 32px; /* Bigger text */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.8);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    filter: brightness(1.2) contrast(1.4) saturate(1.2); /* Bloom effect */
    
    /* 📺 CRT 3D Curvature Effect */
    transform: perspective(1000px) rotateX(8deg) scale(1.05);
    transform-origin: center;
  }
  
  .terminal-body {
    padding: 20px;
    white-space: pre-wrap; /* This should already be there but let's make sure */
    overflow-x: hidden; /* Disable horizontal scrolling */
    word-break: break-word; /* Force long words to break */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    overflow-y: auto;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    height: 100%;
    min-height: 0;
  }
  
  .terminal-scroll {
    max-height: 100%;
    overflow-y: auto;      /* Enable vertical scroll here */
    overflow-x: hidden;    /* Prevent horizontal scroll */
    display: flex;
    flex-direction: column;
    scrollbar-width: none;      /* Firefox */
  }
  
  .terminal-scroll::-webkit-scrollbar {
    display: none;              /* Chrome, Safari, Edge */
  }
  
  /* Blinking Cursor */
  .cursor {
    background: #66ff66;
    display: inline-block;
    width: 14px;
    height: 32px; /* Adjusted height to match text */
    margin-bottom: -8px; /* Align properly with text */
    animation: blink 0.8s infinite;
  }
  
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
  
  /* 📺 Scanline Effect */
  .terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.2) 0px,
      rgba(0, 0, 0, 0.2) 2px,
      transparent 2px,
      transparent 4px
    );
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
  }
  
  /* 📺 Slight Flicker */
  @keyframes flicker {
    0% { opacity: 1; }
    50% { opacity: 0.98; }
    100% { opacity: 1; }
  }
  
  .terminal {
    animation: flicker 0.1s infinite;
  }
  
  .terminal-body pre {
    margin: 4px 0;
    word-break: break-word;
    white-space: pre-wrap;
    width: 100%; /* Make sure it takes full width */
    overflow-wrap: break-word; /* Alternative to word-break for some browsers */
  }

 @keyframes glowFade {
  0%   { opacity: 0.5; }
  33%  { opacity: 0.7; }
  66%  { opacity: 0.3; }
  100% { opacity: 1; }
}

.terminal.fade-in-once {
  animation: glowFade 1s ease-in-out forwards;
}
