body {
  margin: 0;
  font-family: 'Consolas', 'Courier New', monospace;
  background: #222;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.hidden {
  display: none !important;
}

#game-container {
  position: relative; /* ✅ makes it a positioning anchor */
  display: flex;
  border: 2px solid #444;
  background: #333;
}

#sidebar {
  width: 220px;
  padding: 10px;
  background-color: #2a2a2a;
  border-right: 2px solid #444;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#sidebar button {
  padding: 8px;
  background-color: #444;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

#sidebar button:hover {
  background-color: #666;
}

#game-canvas {
  image-rendering: pixelated;
  background-color: #111;
  border-left: 2px solid #444;
}

#popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  background-color: #222;
  border: 3px solid #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 15px;
  box-shadow: 0 0 20px #000;
  z-index: 10;
}


#popup img {
  margin-bottom: 10px;
}

#popup p {
  text-align: center;
  font-size: 16px;
  margin: 10px 0;
  flex-grow: 1;
  overflow-y: auto;
}

#popup button {
  margin-top: 10px;
  padding: 8px;
  width: 80px;
  background-color: #555;
  border: none;
  color: white;
  cursor: pointer;
}

#popup.hidden {
  display: none;
}

#remaining-items ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
display:none;
}

#area-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  background-color: #222;
  border: 3px solid #fff;
  padding: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px #000;
}


#area-buttons button {
  width: 100%;
  padding: 10px;
  background: #444;
  color: white;
  border: none;
  cursor: pointer;
}

#tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.9em;
  pointer-events: none;
  z-index: 9999;
  max-width: 200px;
}
.hidden {
  display: none;
}

#rightbar {
  width: 250px;
  flex-shrink: 0;
  overflow-y: auto;
  max-height: 600px;
  margin-left: 10px;
}

#collection-panel {
  width: 200px;
  max-height: 600px;
  background-color: #2a2a2a;
  border-left: 2px solid #444;
  padding: 10px;
  overflow-y: auto;
  flex-shrink: 0;
  margin-left: 10px;
}

#artifact-list button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 6px;
  font-size: 0.85em;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  text-align: left;
}

#artifact-list button:hover {
  background-color: #666;
}

#collection-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-height: 400px;
  background: #666666;
  border: 2px solid #444;
  border-radius: 10px;
  padding: 15px;
  z-index: 10;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

#artifact-list {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}

#collection-panel.hidden {
  display: none;
}

#close-collection-button {
  display: block;
  margin: 10px auto 0 auto;
  padding: 5px 15px;
  font-weight: bold;
  background-color: #444444;
  border: 1px solid #888;
  border-radius: 5px;
  cursor: pointer;
}

.scanner-ui {
  margin-top: 10px;
}

.scanner-ui button {
  display: block;
  width: 150px;
  margin: 4px auto;
  padding: 6px;
  font-size: 14px;
}
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  color: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#intro-text-container {
  text-align: center;
  max-width: 600px;
  padding: 20px;
  font-size: 18px;
}

.intro-line {
  opacity: 0;
  transition: opacity 1s;
  margin-bottom: 16px;
}

#intro-begin, #intro-skip {
  margin: 10px 5px;
  padding: 10px 20px;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

#intro-begin {
  display: none;
}
#title-screen {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 600px;
  transform: translate(-50%, -50%);
  background-color: #000; /* fallback background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  border: 2px solid #444; /* optional border */
  box-shadow: 0 0 20px #000; /* optional shadow */
}

#title-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

#title-button-container {
  position: relative;
  z-index: 2;
  margin-top: 90px;
}

#title-start-button {
  padding: 14px 28px;
  font-size: 20px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px #000;
}
#game-ui.hidden {
  display: none;
}

#launch-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  flex-direction: column;
  color: white;
}

#launch-content {
  text-align: center;
}

#launch-button {
  padding: 20px 40px;
  font-size: 24px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
}

#artifact-status-indicator {
  color: lime;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}
/* === Game-pad highlight === */
.controller-focus{
  outline:2px solid #ffd700;
  outline-offset:2px;
}

#notebook-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

#notebook-panel .popup-content {
  background: #fff;
  color: #000;
  border: 2px solid #444;
  padding: 20px;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

#note-list {
  padding-left: 15px;
  margin-top: 10px;
}

#note-list li {
  margin-bottom: 10px;
  font-size: 14px;
}
#customize-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  border: 3px solid #fff;
  padding: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px #000;
}

#player-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 64px);
  gap: 10px;
  max-width: 320px;
  justify-content: center;
}

.player-icon-option {
  width: 64px;
  height: 64px;
  cursor: pointer;
  border: 2px solid transparent;
}

.player-icon-option:hover {
  border-color: gold;
}

#game-info-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-info-panel .popup-content {
  background: #fff;
  color: #000;
  border: 2px solid #444;
  padding: 20px;
  width: 400px;
  max-height: 500px;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

#game-info-panel button {
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
}

#rightbar button {
  padding: 8px;
  background-color: #444;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: block;
  width: 240px;
  margin-bottom: 10px;
  text-align: center;
}

#rightbar button:hover {
  background-color: #666;
}

#scanner-buttons button {
  width: 150px;
  margin: 4px auto;
  padding: 6px;
  font-size: 14px;
  background-color: #444;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

#scanner-buttons button:hover {
  background-color: #666;
}

#scanner-buttons button.scanner-selected {
  border: 2px solid gold !important;
  background-color: #666 !important;
  box-shadow: 0 0 8px gold;
}




.pulsing-light {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: rgba(255, 255, 150, 0.4); /* fixed yellowish glow */
  box-shadow: 0 0 20px 20px rgba(255, 255, 150, 0.4);
  pointer-events: none;
  z-index: 5;
  display: none;
}

.disabled-popup-btn {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Fail-sound overlays (same look-and-feel as other modals) */
.modal{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);
  background:#333;color:#fff;padding:14px 20px;border:2px solid #666;
  border-radius:8px;z-index:9999;text-align:center;width:260px;
}
.modal.hidden{display:none;}

.modal button{
  margin:6px 8px 0 8px;padding:6px 18px;
  background:#555;border:none;color:#fff;cursor:pointer;
}
.modal button.disabled-popup-btn{opacity:.5;cursor:not-allowed;}
