/* --- Container & Background --- */
#bonus-terminal {
  position: relative;
  width: 100%;
  min-height: 50vh;
  font-family: 'Courier New', monospace;

  /* Stack heading and terminal vertically */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* start from top */
  align-items: center;

  background-color: #fff;
  overflow: visible;
  padding-top: 60px; /* spacing from top of section */
  margin-top: -3.5rem;
  margin-bottom: 1rem;
}

/* reduce space below heading */
.computer-heading {
  text-align: center;
  margin-bottom: 30px; /* space between heading and terminal */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* Heading */
/* Post-it style for the heading and paragraph */
.computer-heading {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #ebd5c5; /* new post-it color */
  padding: 25px 35px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  text-align: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  cursor: default;
}

/* Scale slightly on hover */
.computer-heading:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Heading inside post-it */
.computer-heading h2 {
  font-size: 1.8rem;
  margin: 0;
}

/* Paragraph inside post-it */
.computer-heading p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  max-width: 600px;
}


/* Grid behind monitor */
.background-grid {
 position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 110%; /* extends beyond terminal section */
  background-image: linear-gradient(#ccc 1px, transparent 1px),
                    linear-gradient(90deg, #ccc 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 0;
}

/* Ensure heading and terminal are above the grid */
.computer-heading,
.vintage-computer {
  position: relative;
  z-index: 1;
}

/* Vintage computer frame */
.vintage-computer {
  background-color: #f5f0d0; /* beige/tan */
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  z-index: 1;
}

.screen {
  background-color: #111;
  color: #00ff99;
  padding: 20px;
  border-radius: 10px;
  width: 600px;
  max-width: 90vw;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px #0f0;
}

/* --- Terminal output --- */
#terminal-output p,
#terminal-text p,
#file-content p,
#file-content li {
  margin: 0.2em 0;
  white-space: pre-wrap;
}

/* --- Cursor line --- */
#cursor-line, #return-cursor-line {
  font-family: 'Courier New', monospace;
  display: flex;
  gap: 0.1em;
  color: #00ff99;
  margin-top: 5px;
}

.cursor-underscore {
  animation: blink 1s step-start infinite;
}

/* --- Blinking & scanline effect --- */
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Hidden input --- */
#user-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* --- Category list --- */
#file-title {
  font-weight: bold;
  margin-bottom: 5px;
}

#category-list {
  list-style: disc inside;
  padding-left: 20px;
}

#category-list li {
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, font-weight 0.2s;
}

#category-list li:hover,
#category-list li.focused {
  background: rgba(0, 255, 153, 0.2);
  font-weight: bold;
}

/* --- File view --- */
#file-view {
  background: rgba(0,0,0,0.85);
  padding: 20px;
  border: 1px solid #00ff99;
  border-radius: 8px;
  max-height: 100%;
  overflow-y: auto;
}

#file-view ul {
  list-style: disc inside;
  margin-top: 5px;
}

#esc-back {
  color: #ff5555;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 12px;
}

/* --- Return question --- */
#return-question {
  margin-top: 15px;
}

#return-question p {
  margin: 0.2em 0;
}

/* --- Utility --- */
.hidden { display: none; }

/* --- Responsive adjustments --- */
@media (max-width: 600px) {
  .screen { width: 95vw; padding: 15px; }
  #user-input { font-size: 0.9rem; }

  #bonus-terminal {
    margin-top: -3.5rem;
    margin-bottom: 0;
  }

   /* Scale down post-it note */
  .computer-heading {
    padding: 15px 20px;
    max-width: 90%; /* leaves some space on the sides */
    font-size: 0.9rem; /* slight font shrink */
  }

  .computer-heading h2 {
    font-size: 1.5rem;
  }

  .computer-heading p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

.return-prompt {
  margin-top: 1rem;
  color: var(--terminal-text-color);
  opacity: 0.8;
}
