/* css/snake-game.css — міні-гра «Змійка-мовознавець» */

#snake-game {
  padding: 14px 12px;
}

.snake-card {
  max-width: 430px;
  width: 100%;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.snake-stage {
  position: relative;
  width: 100%;
  height: min(70vh, 560px);
  min-height: 340px;
  background: #07130f;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#snakeCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.snake-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: linear-gradient(rgba(4, 16, 12, 0.85), rgba(4, 16, 12, 0));
  pointer-events: none;
  z-index: 3;
}

.snake-hud-item {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.snake-hud-label {
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8fc4ad;
}

.snake-hud-item b {
  font-size: 16px;
  color: #fff;
}

.snake-hud-target {
  align-items: center;
  text-align: center;
}

.snake-hud-target b {
  color: #8ff0c0;
  font-size: 15px;
}

.snake-hud-item:last-child b {
  color: #ff6b81;
  letter-spacing: 1px;
}

.snake-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 12, 9, 0.82);
  backdrop-filter: blur(4px);
}

.snake-task {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: calc(100% - 24px);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(143, 240, 192, 0.55);
  background: rgba(8, 32, 24, 0.82);
  color: #d8ffec;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.snake-panel {
  width: 100%;
  max-width: 340px;
  padding: 20px 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(24, 64, 48, 0.96), rgba(8, 24, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.snake-panel-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
}

.snake-panel-text {
  margin: 0 0 16px;
  color: #bfe4d4;
  font-size: 13px;
  line-height: 1.45;
}

.snake-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.snake-panel-actions .btn {
  width: 100%;
  margin: 0;
}

.snake-back {
  margin: 10px 12px 14px;
}
