* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0f;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 960px;
  height: 640px;
  border: 2px solid #1a1a2e;
  box-shadow: 0 0 40px rgba(50, 200, 100, 0.15);
}

#game-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ui-overlay:not(.hidden) {
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

/* Menu styling */
.menu-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 15, 0.95);
  color: #e0e0e0;
}

.menu-title {
  font-size: 48px;
  color: #32c864;
  text-shadow: 0 0 20px rgba(50, 200, 100, 0.5);
  margin-bottom: 10px;
  letter-spacing: 4px;
}

.menu-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 40px;
}

.menu-btn {
  background: transparent;
  border: 1px solid #32c864;
  color: #32c864;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  padding: 12px 40px;
  margin: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 240px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.menu-btn:hover {
  background: rgba(50, 200, 100, 0.15);
  box-shadow: 0 0 15px rgba(50, 200, 100, 0.3);
}

.menu-btn:disabled {
  border-color: #444;
  color: #444;
  cursor: not-allowed;
}

.menu-btn:disabled:hover {
  background: transparent;
  box-shadow: none;
}

.menu-btn.danger {
  border-color: #c83232;
  color: #c83232;
}

.menu-btn.danger:hover {
  background: rgba(200, 50, 50, 0.15);
  box-shadow: 0 0 15px rgba(200, 50, 50, 0.3);
}

/* Location select */
.location-grid {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.location-card {
  width: 250px;
  border: 1px solid #333;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(10, 10, 20, 0.8);
}

.location-card:hover {
  border-color: #32c864;
  box-shadow: 0 0 15px rgba(50, 200, 100, 0.2);
}

.location-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.location-card.locked:hover {
  border-color: #333;
  box-shadow: none;
}

.location-name {
  font-size: 20px;
  color: #32c864;
  margin-bottom: 8px;
}

.location-tier {
  font-size: 12px;
  color: #c8a032;
  margin-bottom: 12px;
}

.location-desc {
  font-size: 13px;
  color: #aaa;
  line-height: 1.4;
}

/* Journal / Evidence panel */
.panel {
  position: absolute;
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid #333;
  padding: 20px;
  color: #ccc;
  font-size: 14px;
}

.panel-title {
  font-size: 18px;
  color: #32c864;
  margin-bottom: 12px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

/* Evidence list */
.evidence-item {
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-found {
  color: #32c864;
}

.evidence-missing {
  color: #555;
}

/* Ghost guess buttons */
.ghost-guess-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ghost-guess-btn {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.ghost-guess-btn:hover {
  border-color: #32c864;
  color: #32c864;
}

/* Skills panel */
.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a2e;
}

.skill-bar {
  width: 120px;
  height: 8px;
  background: #1a1a2e;
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: #32c864;
  transition: width 0.3s;
}

/* Notification popup */
.notification {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid #32c864;
  color: #e0e0e0;
  padding: 12px 24px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  z-index: 100;
  animation: fadeInOut 3s ease forwards;
}

.notification.error {
  border-color: #c83232;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* Results screen */
.results-screen {
  text-align: center;
}

.results-screen h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.results-screen.success h2 {
  color: #32c864;
}

.results-screen.failure h2 {
  color: #c83232;
}

.results-stat {
  font-size: 16px;
  margin: 8px 0;
  color: #aaa;
}

.results-stat span {
  color: #e0e0e0;
}
