@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@400;700&display=swap');

:root {
  --bg-color: #202028;
  --text-color: #fff;
  --accent-color: #f0c029;
  --modal-bg: #2d2d38;
  --pixel-border-color: #fff;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Press Start 2P', cursive; /* 像素字体 */
  overflow: hidden;
  user-select: none;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  image-rendering: pixelated; /* 保持像素清晰 */
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* UI Layer */
#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.panel {
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 4px;
  position: absolute;
}

#instructions {
  top: 20px;
  left: 20px;
  font-size: 10px;
  line-height: 1.5;
  color: #ccc;
}

#instructions strong {
  color: var(--accent-color);
}

#interaction-prompt {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-color);
  color: #000;
  padding: 10px 20px;
  border: 4px solid #fff;
  font-size: 12px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-50%) translateY(-5px); }
}

/* Modal Styles */
#modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.2s;
}

#modal-overlay.hidden, #interaction-prompt.hidden {
  opacity: 0;
  pointer-events: none;
}

#modal-content {
  background: var(--modal-bg);
  width: 80%;
  max-width: 600px;
  max-height: 80%;
  padding: 2rem;
  position: relative;
  overflow-y: auto;
  border: 4px solid var(--pixel-border-color);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
  font-family: 'Roboto', sans-serif; /* 内容使用可读性更好的字体 */
}

#modal-title {
  font-family: 'Press Start 2P', cursive;
  color: var(--accent-color);
  margin-top: 0;
  border-bottom: 2px solid #555;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

#modal-body {
  font-size: 1rem;
  line-height: 1.6;
  color: #eee;
}

#modal-body ul {
  padding-left: 20px;
}

#modal-body li {
  margin-bottom: 8px;
}

#close-btn {
  margin-top: 20px;
  background: var(--accent-color);
  border: none;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  cursor: pointer;
  color: #000;
  float: right;
}

#close-btn:hover {
  background: #fff;
}

/* Custom Scrollbar */
#modal-content::-webkit-scrollbar {
  width: 10px;
}
#modal-content::-webkit-scrollbar-track {
  background: #1a1a20; 
}
#modal-content::-webkit-scrollbar-thumb {
  background: #555; 
}
