
body {
    background-color: black;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
  }

/* KEYPAD SECTION */
  #introTextID {
    height: 80px; /* Set a fixed height */
    overflow: hidden; /* Hide any overflowing text */
  }

  .key {
    width: 50px;
    height: 50px;
    margin: 5px;
    border: 1px solid black;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    border-radius: 10px;
    background-color: #333; 
    color: #007bff;
    border: none;
    text-shadow: 0 0 10px #007bff;
    user-select: none;
  }

  .keypad-container {
    background-color: #222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8); /* Outer shadow */
  }

  #display {
    background-color: #444; 
    color: white; 
    border: none;
  }

  .display-field {
    width: 100%;
    height: 30px;
    margin-bottom: 5px;
    background-color: gray;
    color: white; 
    border: 1px solid black;
    text-align: center;
    line-height: 30px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); /* Add shadow */
    background-image: linear-gradient(to bottom, #292929, #3d3d3d); /* Dark gray gradient */
    border-radius: 5px; /* Add rounded corners */
  }

  .box {
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
    opacity: 0; /* Initially hidden */
    transition: opacity 1.0s ease-in; /* Transition for opacity */
  }

  .box.visible {
    opacity: 1;
  }

  .glow-box {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: glow 1s infinite alternate; /* Add animation */
  }

  @keyframes glow {
      0% {
          box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
      }
      100% {
          box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); /* Increase shadow size and opacity for glow */
      }
  }


  

/* MAIN CONTAINER */
  .futuristic-border {
    border: 2px solid #007bff; /* Blue border */
    border-radius: 5px; /* Rounded corners */
  }
  #sceneImageID {
    width: 100%;
    height: auto;
  }
  .svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    pointer-events: none; /* Allow clicks to pass through to the image */
    z-index: 2;
  }
  .clickable-path {
    fill: transparent; /* Make the path invisible */
    /* stroke: #007bff; */
    /* stroke-width: 2; */
    cursor: pointer;
  }
  .clickable-path:hover {
    stroke: #007bff; /* outline on hover */
    stroke-width: 2;
  }

  .arrow:hover {
    border: 2px solid #007bff;
    cursor: pointer;
  }

  /* AVATARS */
  #avatarSelectionID {
    background-color: transparent; /* black scene already there */
    padding: 2rem 1rem;
  }
  
  #avatarGrid {
    max-width: 600px;
  }

  .fade-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .fade-in.show {
    opacity: 1;
    transform: scale(1);
  }

  .avatar-tile {
    border: 2px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background-color: #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
  }

  .avatar-tile:hover {
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.7); /* blue glow on hover */
  }

  .avatar-tile.selected {
    box-shadow: 0 0 18px 6px rgba(0, 255, 170, 0.9); /* stronger turquoise glow when selected */
    border-color: #00ffaa;
  }
  
  /* Avatar thumbnails */
  .avatar-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover; /* Crop if needed but keep 1:1 */
    border-radius: 10px; /* Slight rounding for futuristic style */
    border: 2px solid #ccc;
    background-color: #f0f0f0;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  /* Bonus animation: soft glow on hover */
  .avatar-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.6);
    border-color: #0099ff;
  }
  
  .phase-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
  
  /* BEETLES */
  .beetle {
    position: absolute;
    width: 40px;
    height: 56px;
    transition: transform 0.1s linear; /* For smooth rotation */
    transform: rotate(90deg); /* Initial rotation to make it face right */
    z-index: 2;
  }

  .trail-segment {
    position: absolute;
    z-index: 1; /* Below the beetle */
    pointer-events: none; /* Don't block clicks */
    transition: opacity 0.2s linear; /* Smooth fade-out */
  }

  @keyframes pulseRed {
    0%   { color: #fff; transform: scale(1); }
    50%  { color: #ff4444; transform: scale(1.2); }
    100% { color: #fff; transform: scale(1); }
  }

  .frost-warning {
    animation: pulseRed 0.5s infinite;
    font-weight: bold;
  }
