/* Game Menu Overlay */
#game-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
}

#game-menu.show {
  display: flex;
}

.menu-panel {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 20px;
  min-width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.menu-title {
  color: #fff;
  font-size: 24px;
  margin: 0 0 20px 0;
  text-align: center;
}

.menu-section {
  margin-bottom: 20px;
}

.menu-section h3 {
  color: #ccc;
  font-size: 16px;
  margin: 0 0 10px 0;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

.menu-section h4 {
  color: #aaa;
  font-size: 14px;
  margin: 15px 0 8px 0;
  border-bottom: 1px solid #444;
  padding-bottom: 3px;
}

.shadow-section {
  background: rgba(0, 255, 0, 0.05);
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 4px;
  padding: 15px;
  margin-top: 15px;
  transition: opacity 0.3s ease;
}

.shadow-section h4 {
  color: #88ff88;
  border-bottom-color: rgba(0, 255, 0, 0.3);
}

.menu-button {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin: 2px;
}

.menu-button:hover {
  background: #444;
}

.menu-button.primary {
  background: #0066cc;
}

.menu-button.primary:hover {
  background: #0088ff;
}

.menu-button.exit {
  background: #cc0000;
  border-color: #ff0000;
}

.menu-button.exit:hover {
  background: #ff0000;
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.controls-table th,
.controls-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #333;
  color: #ccc;
}

.controls-table th {
  background: #2a2a2a;
  color: #fff;
}

.controls-table td.key-cell {
  cursor: pointer;
  background: #333;
  text-align: center;
  min-width: 60px;
}

.controls-table td.key-cell:hover {
  background: #444;
}

.controls-table td.key-cell.listening {
  background: #0066cc;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.settings-row {
  display: flex;
  align-items: center;
  margin: 10px 0;
  color: #ccc;
}

.settings-row label {
  margin-right: 10px;
  min-width: 120px;
}

.settings-row input[type="checkbox"] {
  margin-right: 8px;
}

.settings-row input[type="range"] {
  flex: 1;
  margin: 0 10px;
}

.settings-row select {
  flex: 1;
  margin: 0 10px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 5px;
  font-size: 14px;
}

.settings-row select:hover {
  background: #444;
}

.settings-row select:focus {
  outline: none;
  border-color: #0066cc;
}

.settings-row .value-display {
  min-width: 40px;
  text-align: center;
  color: #fff;
}

.settings-row .value-display.countdown {
  font-weight: bold;
  font-size: 16px;
  color: #00ff00;
  text-shadow: 0 0 5px currentColor;
}

.menu-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
