.overlay,
.game-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
}

.overlay {
  background: rgba(0, 0, 0, 0.8);
  z-index: 5; 
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
}

.overlay:not(.d-none) {
  opacity: 1;
}

.start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  gap: 16px;
}

#help-screen {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 6; 
}

.help-content {
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
  text-align: center;
}

.help-content h2 {
  font-size: 40px;
  margin-bottom: 30px;
  color: var(--btn-beige-light);
  text-shadow: var(--shadow-text);
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 30px;
  max-width: 420px;
}

.control-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px 50px;
  border-radius: 10px;
  border: 1px solid #f4e4bc;
}

.key {
  font-size: 18px;
  background: #f4e4bc;
  color: #3b2608;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #3b2608;
  min-width: 64px;
  text-align: center;
  box-shadow: var(--shadow-btn);
}

.action {
  font-size: 24px;
  color: #f4e4bc;
}

.help-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
