#grapeTerminal {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-55%);
  width: 70vw;             /* Responsive width */
  max-width: 520px;        /* Max width on larger screens */
  height: 360px;
  background: #0a0014;
  color: #c084fc;
  font-family: monospace;
  font-size: 13px;
  border: 2px solid #9333ea;
  padding: 10px;
  z-index: 20;
  overflow-y: auto;
  border-radius: 12px;
  user-select: none;
  transform-origin: center center;
  margin: 5vw;
}

/* Optional: adjust top and height on smaller screens */
@media (max-width: 480px) {
  #grapeTerminal {
    top: 40px;
    height: 300px;
    font-size: 12px;
  }
}

  .grape-line {
    margin: 2px 0;
    white-space: pre-wrap;
  }

  .glitch-flash {
    animation: flickerColor 0.15s infinite alternate;
  }

  @keyframes flickerColor {
    0% { color: #c084fc; text-shadow: 0 0 8px #9333ea; }
    50% { color: #f43f5e; text-shadow: 0 0 20px #f87171; }
    100% { color: #c084fc; text-shadow: 0 0 8px #9333ea; }
  }

  @keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    20%, 60% { transform: translate(-1px, 1px); }
    40%, 80% { transform: translate(1px, -1px); }
  }

  .shaking {
    animation: shake 0.15s infinite;
  }

  #blipOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    opacity: 0;
    pointer-events: none;
    z-index: 25;
    transition: opacity 1s ease;
    user-select: none;
  }

  canvas#glitchCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 15;
    user-select: none;
    display: none;
  }
  
  @keyframes pop-in {
  from {
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}
