/* =======================
   Fonts
======================= */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/IBMPlexMono-Bold.ttf') format('truetype');
  font-weight: 700;
}

/* =======================
   Global Body
======================= */
body {
  background-color: black;
  color: #00ff00; /* terminal green */
  font-family: 'IBM Plex Mono', monospace;
  margin: 0;
  padding: 0;
}

a {
  color: #00ff00;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =======================
   Terminal Lines & Cursor
======================= */
.line {
  margin: 6px 0;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background-color: #00ff00;
  vertical-align: bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.blink {
  animation: blink 1s infinite;
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
}

.prompt-text {
  color: #00ff00;
  text-decoration: none;
}

/* =======================
   Main layout
======================= */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  gap: 12px;
  padding: 20px;
}

/* =======================
   Index page layout
======================= */
.index-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 6px;
  padding: 10px;
}

/* =======================
   Buttons
======================= */
button {
  background: black;
  color: #00ff00;
  border: 2px solid #00ff00;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  transition: background 0.3s ease, color 0.3s ease;
}
button:hover {
  background: #00ff00;
  color: black;
}

/* =======================
   Maze
======================= */
#hud {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 16px;
}

#maze-wrap {
  border: 2px solid #00ff00;
  background: black;
  overflow: hidden;
}

#maze {
  display: block;
  background: black;
}

#tip {
  font-size: 14px;
  color: #00ff00;
}

/* =======================
   Reaction, Scroll, Click Tests
======================= */
#game-area {
  position: relative;       /* for creature placement */
  width: 90vw;
  height: 60vh;
  max-width: 600px;
  background: black;
  border: 2px solid #00ff00;
  overflow: hidden;
}

#results {
  margin-top: 10px;
  font-size: 16px;
}

#history {
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

/* =======================
   Aim Test
======================= */
.target {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #00ff00;
  border-radius: 50%;
  cursor: pointer;
}

/* =======================
   Instructions
======================= */
#instructions {
  margin-bottom: 10px;
  font-size: 16px;
}

/* =======================
   Scroll Test
======================= */
#start-btn, #home-btn {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  border: 2px solid #00ff00;
  background: black;
  color: #00ff00;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

#start-btn:hover, #home-btn:hover {
  background: #00ff00;
  color: black;
}

/* =======================
   Creature Style
======================= */
.circle {
  position: absolute;
  background: black;
  border: 1px solid currentColor;
  padding: 4px 6px;
  cursor: pointer;

  font-family: 'IBM Plex Mono', monospace;
  white-space: pre;              /* preserve line breaks */
  font-feature-settings: "liga" 0; /* disable ligatures */
  letter-spacing: 0;
  line-height: 1;
  font-size: 14px;

  text-shadow: 0 0 4px currentColor;
  box-shadow: 0 0 6px currentColor, inset 0 0 6px currentColor;

  user-select: none; /* Prevent text selection */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.circle.pop {
  transform: scale(0.7);
  opacity: 0;
}

.green  { color: #00ff00; }
.cyan   { color: #00ffff; }
.red    { color: #ff0000; }
.yellow { color: #ffff00; }
.pink   { color: #ff00ff; }
.orange { color: #ffa500; }
.blue   { color: #0000ff; }
.purple { color: #800080; }

/* =======================
   Responsive Adjustments
======================= */
@media (max-width: 600px) {
  #game-area { height: 50vh; font-size: 18px; }
  #results { font-size: 14px; }
  #history { font-size: 12px; }
}
